bp_activity_admin_edit_hidden_metaboxes

Hide the advanced edit meta boxes by default, so we don't clutter the screen.

Description

(array) bp_activity_admin_edit_hidden_metaboxes( (array) $hidden, (WP_Screen) $screen ); 

Returns (array)

Hidden Meta Boxes.

Parameters (2)

0. $hidden (array)
Array of items to hide.
1. $screen (WP_Screen)
Screen identifier.

Usage

  1. if ( !function_exists( 'bp_activity_admin_edit_hidden_metaboxes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-admin.php'; 
  3.  
  4. // Array of items to hide. 
  5. $hidden = array(); 
  6.  
  7. // Screen identifier. 
  8. $screen = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_activity_admin_edit_hidden_metaboxes($hidden, $screen); 
  12.  

Defined (1)

The function is defined in the following location(s).

/bp-activity/bp-activity-admin.php  
  1. function bp_activity_admin_edit_hidden_metaboxes( $hidden, $screen ) { 
  2. if ( empty( $screen->id ) || 'toplevel_page_bp-activity' !== $screen->id && 'toplevel_page_bp-activity-network' !== $screen->id ) { 
  3. return $hidden; 
  4.  
  5. // Hide the primary link meta box by default. 
  6. $hidden = array_merge( (array) $hidden, array( 'bp_activity_itemids', 'bp_activity_link', 'bp_activity_type', 'bp_activity_userid', ) ); 
  7.  
  8. /** 
  9. * Filters default hidden metaboxes so plugins can alter list. 
  10. * @since 1.6.0 
  11. * @param array $hidden Default metaboxes to hide. 
  12. * @param WP_Screen $screen Screen identifier. 
  13. */ 
  14. return apply_filters( 'bp_hide_meta_boxes', array_unique( $hidden ), $screen );