[wp-trac] [WordPress Trac] #44976: Proposal to add deregister_control_type() method to WP_Customize_Manager

WordPress Trac noreply at wordpress.org
Fri Sep 21 09:34:13 UTC 2018


#44976: Proposal to add deregister_control_type() method to WP_Customize_Manager
-------------------------------------------------+-------------------------
 Reporter:  Collizo4sky                          |       Owner:  (none)
     Type:  enhancement                          |      Status:  assigned
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Customize                            |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch 2nd-opinion reporter-      |     Focuses:
  feedback                                       |
-------------------------------------------------+-------------------------

Comment (by Collizo4sky):

 Replying to [comment:2 mukesh27]:
 remove_control() removes a control and not the control type. These are two
 different thing. Ask yourself, why do we have to register a control type
 when we already have add_control()

 A control and control type are two different concept.

 The former is what is shown on customizer and the latter is the php Class
 definition of the control.

 > @Collizo4sky, remove_control already remove the control for customizer
 so why we need other function for same functionality?
 >
 > {{{#!php
 > <?php
 > public function remove_control( $id ) {
 >     unset( $this->controls[ $id ] );
 > }
 > }}}

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


More information about the wp-trac mailing list