diff --git src/bp-core/bp-core-catchuri.php src/bp-core/bp-core-catchuri.php
index c7dd4aef8..e2415b898 100644
|
|
|
function bp_core_set_uri_globals() { |
| 311 | 311 | ) ); |
| 312 | 312 | |
| 313 | 313 | if ( ! empty( $matched_types ) ) { |
| 314 | | $bp->current_member_type = reset( $matched_types ); |
| | 314 | $bp->current_member_type = reset( $matched_types ); |
| | 315 | $bp->members->current_directory_type = $bp->current_member_type; |
| 315 | 316 | unset( $bp_uri[ $uri_offset + 1 ] ); |
| 316 | 317 | } |
| 317 | 318 | } |
diff --git src/bp-core/bp-core-template.php src/bp-core/bp-core-template.php
index b0b21e289..b6b5890a3 100644
|
|
|
function bp_is_directory() { |
| 1908 | 1908 | return (bool) apply_filters( 'bp_is_directory', $retval ); |
| 1909 | 1909 | } |
| 1910 | 1910 | |
| | 1911 | /** |
| | 1912 | * Is this a component's type directory page? |
| | 1913 | * |
| | 1914 | * @since 3.2.0 |
| | 1915 | * |
| | 1916 | * @return bool True if the current page is a component's type directory, otherwise false. |
| | 1917 | */ |
| | 1918 | function bp_is_directory_type() { |
| | 1919 | $bp = buddypress(); |
| | 1920 | $retval = false; |
| | 1921 | $component = bp_current_component(); |
| | 1922 | |
| | 1923 | if ( bp_is_directory() && bp_is_active( $component ) ) { |
| | 1924 | $retval = ! empty( $bp->{$component}->current_directory_type ); |
| | 1925 | } |
| | 1926 | |
| | 1927 | /** |
| | 1928 | * Filters whether or not user is on a component's type directory page. |
| | 1929 | * |
| | 1930 | * @since 3.2.0 |
| | 1931 | * |
| | 1932 | * @param bool $retval Whether or not user is on a component'type directory page. |
| | 1933 | * @param string $component The current component. |
| | 1934 | */ |
| | 1935 | return (bool) apply_filters( 'bp_is_directory_type', $retval, $component ); |
| | 1936 | } |
| | 1937 | |
| 1911 | 1938 | /** |
| 1912 | 1939 | * Check to see if a component's URL should be in the root, not under a member page. |
| 1913 | 1940 | * |
| … |
… |
function bp_the_body_class() { |
| 3245 | 3272 | $bp_classes[] = 'my-activity'; |
| 3246 | 3273 | } |
| 3247 | 3274 | } else { |
| 3248 | | if ( bp_get_current_member_type() ) { |
| | 3275 | if ( bp_is_directory_type() ) { |
| 3249 | 3276 | $bp_classes[] = 'type'; |
| 3250 | 3277 | } |
| 3251 | 3278 | } |
diff --git src/bp-templates/bp-nouveau/includes/template-tags.php src/bp-templates/bp-nouveau/includes/template-tags.php
index ce2ad93f5..f497158ac 100644
|
|
|
function bp_nouveau_nav_classes() { |
| 907 | 907 | $nav_item = $bp_nouveau->current_nav_item; |
| 908 | 908 | $classes = array(); |
| 909 | 909 | |
| 910 | | if ( 'directory' === $bp_nouveau->displayed_nav && ! empty( $nav_item->li_class ) ) { |
| 911 | | $classes = (array) $nav_item->li_class; |
| | 910 | if ( 'directory' === $bp_nouveau->displayed_nav ) { |
| | 911 | if ( ! empty( $nav_item->li_class ) ) { |
| | 912 | $classes = (array) $nav_item->li_class; |
| | 913 | } |
| | 914 | |
| | 915 | if ( bp_is_directory_type() ) { |
| | 916 | $classes[] = 'no-ajax'; |
| | 917 | } |
| 912 | 918 | } elseif ( 'groups' === $bp_nouveau->displayed_nav || 'personal' === $bp_nouveau->displayed_nav ) { |
| 913 | 919 | $classes = array( 'bp-' . $bp_nouveau->displayed_nav . '-tab' ); |
| 914 | 920 | $selected = bp_current_action(); |