Changeset 13534
- Timestamp:
- 07/30/2023 06:48:08 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/classes/class-bp-members-component.php
r13522 r13534 978 978 */ 979 979 public function check_parsed_query() { 980 $single_item_component = '';981 980 if ( bp_is_user() ) { 982 981 $single_item_component = bp_current_component(); 983 } 984 985 $single_item_action = ''; 986 if ( $single_item_component ) { 987 $single_item_action = bp_current_action(); 988 } 989 990 $bp = buddypress(); 991 if ( isset( $bp->{$single_item_component}, $bp->{$single_item_component}->sub_nav ) ) { 992 $screen_functions = wp_list_pluck( $bp->{$single_item_component}->sub_nav, 'screen_function', 'slug' ); 993 994 if ( ! $single_item_action || ! isset( $screen_functions[ $single_item_action ] ) || ! is_callable( $screen_functions[ $single_item_action ] ) ) { 995 bp_do_404(); 982 983 $single_item_action = ''; 984 if ( $single_item_component ) { 985 $single_item_action = bp_current_action(); 986 } 987 988 // Viewing a single activity. 989 if ( 'activity' === $single_item_component && is_numeric( $single_item_action ) ) { 996 990 return; 991 } 992 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 ] ) ) { 998 bp_do_404(); 999 return; 1000 } 997 1001 } 998 1002 }
Note: See TracChangeset
for help on using the changeset viewer.