Skip to:
Content

BuddyPress.org

Ticket #3785: 3785-2.patch

File 3785-2.patch, 3.6 KB (added by boonebgorges, 15 years ago)
  • bp-core/admin/bp-core-admin.php

    diff --git bp-core/admin/bp-core-admin.php bp-core/admin/bp-core-admin.php
    index 64ed7fe..a982ee6 100644
    function bp_core_admin_tabs( $active_tab = '' ) {  
    7373 * @todo Add convenience links into the markup once new positions are finalised.
    7474 */
    7575function bp_core_admin_backpat_page() {
     76        $settings_url = add_query_arg( 'page', 'bp-general-config', bp_core_do_network_admin() ? network_admin_url( 'settings.php' ) : admin_url( 'options-general.php' ) );
    7677?>
    7778        <div class="wrap">
    7879                <?php screen_icon( 'buddypress'); ?>
    7980                <h2><?php _e( 'Why have all my BuddyPress menus disappeared?', 'buddypress' ); ?></h2>
    8081
    8182                <p><?php _e( "Don't worry! We've moved the BuddyPress options into more convenient and easier to find locations. You're seeing this page because you are running a legacy BuddyPress plugin which has not been updated.", 'buddypress' ); ?></p>
    82                 <p><?php printf( __( 'Components, Pages, Settings, and Forums, have been moved to <a href="%s">Settings &gt; BuddyPress</a>. Profile Fields has been moved into the <a href="%s">Users</a> menu.', 'buddpress' ), network_admin_url( 'options-general.php?page=bp-general-config' ), network_admin_url( 'users.php?page=bp-profile-setup' ) ); ?></p>
     83                <p><?php printf( __( 'Components, Pages, Settings, and Forums, have been moved to <a href="%s">Settings &gt; BuddyPress</a>. Profile Fields has been moved into the <a href="%s">Users</a> menu.', 'buddpress' ), $settings_url, network_admin_url( 'users.php?page=bp-profile-setup' ) ); ?></p>
    8384        </div>
    8485<?php
    8586}
  • bp-core/bp-core-functions.php

    diff --git bp-core/bp-core-functions.php bp-core/bp-core-functions.php
    index 378715a..1e6237c 100644
    function bp_core_add_admin_menu() {  
    339339                return;
    340340
    341341        $hooks = array();
     342        $page  = bp_core_do_network_admin()  ? 'settings.php' : 'options-general.php';
    342343
    343344        // Changed in BP 1.6 . See bp_core_admin_backpat_menu()
    344345        $hooks[] = add_menu_page( __( 'BuddyPress', 'buddypress' ), __( 'BuddyPress', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_backpat_menu', '' );
    345346        $hooks[] = add_submenu_page( 'bp-general-settings', __( 'BuddyPress Help', 'buddypress' ), __( 'Help', 'buddypress' ), 'manage_options', 'bp-general-settings', 'bp_core_admin_backpat_page' );
    346347
    347348        // Add the option pages
    348         $hooks[] = add_options_page( __( 'BuddyPress Components', 'buddypress' ), __( 'BuddyPress', 'buddypress' ), 'manage_options', 'bp-general-config', 'bp_core_admin_component_setup' );
    349         $hooks[] = add_options_page( __( 'BuddyPress Pages', 'buddypress' ),      __( 'BuddyPress Pages', 'buddypress' ),      'manage_options', 'bp-page-settings',  'bp_core_admin_page_setup'      );
    350         $hooks[] = add_options_page( __( 'BuddyPress Settings', 'buddypress' ),   __( 'BuddyPress Settings', 'buddypress' ),   'manage_options', 'bp-settings',       'bp_core_admin_settings'        );
     349        $hooks[] = add_submenu_page( $page, __( 'BuddyPress Components', 'buddypress' ), __( 'BuddyPress', 'buddypress' ), 'manage_options', 'bp-general-config', 'bp_core_admin_component_setup' );
     350        $hooks[] = add_submenu_page( $page, __( 'BuddyPress Pages', 'buddypress' ),      __( 'BuddyPress Pages', 'buddypress' ),      'manage_options', 'bp-page-settings',  'bp_core_admin_page_setup'      );
     351        $hooks[] = add_submenu_page( $page, __( 'BuddyPress Settings', 'buddypress' ),   __( 'BuddyPress Settings', 'buddypress' ),   'manage_options', 'bp-settings',       'bp_core_admin_settings'        );
    351352
    352353        foreach( $hooks as $hook ) {
    353354                // Add a hook for common BP admin CSS/JS scripts