Make WordPress Core


Ignore:
Timestamp:
05/19/2017 08:24:58 PM (7 years ago)
Author:
westonruter
Message:

Docs: Improve phpdoc for WP_Customize_Manager, WP_Customize_Control, WP_Customize_Setting, and WP_Customize_Selective_Refresh.

Props 4nickpick, sagarprajapati, ketuchetan, BharatKambariya, mrahmadawais, westonruter.
Fixes #39671.

File:
1 edited

Legend:

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

    r40704 r40804  
    28112811     * @since 3.4.0
    28122812     * @since 4.5.0 Return added WP_Customize_Setting instance.
    2813      * @access public
    28142813     *
    28152814     * @param WP_Customize_Setting|string $id   Customize Setting object, or ID.
    2816      * @param array                       $args Setting arguments; passed to WP_Customize_Setting
    2817      *                                          constructor.
     2815     * @param array                       $args {
     2816     *  Optional. Array of properties for the new WP_Customize_Setting. Default empty array.
     2817     *
     2818     *  @type string       $type                  Type of the setting. Default 'theme_mod'.
     2819     *                                            Default 160.
     2820     *  @type string       $capability            Capability required for the setting. Default 'edit_theme_options'
     2821     *  @type string|array $theme_supports        Theme features required to support the panel. Default is none.
     2822     *  @type string       $default               Default value for the setting. Default is empty string.
     2823     *  @type string       $transport             Options for rendering the live preview of changes in Theme Customizer.
     2824     *                                            Using 'refresh' makes the change visible by reloading the whole preview.
     2825     *                                            Using 'postMessage' allows a custom JavaScript to handle live changes.
     2826     *                                            @link https://developer.wordpress.org/themes/customize-api
     2827     *                                            Default is 'refresh'
     2828     *  @type callable     $validate_callback     Server-side validation callback for the setting's value.
     2829     *  @type callable     $sanitize_callback     Callback to filter a Customize setting value in un-slashed form.
     2830     *  @type callable     $sanitize_js_callback  Callback to convert a Customize PHP setting value to a value that is
     2831     *                                            JSON serializable.
     2832     *  @type bool         $dirty                 Whether or not the setting is initially dirty when created.
     2833     * }
    28182834     * @return WP_Customize_Setting             The instance of the setting that was added.
    28192835     */
     
    29292945     * @since 4.0.0
    29302946     * @since 4.5.0 Return added WP_Customize_Panel instance.
    2931      * @access public
    29322947     *
    29332948     * @param WP_Customize_Panel|string $id   Customize Panel object, or Panel ID.
    2934      * @param array                     $args Optional. Panel arguments. Default empty array.
    2935      *
     2949     * @param array                     $args {
     2950     *  Optional. Array of properties for the new Panel object. Default empty array.
     2951     *  @type int          $priority              Priority of the panel, defining the display order of panels and sections.
     2952     *                                            Default 160.
     2953     *  @type string       $capability            Capability required for the panel. Default `edit_theme_options`
     2954     *  @type string|array $theme_supports        Theme features required to support the panel.
     2955     *  @type string       $title                 Title of the panel to show in UI.
     2956     *  @type string       $description           Description to show in the UI.
     2957     *  @type string       $type                  Type of the panel.
     2958     *  @type callable     $active_callback       Active callback.
     2959     * }
    29362960     * @return WP_Customize_Panel             The instance of the panel that was added.
    29372961     */
     
    30213045     *
    30223046     * @param WP_Customize_Section|string $id   Customize Section object, or Section ID.
    3023      * @param array                       $args Section arguments.
    3024      *
     3047     * @param array                     $args {
     3048     *  Optional. Array of properties for the new Panel object. Default empty array.
     3049     *  @type int          $priority              Priority of the panel, defining the display order of panels and sections.
     3050     *                                            Default 160.
     3051     *  @type string       $panel                 Priority of the panel, defining the display order of panels and sections.
     3052     *  @type string       $capability            Capability required for the panel. Default 'edit_theme_options'
     3053     *  @type string|array $theme_supports        Theme features required to support the panel.
     3054     *  @type string       $title                 Title of the panel to show in UI.
     3055     *  @type string       $description           Description to show in the UI.
     3056     *  @type string       $type                  Type of the panel.
     3057     *  @type callable     $active_callback       Active callback.
     3058     *  @type bool         $description_hidden    Hide the description behind a help icon, instead of . Default false.
     3059     * }
    30253060     * @return WP_Customize_Section             The instance of the section that was added.
    30263061     */
     
    30973132     *
    30983133     * @param WP_Customize_Control|string $id   Customize Control object, or ID.
    3099      * @param array                       $args Control arguments; passed to WP_Customize_Control
    3100      *                                          constructor.
     3134     * @param array                       $args {
     3135     *  Optional. Array of properties for the new Control object. Default empty array.
     3136     *
     3137     *  @type array        $settings              All settings tied to the control. If undefined, defaults to `$setting`.
     3138     *                                            IDs in the array correspond to the ID of a registered `WP_Customize_Setting`.
     3139     *  @type string       $setting               The primary setting for the control (if there is one). Default is 'default'.
     3140     *  @type string       $capability            Capability required to use this control. Normally derived from `$settings`.
     3141     *  @type int          $priority              Order priority to load the control. Default 10.
     3142     *  @type string       $section               The section this control belongs to. Default empty.
     3143     *  @type string       $label                 Label for the control. Default empty.
     3144     *  @type string       $description           Description for the control. Default empty.
     3145     *  @type array        $choices               List of choices for 'radio' or 'select' type controls, where values
     3146     *                                            are the keys, and labels are the values. Default empty array.
     3147     *  @type array        $input_attrs           List of custom input attributes for control output, where attribute
     3148     *                                            names are the keys and values are the values. Default empty array.
     3149     *  @type bool         $allow_addition        Show UI for adding new content, currently only used for the
     3150     *                                            dropdown-pages control. Default false.
     3151     *  @type string       $type                  The type of the control. Default 'text'.
     3152     *  @type callback     $active_callback       Active callback.
     3153     * }
    31013154     * @return WP_Customize_Control             The instance of the control that was added.
    31023155     */
     
    34973550     *
    34983551     * @since 4.5.0
     3552     *
    34993553     * @return array Nonces.
    35003554     */
     
    36373691     * Returns a list of devices to allow previewing.
    36383692     *
    3639      * @access public
    36403693     * @since 4.5.0
    36413694     *
     
    41894242     * Used as active callback for static front page section and controls.
    41904243     *
    4191      * @access private
    41924244     * @since 4.7.0
    41934245     *
     
    42464298     *
    42474299     * @since 4.7.0
    4248      * @access private
    42494300     *
    42504301     * @param string $value Repeat value.
     
    43804431     *
    43814432     * @since 4.5.0
    4382      * @access private
    43834433     *
    43844434     * @return string Custom logo.
Note: See TracChangeset for help on using the changeset viewer.