bp_registration_hide_messages_adminbar

Hide interaction menu items from Admin Bar.

Description

(array) bp_registration_hide_messages_adminbar( (array) $items = array() ); 

Returns (array)

$items Filtered menu items.

Parameters (1)

0. $items — Optional. (array) => array()
Array of menu items to be displayed.

Usage

  1. if ( !function_exists( 'bp_registration_hide_messages_adminbar' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bp-registration-options/includes/core.php'; 
  3.  
  4. // Array of menu items to be displayed. 
  5. $items = array(); 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_registration_hide_messages_adminbar($items); 
  9.  

Defined (1)

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

/includes/core.php  
  1. function bp_registration_hide_messages_adminbar( $items = array() ) { 
  2. foreach ( $items as $key => $value ) { 
  3. if ( 'my-account-messages-compose' == $value['id'] ) { 
  4. unset( $items[ $key ] ); 
  5. break; 
  6. return $items;