Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/30/2011 10:41:47 AM (14 years ago)
Author:
djpaul
Message:

Deprecate bp_core_add_admin_menu_page() in favour of add_menu_page(). Fixes #3184

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/deprecated/1.3.php

    r4287 r4309  
    4949}
    5050
     51/** Admin ******************************************************************/
     52
     53/**
     54 * In BuddyPress 1.1 - 1.2.x, this function provided a better version of add_menu_page()
     55 * that allowed positioning of menus. Deprecated in 1.3 in favour of a WP core function.
     56 *
     57 * @deprecated 1.3
     58 * @deprecated Use add_menu_page().
     59 * @since 1.1
     60 */
     61function bp_core_add_admin_menu_page( $args = '' ) {
     62    $defaults = array(
     63        'page_title'   => '',
     64        'menu_title'   => '',
     65        'capability'   => 'manage_options',
     66        'file'         => '',
     67        'function'     => '',
     68        'icon_url'     => '',
     69        'position'     => 100
     70    );
     71
     72    $r = wp_parse_args( $args, $defaults );
     73    extract( $r, EXTR_SKIP );
     74
     75    _deprecated_function( __FUNCTION__, '1.3', 'Use add_menu_page()' );
     76    return add_menu_page( $page_title, $menu_title, $capability, $file, $function, $icon_url, $position );
     77}
     78
    5179/** Activity ******************************************************************/
    5280
Note: See TracChangeset for help on using the changeset viewer.