[wp-trac] [WordPress Trac] #33552: Facilitate plugins to override Customizer features
WordPress Trac
noreply at wordpress.org
Thu Jan 7 04:53:08 UTC 2016
#33552: Facilitate plugins to override Customizer features
-------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.4
Component: Customize | Version: 3.9
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses:
-------------------------+--------------------------
Changes (by westonruter):
* keywords: has-patch dev-feedback => has-patch
Comment:
With [35307], nav menus can be removed from the Customizer via:
{{{#!php
<?php
add_filter( 'customize_loaded_components', function ( $components ) {
return array_filter( $components, function ( $component ) {
return 'nav_menus' !== $component;
} );
} );
}}}
Similarly, widgets can be removed from the Customizer via:
{{{#!php
<?php
add_filter( 'customize_loaded_components', function ( $components ) {
return array_filter( $components, function ( $component ) {
return 'widgets' !== $component;
} );
} );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33552#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list