This function has been deprecated. BuddyPress 1.5.0 instead.
bp_core_add_admin_menu_page( $args = '' )
In BuddyPress 1.1 – 1.2.x, this function provided a better version of add_menu_page() that allowed positioning of menus. Deprecated in 1.5 in favour of a WP core function.
Description
Return
(string)
Source
File: bp-core/deprecated/buddypress/1.5.php
function bp_core_add_admin_menu_page( $args = '' ) { global $_registered_pages, $admin_page_hooks, $menu; _deprecated_function( __FUNCTION__, '1.5', 'Use add_menu_page()' ); $defaults = array( 'access_level' => 2, 'file' => false, 'function' => false, 'icon_url' => false, 'menu_title' => '', 'page_title' => '', 'position' => 100 ); $r = wp_parse_args( $args, $defaults ); extract( $r, EXTR_SKIP ); $file = plugin_basename( $file ); $hookname = get_plugin_page_hookname( $file, '' ); $admin_page_hooks[$file] = sanitize_title( $menu_title ); if ( !empty( $function ) && !empty ( $hookname ) ) add_action( $hookname, $function ); if ( empty( $icon_url ) ) $icon_url = 'images/generic.png'; elseif ( is_ssl() && 0 === strpos( $icon_url, 'http://' ) ) $icon_url = 'https://' . substr( $icon_url, 7 ); do { $position++; } while ( !empty( $menu[$position] ) ); $menu[$position] = array ( $menu_title, $access_level, $file, $page_title, 'menu-top ' . $hookname, $hookname, $icon_url ); $_registered_pages[$hookname] = true; return $hookname; }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | BuddyPress 1.5.0 |
BuddyPress 1.1.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.