WordPress.org

Make WordPress Core

Ticket #35242: 35242(1).diff

File 35242(1).diff, 846 bytes (added by voldemortensen, 4 years ago)
  • src/wp-includes/class-wp-customize-manager.php

     
    11981198         * @param string $id Panel ID to remove.
    11991199         */
    12001200        public function remove_panel( $id ) {
     1201                $core_panels = array(
     1202                        'widgets',
     1203                        'nav_menus',
     1204                );
     1205                if ( in_array( $id, $core_panels ) ) {
     1206                        _doing_it_wrong( 'WP_Customize_Manager::remove_panel', sprintf( 'Removing %s with remove_panel will cause PHP warnings. Use the customize_manager_contruct action instead. See %s.', $id, '<a href="https://core.trac.wordpress.org/ticket/33552#comment:8">https://core.trac.wordpress.org/ticket/33552#comment:8</a>' ), '4.5' );
     1207                }
    12011208                unset( $this->panels[ $id ] );
    12021209        }
    12031210