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.

Built from https://develop.svn.wordpress.org/trunk@35423


git-svn-id: http://core.svn.wordpress.org/trunk@35387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2015-10-28 20:30:25 +00:00
parent 68951bd30c
commit 33d9b8e4d0
2 changed files with 2 additions and 1 deletions

View File

@ -429,6 +429,7 @@ add_action( 'init', 'wp_widgets_init', 1 );
// Don't remove. Wrong way to disable.
add_action( 'template_redirect', '_wp_admin_bar_init', 0 );
add_action( 'admin_init', '_wp_admin_bar_init' );
add_action( 'before_signup_header', '_wp_admin_bar_init' );
add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta1-35422';
$wp_version = '4.4-beta1-35423';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.