Make WordPress Core

Changeset 35423


Ignore:
Timestamp:
10/28/2015 08:29:19 PM (9 years ago)
Author:
DrewAPicture
Message:

Multisite: Restore displaying the Toolbar on wp-signup.php while logged-in.

Prior to [23512], the Toolbar was still displayed on wp-signup.php while logged-in because it was hooked to the init action. When _wp_admin_bar_init() was moved to instead fire on template_redirect for the front-end and admin_init on the back-end, the visibility was lost because template_redirect isn't fired on wp-signup.php due to WP_USE_THEMES not being defined.

In order to maintain expected display results, a default filter has been added to hook _wp_admin_bar_init() to the before_signup_header action. This approach has the added benefit of allowing _wp_admin_bar_init() to be fired prior to the wp_head action where _admin_bar_bump_cb() is called (or the callback defined when 'admin-bar' theme support is added).

Fixes #34418.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-filters.php

    r35395 r35423  
    430430add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
    431431add_action( 'admin_init', '_wp_admin_bar_init' );
     432add_action( 'before_signup_header', '_wp_admin_bar_init' );
    432433add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
    433434add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );
Note: See TracChangeset for help on using the changeset viewer.