Changeset 13123 for trunk/src/bp-core/classes/class-bp-component.php
- Timestamp:
- 10/09/2021 06:10:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-component.php
r13108 r13123 510 510 } 511 511 512 // Set directory page states. 513 add_filter( 'bp_admin_display_directory_states', array( $this, 'admin_directory_states' ), 10, 2 ); 514 512 515 /** 513 516 * Fires at the end of the setup_actions method inside BP_Component. … … 988 991 do_action( 'bp_' . $this->id . '_blocks_init' ); 989 992 } 993 994 /** 995 * Add component's directory states. 996 * 997 * @since 10.0.0 998 * 999 * @param string[] $states An array of post display states. 1000 * @param WP_Post $post The current post object. 1001 * @return array The component's directory states. 1002 */ 1003 public function admin_directory_states( $states = array(), $post = null ) { 1004 if ( $this->has_directory ) { 1005 /** 1006 * Filter here to edit the component's directory states. 1007 * 1008 * This is a dynamic hook that is based on the component string ID. 1009 * 1010 * @since 10.0.0 1011 * 1012 * @param string[] $states An array of post display states. 1013 */ 1014 return apply_filters( 'bp_' . $this->id . '_admin_directory_states', $states ); 1015 } 1016 1017 return $states; 1018 } 990 1019 } 991 1020 endif; // BP_Component.
Note: See TracChangeset
for help on using the changeset viewer.