Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/10/2011 03:58:53 PM (15 years ago)
Author:
boonebgorges
Message:

Introduces bp_core_do_network_admin() and bp_core_admin_hook() for better BP_ENABLE_MULTIBLOG and multinetwork admin support. Changes BP admin menu to load in slot 3, so as not to override Dashboard menu on site admin. Props wpmuguru for help testing and thinking through

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-admin.php

    r4421 r4482  
    1111    add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
    1212}
    13 add_action( is_multisite() ? 'network_admin_menu' : 'admin_menu', 'bp_forums_add_admin_menu' );
     13add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
    1414
    1515function bp_forums_bbpress_admin() {
    16     global $bp; ?>
     16    global $bp;
     17   
     18    $base_url = bp_core_do_network_admin() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' );
     19   
     20    $action = add_query_arg( array( 'page' => 'bb-forums-setup', 'reinstall' => '1' ), $base_url );
     21   
     22    ?>
    1723
    1824    <div class="wrap">
     
    3642        else : ?>
    3743
    38             <p><?php printf( __( 'bbPress forum integration in BuddyPress has been set up correctly. If you are having problems you can <a href="%s" title="Reinstall bbPress">re-install</a>', 'buddypress' ), network_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ) ); ?>
     44            <p><?php printf( __( 'bbPress forum integration in BuddyPress has been set up correctly. If you are having problems you can <a href="%s" title="Reinstall bbPress">re-install</a>.', 'buddypress' ), $action ); ?>
    3945            <p><?php _e( 'NOTE: The forums directory will only work if your bbPress tables are in the same database as your WordPress tables. If you are not using an existing bbPress install you can ignore this message.', 'buddypress' ) ?></p>
    4046
Note: See TracChangeset for help on using the changeset viewer.