Skip to:
Content

BuddyPress.org

Ticket #3625: 3625.02.patch

File 3625.02.patch, 8.2 KB (added by webraket, 13 years ago)
  • bp-activity/bp-activity-actions.php

     
    2222function bp_register_activity_actions() {
    2323        do_action( 'bp_register_activity_actions' );
    2424}
    25 add_action( 'bp_init', 'bp_register_activity_actions', 8 );
     25add_action( 'bp_init_core', 'bp_register_activity_actions', 8 );
    2626
    2727/**
    2828 * Allow core components and dependent plugins to register activity actions
  • bp-core/bp-core-adminbar.php

     
    4343
    4444        remove_action( 'admin_bar_menu', 'wp_admin_bar_updates_menu', 70 );
    4545}
    46 add_action( 'bp_init', 'bp_admin_bar_remove_wp_menus', 2 );
     46add_action( 'bp_init_core', 'bp_admin_bar_remove_wp_menus', 2 );
    4747
    4848/**
    4949 * Add a menu for the root site of this BuddyPress network
     
    247247
    248248        wp_enqueue_style( 'bp-admin-bar-rtl', apply_filters( 'bp_core_admin_bar_rtl_css', $stylesheet ), array( 'bp-admin-bar' ), '20110723' );
    249249}
    250 add_action( 'bp_init', 'bp_core_load_admin_bar_css' );
     250add_action( 'bp_init_core', 'bp_core_load_admin_bar_css' );
    251251?>
     252 No newline at end of file
  • bp-core/bp-core-avatars.php

     
    4343        if ( !defined( 'BP_AVATAR_DEFAULT_THUMB' ) )
    4444                define( 'BP_AVATAR_DEFAULT_THUMB', BP_PLUGIN_URL . '/bp-core/images/mystery-man-50.jpg' );
    4545}
    46 add_action( 'bp_init', 'bp_core_set_avatar_constants', 3 );
     46add_action( 'bp_init_core', 'bp_core_set_avatar_constants', 3 );
    4747
    4848function bp_core_set_avatar_globals() {
    4949        global $bp;
  • bp-core/bp-core-buddybar.php

     
    623623
    624624        wp_enqueue_style( 'bp-admin-bar-rtl', apply_filters( 'bp_core_buddybar_rtl_css', $stylesheet ), array( 'bp-admin-bar' ), '20110723' );
    625625}
    626 add_action( 'bp_init', 'bp_core_load_buddybar_css' );
     626add_action( 'bp_init_core', 'bp_core_load_buddybar_css' );
    627627?>
     628 No newline at end of file
  • bp-core/bp-core-functions.php

     
    225225
    226226        require ( BP_PLUGIN_DIR . '/bp-core/admin/bp-core-admin.php' );
    227227}
    228 add_action( 'bp_init', 'bp_core_admin_menu_init' );
     228add_action( 'bp_init_core', 'bp_core_admin_menu_init' );
    229229
    230230/**
    231231 * Adds the "BuddyPress" admin submenu item to the Site Admin tab.
     
    867867
    868868        bp_core_redirect( apply_filters( 'bp_core_search_site', home_url( $slug . $query_string . urlencode( $search_terms ) ), $search_terms ) );
    869869}
    870 add_action( 'bp_init', 'bp_core_action_search_site', 7 );
     870add_action( 'bp_init_core', 'bp_core_action_search_site', 7 );
    871871
    872872/**
    873873 * Prints the generation time in the footer of the site.
     
    901901        else
    902902                return false;
    903903}
    904 add_action ( 'bp_init', 'bp_core_load_buddypress_textdomain', 2 );
     904add_action ( 'bp_init_core', 'bp_core_load_buddypress_textdomain', 2 );
    905905
    906906function bp_core_add_ajax_hook() {
    907907        // Theme only, we already have the wp_ajax_ hook firing in wp-admin
    908908        if ( !defined( 'WP_ADMIN' ) && isset( $_REQUEST['action'] ) )
    909909                do_action( 'wp_ajax_' . $_REQUEST['action'] );
    910910}
    911 add_action( 'bp_init', 'bp_core_add_ajax_hook' );
     911add_action( 'bp_init_ajax', 'bp_core_add_ajax_hook' );
    912912
    913913/**
    914914 * Initializes {@link BP_Embed} after everything is loaded.
     
    923923        if ( empty( $bp->embed ) )
    924924                $bp->embed = new BP_Embed();
    925925}
    926 add_action( 'bp_init', 'bp_embed_init', 9 );
     926add_action( 'bp_init_core', 'bp_embed_init', 9 );
    927927
    928928/**
    929929 * When switching from single to multisite we need to copy blog options to
  • bp-core/bp-core-hooks.php

     
    44
    55/** Loaded ********************************************************************/
    66
    7 add_action( 'plugins_loaded', 'bp_loaded',  10 );
     7add_action( 'plugins_loaded', 'bp_loaded',  8 );
    88
    9 add_action( 'bp_loaded',      'bp_include', 2  );
     9add_action( 'bp_loaded',      'bp_include', 2 );
    1010
    11 add_action( 'wp',             'bp_actions', 3  );
     11add_action( 'wp',             'bp_actions', 3 );
    1212
    13 add_action( 'wp',             'bp_screens', 4  );
     13add_action( 'wp',             'bp_screens', 4 );
    1414
    1515/** Init **********************************************************************/
    1616
    1717// Attach bp_init to WordPress init
    18 add_action( 'init',       'bp_init'                    );
     18add_action( 'init',            'bp_init'                  8 );
    1919
    2020// Parse the URI and set globals
    21 add_action( 'bp_init',    'bp_core_set_uri_globals', 2 );
     21add_action( 'bp_init_core',    'bp_core_set_uri_globals', 2 );
    2222
    2323// Setup component globals
    24 add_action( 'bp_init',    'bp_setup_globals',        4 );
     24add_action( 'bp_init_core',    'bp_setup_globals',        4 );
    2525
    2626// Setup the navigation menu
    27 add_action( 'bp_init',    'bp_setup_nav',            7 );
     27add_action( 'bp_init_core',    'bp_setup_nav',            7 );
    2828
    2929// Setup the navigation menu
    30 add_action( 'admin_bar_menu',    'bp_setup_admin_bar'  );
     30add_action( 'admin_bar_menu',  'bp_setup_admin_bar'         );
    3131
    3232// Setup the title
    33 add_action( 'bp_init',    'bp_setup_title',          9 );
     33add_action( 'bp_init_core',    'bp_setup_title',          9 );
    3434
    3535// Setup widgets
    36 add_action( 'bp_loaded',  'bp_setup_widgets'           );
     36add_action( 'bp_loaded',       'bp_setup_widgets'           );
    3737
    3838// Setup admin bar
    39 add_action( 'bp_loaded',  'bp_core_load_admin_bar'     );
     39add_action( 'bp_loaded',       'bp_core_load_admin_bar'     );
    4040
    4141/** The hooks *****************************************************************/
    4242
     
    8484}
    8585
    8686/**
    87  * Initlialize code
     87 * Initialize code
    8888 */
    8989function bp_init() {
     90        do_action( 'bp_init_core' );
    9091        do_action( 'bp_init' );
     92        do_action( 'bp_init_ajax' );
    9193}
    9294
    9395/**
  • bp-friends/bp-friends-actions.php

     
    4141
    4242        return false;
    4343}
    44 add_action( 'bp_init', 'friends_action_add_friend' );
     44add_action( 'bp_init_core', 'friends_action_add_friend' );
    4545
    4646function friends_action_remove_friend() {
    4747        if ( !bp_is_friends_component() || !bp_is_current_action( 'remove-friend' ) )
     
    7676
    7777        return false;
    7878}
    79 add_action( 'bp_init', 'friends_action_remove_friend' );
     79add_action( 'bp_init_core', 'friends_action_remove_friend' );
    8080
    8181?>
     82 No newline at end of file
  • bp-groups/bp-groups-classes.php

     
    12861286                return false;
    12871287
    12881288        /* Register the group extension on the bp_init action so we have access to all plugins */
    1289         add_action( 'bp_init', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "bp_actions", array( &$extension, "_register" ), 8 );' ), 11 );
     1289        add_action( 'bp_init_core', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "bp_actions", array( &$extension, "_register" ), 8 );' ), 11 );
    12901290}
    12911291
    12921292?>
     1293 No newline at end of file
  • bp-members/bp-members-signup.php

     
    610610        if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) )
    611611                bp_core_redirect( bp_get_signup_page() );
    612612}
    613 add_action( 'bp_init', 'bp_core_wpsignup_redirect' );
     613add_action( 'bp_init_core', 'bp_core_wpsignup_redirect' );
    614614?>
     615 No newline at end of file