Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/13/2012 04:03:55 AM (13 years ago)
Author:
johnjamesjacoby
Message:

First pass at refactoring update/install wizard to remove code duplication:

  • Rename and move admin images, css, and js into bp-core/admin/ folders
  • Load the wizard from inside BP_Admin instead of selectively alone, so that basic functions are available
  • Properly enqueue admin scripts
  • Remove duplicated _update_ functions in bp-core-updater.php
  • Remove weird redirect hack as it's no longer needed
  • Remove purpose built functions that are no longer needed
  • See #4005.
  • Indirectly fixes #3964.
File:
1 edited

Legend:

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

    r5729 r5749  
    44
    55function bp_forums_add_admin_menu() {
    6     global $bp;
    76
    87    if ( ! bp_current_user_can( 'bp_moderate' ) )
     
    1312    $hook = add_submenu_page( $page, __( 'BuddyPress Forums', 'buddypress' ), __( 'BuddyPress Forums', 'buddypress' ), 'manage_options', 'bb-forums-setup', 'bp_forums_bbpress_admin' );
    1413
    15     // Add a hook for common BP admin CSS/JS scripts
    16     add_action( "admin_print_styles-$hook", 'bp_core_add_admin_menu_styles' );
    17 
    1814    // Fudge the highlighted subnav item when on a BuddyPress admin page
    1915    add_action( "admin_head-$hook", 'bp_core_modify_admin_menu_highlight' );
     
    2218
    2319function bp_forums_bbpress_admin() {
    24     global $bp;
    2520
    2621    $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' ); ?>
     
    209204
    210205function bp_forums_configure_existing_install() {
    211     global $wpdb, $bbdb;
    212206
    213207    check_admin_referer( 'bp_forums_existing_install_init' );
     
    232226
    233227function bp_forums_bbpress_install() {
    234     global $wpdb, $bbdb, $bp;
     228    global $wpdb, $bp;
    235229
    236230    check_admin_referer( 'bp_forums_new_install_init' );
Note: See TracChangeset for help on using the changeset viewer.