Make WordPress Core


Ignore:
Timestamp:
07/25/2020 07:38:34 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Add a reference to WP_Customize_Partial::__construct() for information on accepted arguments in WP_Customize_Selective_Refresh::add_partial().

Synchronize the documentation between two places, use WP_Customize_Partial::__construct() as the canonical source.

Props marekdedic.
See #49572.

File:
1 edited

Legend:

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

    r48111 r48617  
    8484     * @since 4.5.0
    8585     *
    86      * @param WP_Customize_Partial|string $id   Customize Partial object, or Panel ID.
    87      * @param array                       $args {
    88      *  Optional. Array of properties for the new Partials object. Default empty array.
    89      *
    90      *  @type string   $type                  Type of the partial to be created.
    91      *  @type string   $selector              The jQuery selector to find the container element for the partial, that is, a partial's placement.
    92      *  @type array    $settings              IDs for settings tied to the partial.
    93      *  @type string   $primary_setting       The ID for the setting that this partial is primarily responsible for
    94      *                                        rendering. If not supplied, it will default to the ID of the first setting.
    95      *  @type string   $capability            Capability required to edit this partial.
    96      *                                        Normally this is empty and the capability is derived from the capabilities
    97      *                                        of the associated `$settings`.
    98      *  @type callable $render_callback       Render callback.
    99      *                                        Callback is called with one argument, the instance of WP_Customize_Partial.
    100      *                                        The callback can either echo the partial or return the partial as a string,
    101      *                                        or return false if error.
    102      *  @type bool     $container_inclusive   Whether the container element is included in the partial, or if only
    103      *                                        the contents are rendered.
    104      *  @type bool     $fallback_refresh      Whether to refresh the entire preview in case a partial cannot be refreshed.
    105      *                                        A partial render is considered a failure if the render_callback returns
    106      *                                        false.
    107      * }
    108      * @return WP_Customize_Partial             The instance of the panel that was added.
     86     * @see WP_Customize_Partial::__construct()
     87     *
     88     * @param WP_Customize_Partial|string $id   Customize Partial object, or Partial ID.
     89     * @param array                       $args Optional. Array of properties for the new Partials object.
     90     *                                          See WP_Customize_Partial::__construct() for information
     91     *                                          on accepted arguments. Default empty array.
     92     * @return WP_Customize_Partial The instance of the partial that was added.
    10993     */
    11094    public function add_partial( $id, $args = array() ) {
Note: See TracChangeset for help on using the changeset viewer.