WordPress.org

Make WordPress Core

Ticket #44976: 44976.patch

File 44976.patch, 1.8 KB (added by mukesh27, 16 months ago)

New working patch with thee new functions.

  • wordpress/wp-includes/class-wp-customize-manager.php

    diff -Naur wordpress/wp-includes/class-wp-customize-manager.php wordpress/wp-includes/class-wp-customize-manager.php
     
    37863786        }
    37873787
    37883788        /**
     3789         * Deregister a customize panel type.
     3790         *
     3791         * @see WP_Customize_Panel
     3792         *
     3793         * @param string $panel Name of a custom panel which is a subclass of WP_Customize_Panel.
     3794         */
     3795        public function deregister_panel_type( $panel ) {
     3796                if ( ( $key = array_search( $panel, $this->registered_panel_types ) ) !== false ) {
     3797                    unset( $this->registered_panel_types[ $key ] );
     3798                }
     3799        }
     3800
     3801        /**
    37893802         * Render JS templates for all registered panel types.
    37903803         *
    37913804         * @since 4.3.0
     
    38703883        }
    38713884
    38723885        /**
     3886         * Deregister a customize section type.
     3887         *
     3888         * @see WP_Customize_Section
     3889         *
     3890         * @param string $section Name of a custom section which is a subclass of WP_Customize_Section.
     3891         */
     3892        public function deregister_section_type( $section ) {
     3893                if ( ( $key = array_search( $section, $this->registered_section_types ) ) !== false ) {
     3894                    unset( $this->registered_section_types[ $key ] );
     3895                }
     3896        }
     3897
     3898        /**
    38733899         * Render JS templates for all registered section types.
    38743900         *
    38753901         * @since 4.3.0
     
    39603986        }
    39613987
    39623988        /**
     3989     * Deregister a customize control type.
     3990     *
     3991     * @param string $control Name of a custom control which is a subclass of
     3992     *                        WP_Customize_Control.
     3993     */
     3994        public function deregister_control_type( $control ) {
     3995                if ( ( $key = array_search( $control, $this->registered_control_types ) ) !== false ) {
     3996                    unset( $this->registered_control_types[ $key ] );
     3997                }
     3998        }
     3999
     4000        /**
    39634001         * Render JS templates for all registered control types.
    39644002         *
    39654003         * @since 4.1.0