WordPress.org

Make WordPress Core

Ticket #48347: 48347.diff

File 48347.diff, 4.4 KB (added by tmanoilov, 2 years ago)
  • src/wp-includes/class-wp-customize-manager.php

    diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
    index 36b9c7bea1..461d2ac6da 100644
    a b final class WP_Customize_Manager { 
    36753675         *
    36763676         * @since 3.4.0
    36773677         * @since 4.5.0 Return added WP_Customize_Setting instance.
     3678         * @see WP_Customize_Setting::__construct()
    36783679         *
    36793680         * @param WP_Customize_Setting|string $id   Customize Setting object, or ID.
    3680          * @param array                       $args {
    3681          *  Optional. Array of properties for the new WP_Customize_Setting. Default empty array.
    3682          *
    3683          *  @type string       $type                  Type of the setting. Default 'theme_mod'.
    3684          *  @type string       $capability            Capability required for the setting. Default 'edit_theme_options'
    3685          *  @type string|array $theme_supports        Theme features required to support the panel. Default is none.
    3686          *  @type string       $default               Default value for the setting. Default is empty string.
    3687          *  @type string       $transport             Options for rendering the live preview of changes in Customizer.
    3688          *                                            Using 'refresh' makes the change visible by reloading the whole preview.
    3689          *                                            Using 'postMessage' allows a custom JavaScript to handle live changes.
    3690          * @link https://developer.wordpress.org/themes/customize-api
    3691          *                                            Default is 'refresh'
    3692          *  @type callable     $validate_callback     Server-side validation callback for the setting's value.
    3693          *  @type callable     $sanitize_callback     Callback to filter a Customize setting value in un-slashed form.
    3694          *  @type callable     $sanitize_js_callback  Callback to convert a Customize PHP setting value to a value that is
    3695          *                                            JSON serializable.
    3696          *  @type bool         $dirty                 Whether or not the setting is initially dirty when created.
    3697          * }
     3681         * @param array                       $args Setting arguments.
    36983682         * @return WP_Customize_Setting             The instance of the setting that was added.
    36993683         */
    37003684        public function add_setting( $id, $args = array() ) {
  • src/wp-includes/class-wp-customize-setting.php

    diff --git a/src/wp-includes/class-wp-customize-setting.php b/src/wp-includes/class-wp-customize-setting.php
    index 08d5b1c348..43b33070b5 100644
    a b class WP_Customize_Setting { 
    157157         * @param WP_Customize_Manager $manager
    158158         * @param string               $id      An specific ID of the setting. Can be a
    159159         *                                      theme mod or option name.
    160          * @param array                $args    Setting arguments.
     160         * @param array                $args {
     161         *  Optional. Array of properties for the new WP_Customize_Setting. Default empty array.
     162         *
     163         *  @type string       $type                  Type of the setting. Default 'theme_mod'.
     164         *  @type string       $capability            Capability required for the setting. Default 'edit_theme_options'
     165         *  @type string|array $theme_supports        Theme features required to support the panel. Default is none.
     166         *  @type string       $default               Default value for the setting. Default is empty string.
     167         *  @type string       $transport             Options for rendering the live preview of changes in Customizer.
     168         *                                            Using 'refresh' makes the change visible by reloading the whole preview.
     169         *                                            Using 'postMessage' allows a custom JavaScript to handle live changes.
     170         * @link https://developer.wordpress.org/themes/customize-api
     171         *                                            Default is 'refresh'
     172         *  @type callable     $validate_callback     Server-side validation callback for the setting's value.
     173         *  @type callable     $sanitize_callback     Callback to filter a Customize setting value in un-slashed form.
     174         *  @type callable     $sanitize_js_callback  Callback to convert a Customize PHP setting value to a value that is
     175         *                                            JSON serializable.
     176         *  @type bool         $dirty                 Whether or not the setting is initially dirty when created.
     177         * }
    161178         */
    162179        public function __construct( $manager, $id, $args = array() ) {
    163180                $keys = array_keys( get_object_vars( $this ) );