Make WordPress Core

Ticket #48747: 48747.diff

File 48747.diff, 1.8 KB (added by dlh, 5 years ago)
  • src/wp-includes/class-wp-customize-manager.php

    diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
    index decf0b87cf..e697043606 100644
    final class WP_Customize_Manager { 
    37963796         * @since 3.4.0
    37973797         *
    37983798         * @param string $id Customize Setting ID.
     3799         * @return WP_Customize_Setting|null The removed setting object, if any.
    37993800         */
    38003801        public function remove_setting( $id ) {
     3802                $setting = $this->get_setting( $id );
    38013803                unset( $this->settings[ $id ] );
     3804                return $setting;
    38023805        }
    38033806
    38043807        /**
    final class WP_Customize_Manager { 
    38523855         * @since 4.0.0
    38533856         *
    38543857         * @param string $id Panel ID to remove.
     3858         * @return WP_Customize_Panel|null The removed panel object, if any.
    38553859         */
    38563860        public function remove_panel( $id ) {
    38573861                // Removing core components this way is _doing_it_wrong().
    final class WP_Customize_Manager { 
    38653869
    38663870                        _doing_it_wrong( __METHOD__, $message, '4.5.0' );
    38673871                }
     3872
     3873                $panel = $this->get_panel( $id );
    38683874                unset( $this->panels[ $id ] );
     3875                return $panel;
    38693876        }
    38703877
    38713878        /**
    final class WP_Customize_Manager { 
    39483955         * @since 3.4.0
    39493956         *
    39503957         * @param string $id Section ID.
     3958         * @return WP_Customize_Section|null The removed section object, if any.
    39513959         */
    39523960        public function remove_section( $id ) {
     3961                $section = $this->get_section( $id );
    39533962                unset( $this->sections[ $id ] );
     3963                return $section;
    39543964        }
    39553965
    39563966        /**
    final class WP_Customize_Manager { 
    40404050         * @since 3.4.0
    40414051         *
    40424052         * @param string $id ID of the control.
     4053         * @return WP_Customize_Control|null The removed control object, if any.
    40434054         */
    40444055        public function remove_control( $id ) {
     4056                $control = $this->get_control( $id );
    40454057                unset( $this->controls[ $id ] );
     4058                return $control;
    40464059        }
    40474060
    40484061        /**