[wp-trac] [WordPress Trac] #21761: Hide Appearance > Widgets menu when no sidebars are registered
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 1 21:43:47 UTC 2012
#21761: Hide Appearance > Widgets menu when no sidebars are registered
-------------------------+------------------
Reporter: sabreuse | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.5
Component: UI | Version:
Severity: normal | Resolution:
Keywords: needs-patch |
-------------------------+------------------
Comment (by greenshady):
I can confirm that as well. I should've checked that one can actually use
widgets with the patches. This is because this the
`wp_maybe_load_widgets` function is hooked to `plugins_loaded`:
{{{
add_action( 'plugins_loaded', 'wp_maybe_load_widgets', 0 );
}}}
That's too early for themes to control. I'm not sure if there are any
plugins that this will affect if changed to a different hook.
Without testing, my guess is that it'd need to move to something like:
{{{
add_action( 'widgets_init', 'wp_maybe_load_widgets', 99 );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21761#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list