BP_Admin::site_admin_menus()
Register site-admin nav menu elements.
Description Description
Source Source
File: bp-core/classes/class-bp-admin.php
public function site_admin_menus() {
if ( ! bp_current_user_can( 'manage_options' ) ) {
return;
}
$hooks = array();
// Appearance > Emails.
$hooks[] = add_theme_page(
_x( 'Emails', 'screen heading', 'buddypress' ),
_x( 'Emails', 'screen heading', 'buddypress' ),
$this->capability,
'bp-emails-customizer-redirect',
'bp_email_redirect_to_customizer'
);
// Emails > Customize.
$hooks[] = add_submenu_page(
'edit.php?post_type=' . bp_get_email_post_type(),
_x( 'Customize', 'email menu label', 'buddypress' ),
_x( 'Customize', 'email menu label', 'buddypress' ),
$this->capability,
'bp-emails-customizer-redirect',
'bp_email_redirect_to_customizer'
);
foreach( $hooks as $hook ) {
add_action( "admin_head-$hook", 'bp_core_modify_admin_menu_highlight' );
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |