[wp-trac] [WordPress Trac] #44976: Proposal to add deregister_control_type(), deregister_panel_type() and deregister_section_type() methods to WP_Customize_Manager

WordPress Trac noreply at wordpress.org
Sun Sep 23 06:00:06 UTC 2018


#44976: Proposal to add deregister_control_type(), deregister_panel_type() and
deregister_section_type() methods 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 needs-testing dev-         |     Focuses:
  feedback                                       |  accessibility
-------------------------------------------------+-------------------------

Comment (by mukesh27):

 @westonruter Yes that is one option to remove that core action. In core
 file this action {{{ add_action( 'wp_loaded',   array( $this, 'wp_loaded'
 ) ); }}} is added to register panel, section and control types but if we
 remove this action it will remove all core types like panel, section and
 control.

 As per this ticket @Collizo4sky said that in core we need to add an option
 to remove any core type not all so any end user can remove core types as
 per there needs and it is good idea to add this feature in core. what is
 your thought on this?

 When we remove {{{ wp_loaded }}} action then it show one notice {{{
 Notice: Trying to get property 'title' of non-object in <b>C:\wordpress-
 meta\wp-includes\class-wp-customize-nav-menus.php on line 446 }}} so don't
 think it is good way to remove core action as it create errors in some
 code.

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


More information about the wp-trac mailing list