[wp-trac] [WordPress Trac] #32772: Filter for disabling Customizer

WordPress Trac noreply at wordpress.org
Fri Nov 25 18:54:17 UTC 2016


#32772: Filter for disabling Customizer
---------------------------+-----------------------------
 Reporter:  hereswhatidid  |       Owner:
     Type:  enhancement    |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Customize      |     Version:  4.3
 Severity:  normal         |  Resolution:  invalid
 Keywords:                 |     Focuses:  administration
---------------------------+-----------------------------

Comment (by senlin):

 Replying to [comment:6 Viper007Bond]:
 > And modifying capabilities is not difficult (and there might even be a
 better way than this):
 >
 > {{{
 > add_filter( 'user_has_cap' , function( $allcaps ) {
 >       unset( $allcaps['edit_theme_options'] );
 >       return $allcaps;
 > } );
 > }}}
 >

 Not only does that filter disable the Customizer, it also wipes out the
 Menu and Widgets pages, bit too extreme, no?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32772#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list