Changeset 13471 for trunk/src/bp-core/admin/bp-core-admin-actions.php
- Timestamp:
- 05/07/2023 11:36:50 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/admin/bp-core-admin-actions.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-actions.php
r13461 r13471 61 61 add_action( 'bp_admin_menu', 'bp_admin_separator' ); 62 62 63 // Add a filter to include BP Components directory pages display states.64 add_filter( 'display_post_states', 'bp_admin_display_directory_states', 10, 2 );65 66 63 /** 67 64 * When a new site is created in a multisite installation, run the activation … … 239 236 do_action( 'bp_register_admin_settings' ); 240 237 } 241 242 /**243 * Dedicated filter to inform about BP components directory page states.244 *245 * @since 10.0.0246 *247 * @param string[] $post_states An array of post display states.248 * @param WP_Post $post The current post object.249 */250 function bp_admin_display_directory_states( $post_states = array(), $post = null ) {251 /**252 * Filter here to add BP Directory pages.253 *254 * Used internaly by BP_Component->admin_directory_states(). Please use the dynamic255 * filter in BP_Component->admin_directory_states() to edit the directory state256 * according to the component's ID.257 *258 * @since 10.0.0259 *260 * @param array $value An empty array.261 * @param WP_Post $post The current post object.262 */263 $directory_page_states = apply_filters( 'bp_admin_display_directory_states', array(), $post );264 265 if ( $directory_page_states ) {266 $post_states = array_merge( $post_states, $directory_page_states );267 }268 269 return $post_states;270 }
Note: See TracChangeset
for help on using the changeset viewer.