[wp-trac] [WordPress Trac] #37355: remove_settings_section() counterpart to add_settings_section()

WordPress Trac noreply at wordpress.org
Wed Jul 13 13:52:19 UTC 2016


#37355: remove_settings_section() counterpart to add_settings_section()
--------------------------------+-----------------------------
 Reporter:  stephenharris       |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Options, Meta APIs  |    Version:  trunk
 Severity:  normal              |   Keywords:
  Focuses:                      |
--------------------------------+-----------------------------
 The settings API allows for settings sections to be added, but not
 removed.

 To remove section you have to do the following

 {{{#!php
 <?php
 global $wp_settings_sections;
 unset( $wp_settings_sections[$page][$id] )
 }}}

 To avoid accessing globals directly this should be wrapped inside a
 function.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37355>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list