Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/12/2014 09:26:35 PM (11 years ago)
Author:
boonebgorges
Message:

Introduce BuddyPress Tools panel

Modeled on the bbPress panel, the BuddyPress Tools panel contains a number of
tools for repairing BuddyPress data. In this first iteration, the following
actions are supported:

  • Recalculate total_friend_count for each user
  • Recalculate total_group_count for each user
  • Recalculate total site members

On non-Multisite (or when BP is only activated on a single site), the menu
appears as Tools > BuddyPress. When BP is network-activated, we create a stub
Tools menu on the Network Admin to account for the fact that one is not
normally there. If WP ever introduces a menu like this, we can use it instead.

Fixes #5296

Props cmmarslender, boonebgorges, imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/admin/bp-core-functions.php

    r7827 r8117  
    7575 */
    7676function bp_core_modify_admin_menu_highlight() {
    77     global $plugin_page, $submenu_file;
     77    global $pagenow, $plugin_page, $submenu_file;
    7878
    7979    // This tweaks the Settings subnav menu to show only one BuddyPress menu item
    8080    if ( ! in_array( $plugin_page, array( 'bp-activity', 'bp-general-settings', ) ) )
    8181        $submenu_file = 'bp-components';
     82
     83    // Network Admin > Tools
     84    if ( in_array( $plugin_page, array( 'bp-tools', 'available-tools' ) ) ) {
     85        $submenu_file = $plugin_page;
     86    }
    8287}
    8388
     
    389394            'href' => bp_get_admin_url( add_query_arg( array( 'page' => 'bp-settings' ), 'admin.php' ) ),
    390395            'name' => __( 'Settings', 'buddypress' )
    391         )
     396        ),
    392397    );
    393398
Note: See TracChangeset for help on using the changeset viewer.