Make WordPress Core

Changeset 47385


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.

Location:
trunk/src/wp-includes
Files:
4 edited

Legend:

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

    r47384 r47385  
    38043804         * @param WP_Customize_Panel|string $id   Customize Panel object, or Panel ID.
    38053805         * @param array                     $args {
    3806          *  Optional. Array of properties for the new Panel object. Default empty array.
    3807          *  @type int          $priority              Priority of the panel, defining the display order of panels and sections.
    3808          *                                            Default 160.
    3809          *  @type string       $capability            Capability required for the panel. Default `edit_theme_options`
    3810          *  @type string|array $theme_supports        Theme features required to support the panel.
    3811          *  @type string       $title                 Title of the panel to show in UI.
    3812          *  @type string       $description           Description to show in the UI.
    3813          *  @type string       $type                  Type of the panel.
    3814          *  @type callable     $active_callback       Active callback.
     3806         *     Optional. Array of properties for the new Panel object. Default empty array.
     3807         *
     3808         *     @type int             $priority        Priority of the panel, defining the display order
     3809         *                                            of panels and sections. Default 160.
     3810         *     @type string          $capability      Capability required for the panel.
     3811         *                                            Default `edit_theme_options`.
     3812         *     @type string|string[] $theme_supports  Theme features required to support the panel.
     3813         *     @type string          $title           Title of the panel to show in UI.
     3814         *     @type string          $description     Description to show in the UI.
     3815         *     @type string          $type            Type of the panel.
     3816         *     @type callable        $active_callback Active callback.
    38153817         * }
    38163818         * @return WP_Customize_Panel The instance of the panel that was added.
     
    39013903         * @param array                     $args {
    39023904         *  Optional. Array of properties for the new Section object. Default empty array.
    3903          *  @type int          $priority              Priority of the section, defining the display order of panels and sections.
    3904          *                                            Default 160.
    3905          *  @type string       $panel                 The panel this section belongs to (if any). Default empty.
    3906          *  @type string       $capability            Capability required for the section. Default 'edit_theme_options'
    3907          *  @type string|array $theme_supports        Theme features required to support the section.
    3908          *  @type string       $title                 Title of the section to show in UI.
    3909          *  @type string       $description           Description to show in the UI.
    3910          *  @type string       $type                  Type of the section.
    3911          *  @type callable     $active_callback       Active callback.
    3912          *  @type bool         $description_hidden    Hide the description behind a help icon, instead of inline above the first control. Default false.
     3905         *
     3906         *     @type int             $priority           Priority of the section, defining the display order
     3907         *                                               of panels and sections. Default 160.
     3908         *     @type string          $panel              The panel this section belongs to (if any).
     3909         *                                               Default empty.
     3910         *     @type string          $capability         Capability required for the section.
     3911         *                                               Default 'edit_theme_options'
     3912         *     @type string|string[] $theme_supports     Theme features required to support the section.
     3913         *     @type string          $title              Title of the section to show in UI.
     3914         *     @type string          $description        Description to show in the UI.
     3915         *     @type string          $type               Type of the section.
     3916         *     @type callable        $active_callback    Active callback.
     3917         *     @type bool            $description_hidden Hide the description behind a help icon,
     3918         *                                               instead of inline above the first control.
     3919         *                                               Default false.
    39133920         * }
    39143921         * @return WP_Customize_Section The instance of the section that was added.
  • trunk/src/wp-includes/class-wp-customize-panel.php

    r47383 r47385  
    7070
    7171        /**
    72          * Theme feature support for the panel.
    73          *
    74          * @since 4.0.0
    75          * @var string|array
     72         * Theme features required to support the panel.
     73         *
     74         * @since 4.0.0
     75         * @var string|string[]
    7676         */
    7777        public $theme_supports = '';
  • trunk/src/wp-includes/class-wp-customize-section.php

    r47383 r47385  
    7878
    7979        /**
    80          * Theme feature support for the section.
    81          *
    82          * @since 3.4.0
    83          * @var string|array
     80         * Theme features required to support the section.
     81         *
     82         * @since 3.4.0
     83         * @var string|string[]
    8484         */
    8585        public $theme_supports = '';
  • 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.