From f4bba7cf95b71cd352138cbc93f1dc5aae77cba3 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 28 Oct 2015 20:29:19 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@35423 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/default-filters.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index f6999cbb4b..0bda80e1f4 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -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 );