Changeset 13583
- Timestamp:
- 09/18/2023 02:20:59 AM (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-component.php
r13534 r13583 992 992 993 993 $bp = buddypress(); 994 if ( isset( $bp->{$single_item_component}, $bp->{$single_item_component}->sub_nav ) ) { 995 $screen_functions = wp_list_pluck( $bp->{$single_item_component}->sub_nav, 'screen_function', 'slug' ); 996 997 if ( ! $single_item_action || ! isset( $screen_functions[ $single_item_action ] ) || ! is_callable( $screen_functions[ $single_item_action ] ) ) { 994 if ( isset( $bp->{$single_item_component} ) ) { 995 $screen_function = ''; 996 997 if ( isset( $bp->{$single_item_component}->sub_nav ) ) { 998 $screen_functions = wp_list_pluck( $bp->{$single_item_component}->sub_nav, 'screen_function', 'slug' ); 999 1000 if ( isset( $screen_functions[ $single_item_action ] ) ) { 1001 $screen_function = $screen_functions[ $single_item_action ]; 1002 } 1003 } 1004 1005 // Check if this nav item has been added from outside the Component's class. 1006 if ( ! $screen_function ) { 1007 $sub_nav = $this->nav->get( $single_item_component . '/' . $single_item_action ); 1008 1009 if ( isset( $sub_nav->screen_function ) && $sub_nav->screen_function ) { 1010 $screen_function = $sub_nav->screen_function; 1011 } 1012 } 1013 1014 if ( ! $single_item_action || ! $screen_function || ! is_callable( $screen_function ) ) { 998 1015 bp_do_404(); 999 1016 return;
Note: See TracChangeset
for help on using the changeset viewer.