Changeset 36262
- Timestamp:
- 01/11/2016 08:27:40 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-customize-manager.php
r36261 r36262 93 93 */ 94 94 protected $panels = array(); 95 96 /** 97 * List of core components. 98 * 99 * @since 4.5.0 100 * @access protected 101 * @var array 102 */ 103 protected $components = array( 'widgets', 'nav_menus' ); 95 104 96 105 /** … … 239 248 * @param WP_Customize_Manager $this WP_Customize_Manager instance. 240 249 */ 241 $components = apply_filters( 'customize_loaded_components', array( 'widgets', 'nav_menus' ), $this );250 $components = apply_filters( 'customize_loaded_components', $this->components, $this ); 242 251 243 252 if ( in_array( 'widgets', $components ) ) { … … 1199 1208 */ 1200 1209 public function remove_panel( $id ) { 1201 $core_panels = array( 1202 'widgets', 1203 'nav_menus', 1204 ); 1205 1206 if ( in_array( $id, $core_panels, true ) ) { 1210 // Removing core components this way is _doing_it_wrong(). 1211 if ( in_array( $id, $this->components, true ) ) { 1207 1212 /* translators: 1: panel id, 2: filter reference URL, 3: filter name */ 1208 1213 $message = sprintf( __( 'Removing %1$s manually will cause PHP warnings. Use the <a href="%2$s">%3$s</a> filter instead.' ),
Note: See TracChangeset
for help on using the changeset viewer.