bp_activity_admin_edit_hidden_metaboxes( array $hidden, WP_Screen $screen )

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

Description

Parameters

$hidden

(Required) Array of items to hide.

$screen

(Required) Screen identifier.

Return

(array) Hidden Meta Boxes.

Source

File: bp-activity/bp-activity-admin.php

function bp_activity_admin_edit_hidden_metaboxes( $hidden, $screen ) {
	if ( empty( $screen->id ) || 'toplevel_page_bp-activity' !== $screen->id && 'toplevel_page_bp-activity-network' !== $screen->id ) {
		return $hidden;
	}

	// Hide the primary link meta box by default.
	$hidden  = array_merge( (array) $hidden, array( 'bp_activity_itemids', 'bp_activity_link', 'bp_activity_type', 'bp_activity_userid', ) );

	/**
	 * Filters default hidden metaboxes so plugins can alter list.
	 *
	 * @since BuddyPress 1.6.0
	 *
	 * @param array     $hidden Default metaboxes to hide.
	 * @param WP_Screen $screen Screen identifier.
	 */
	return apply_filters( 'bp_hide_meta_boxes', array_unique( $hidden ), $screen );
}

Changelog

Changelog
Version Description
BuddyPress 1.6.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.