Make WordPress Core


Ignore:
Timestamp:
02/27/2020 08:21:35 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify the type of theme_supports argument in various Customizer classes.

Props marekdedic.
See #48347.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-setting.php

    r47384 r47385  
    5252
    5353    /**
    54      * Feature a theme is required to support to enable this setting.
    55      *
    56      * @since 3.4.0
    57      * @var string
     54     * Theme features required to support the setting.
     55     *
     56     * @since 3.4.0
     57     * @var string|string[]
    5858     */
    5959    public $theme_supports = '';
     
    158158     *                                      Can be a theme mod or option name.
    159159     * @param array                $args    {
    160      *  Optional. Array of properties for the new Setting object. Default empty array.
    161      *
    162      *  @type string       $type                  Type of the setting. Default 'theme_mod'.
    163      *  @type string       $capability            Capability required for the setting. Default 'edit_theme_options'
    164      *  @type string|array $theme_supports        Theme features required to support the panel. Default is none.
    165      *  @type string       $default               Default value for the setting. Default is empty string.
    166      *  @type string       $transport             Options for rendering the live preview of changes in Customizer.
    167      *                                            Using 'refresh' makes the change visible by reloading the whole preview.
    168      *                                            Using 'postMessage' allows a custom JavaScript to handle live changes.
    169      *                                            Default is 'refresh'.
    170      *  @type callable     $validate_callback     Server-side validation callback for the setting's value.
    171      *  @type callable     $sanitize_callback     Callback to filter a Customize setting value in un-slashed form.
    172      *  @type callable     $sanitize_js_callback Callback to convert a Customize PHP setting value to a value that is
    173      *                                            JSON serializable.
    174      *  @type bool         $dirty                 Whether or not the setting is initially dirty when created.
     160     *     Optional. Array of properties for the new Setting object. Default empty array.
     161     *
     162     *     @type string          $type                 Type of the setting. Default 'theme_mod'.
     163     *     @type string          $capability           Capability required for the setting. Default 'edit_theme_options'
     164     *     @type string|string[] $theme_supports       Theme features required to support the panel. Default is none.
     165     *     @type string          $default              Default value for the setting. Default is empty string.
     166     *     @type string          $transport            Options for rendering the live preview of changes in Customizer.
     167     *                                                 Using 'refresh' makes the change visible by reloading the whole preview.
     168     *                                                 Using 'postMessage' allows a custom JavaScript to handle live changes.
     169     *                                                 Default is 'refresh'.
     170     *     @type callable        $validate_callback    Server-side validation callback for the setting's value.
     171     *     @type callable        $sanitize_callback    Callback to filter a Customize setting value in un-slashed form.
     172     *     @type callable        $sanitize_js_callback Callback to convert a Customize PHP setting value to a value that is
     173     *                                                 JSON serializable.
     174     *     @type bool            $dirty                Whether or not the setting is initially dirty when created.
    175175     * }
    176176     */
Note: See TracChangeset for help on using the changeset viewer.