[wp-trac] [WordPress Trac] #30805: Twentyfourteen: bug in functions.php registering the sidebar
WordPress Trac
noreply at wordpress.org
Sun Dec 21 10:29:15 UTC 2014
#30805: Twentyfourteen: bug in functions.php registering the sidebar
--------------------------+-----------------------------
Reporter: fmarzocca | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
It is not possibile to unregister the twentyfourteen sidebar in a child
theme, due to the fact that in the main functions.php the sidebar
registration has no priority.
After I dig for while in the theme files I found out that in the theme
functions.php there is no defined priority for the sidebars registration
on line 198, it looks like this:
{{{
add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
}}}
and should look something like this:
{{{
add_action( 'widgets_init', 'twentyfourteen_widgets_init', 10 );
}}}
What all that means is that my code being in child theme is called before
the code in the main theme functions.php and I unregister the sidebar, but
then the main theme register it.
There is no priority I could assign to my unregister_sidebar as in this
case it is missing in the parent theme.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30805>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list