Remove the code that alters the wp_admin_bar_render hooks.#208
Merged
thomasgriffin merged 1 commit intoTGMPA:masterfrom Aug 7, 2014
johnbillion:admin-bar
Merged
Remove the code that alters the wp_admin_bar_render hooks.#208thomasgriffin merged 1 commit intoTGMPA:masterfrom johnbillion:admin-bar
wp_admin_bar_render hooks.#208thomasgriffin merged 1 commit intoTGMPA:masterfrom
johnbillion:admin-bar
Conversation
justinticktock
pushed a commit
to justinticktock/role-based-help-notes
that referenced
this pull request
Jul 3, 2014
OK this is a bug in that plugin activation class. I opened a pull request here: TGMPA/TGM-Plugin-Activation#208 Marking this thread as resolved as it's not a User Switching issue.
thomasgriffin
added a commit
that referenced
this pull request
Aug 7, 2014
Remove the code that alters the `wp_admin_bar_render` hooks.
Contributor
|
Thanks for the PR. Merged! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The code that alters the hooks for the admin bar is redundant and causes the admin bar to be processed twice on the "Install Required Plugins" screen.
The following two lines are erroneous because
wp_admin_bar_renderhasn't been hooked toadmin_footersince WordPress 3.4 (Trac ticket #20161).remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 );add_action( 'admin_head', 'wp_admin_bar_render', 1000 );This causes
wp_admin_bar_renderto be hooked twice, once on the defaultin_admin_headerand once onadmin_head. The net effect is that the admin bar is processed twice, which causes breakage. An example of this in the wild is my User Switching plugin which throws a notice on this screen due to the node it hooks onto not being available.Additionally, the following two lines achieve nothing because we're in the admin area so they can be removed too:
remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );add_action( 'wp_head', 'wp_admin_bar_render', 1000 );