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. Built from https://develop.svn.wordpress.org/trunk@48617 git-svn-id: http://core.svn.wordpress.org/trunk@48379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c40a645510
commit
c88c8db417
@ -68,7 +68,7 @@ class WP_Customize_Partial {
|
|||||||
* IDs for settings tied to the partial.
|
* IDs for settings tied to the partial.
|
||||||
*
|
*
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
* @var array
|
* @var string[]
|
||||||
*/
|
*/
|
||||||
public $settings;
|
public $settings;
|
||||||
|
|
||||||
@ -134,10 +134,27 @@ class WP_Customize_Partial {
|
|||||||
*
|
*
|
||||||
* @param WP_Customize_Selective_Refresh $component Customize Partial Refresh plugin instance.
|
* @param WP_Customize_Selective_Refresh $component Customize Partial Refresh plugin instance.
|
||||||
* @param string $id Control ID.
|
* @param string $id Control ID.
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* Optional. Arguments to override class property defaults.
|
* Optional. Array of properties for the new Partials object. Default empty array.
|
||||||
*
|
*
|
||||||
* @type array|string $settings All settings IDs tied to the partial. If undefined, `$id` will be used.
|
* @type string $type Type of the partial to be created.
|
||||||
|
* @type string $selector The jQuery selector to find the container element for the partial, that is,
|
||||||
|
* a partial's placement.
|
||||||
|
* @type string[] $settings IDs for settings tied to the partial. If undefined, `$id` will be used.
|
||||||
|
* @type string $primary_setting The ID for the setting that this partial is primarily responsible for
|
||||||
|
* rendering. If not supplied, it will default to the ID of the first setting.
|
||||||
|
* @type string $capability Capability required to edit this partial.
|
||||||
|
* Normally this is empty and the capability is derived from the capabilities
|
||||||
|
* of the associated `$settings`.
|
||||||
|
* @type callable $render_callback Render callback.
|
||||||
|
* Callback is called with one argument, the instance of WP_Customize_Partial.
|
||||||
|
* The callback can either echo the partial or return the partial as a string,
|
||||||
|
* or return false if error.
|
||||||
|
* @type bool $container_inclusive Whether the container element is included in the partial, or if only
|
||||||
|
* the contents are rendered.
|
||||||
|
* @type bool $fallback_refresh Whether to refresh the entire preview in case a partial cannot be refreshed.
|
||||||
|
* A partial render is considered a failure if the render_callback returns
|
||||||
|
* false.
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
public function __construct( WP_Customize_Selective_Refresh $component, $id, $args = array() ) {
|
public function __construct( WP_Customize_Selective_Refresh $component, $id, $args = array() ) {
|
||||||
|
@ -83,29 +83,13 @@ final class WP_Customize_Selective_Refresh {
|
|||||||
*
|
*
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*
|
*
|
||||||
* @param WP_Customize_Partial|string $id Customize Partial object, or Panel ID.
|
* @see WP_Customize_Partial::__construct()
|
||||||
* @param array $args {
|
|
||||||
* Optional. Array of properties for the new Partials object. Default empty array.
|
|
||||||
*
|
*
|
||||||
* @type string $type Type of the partial to be created.
|
* @param WP_Customize_Partial|string $id Customize Partial object, or Partial ID.
|
||||||
* @type string $selector The jQuery selector to find the container element for the partial, that is, a partial's placement.
|
* @param array $args Optional. Array of properties for the new Partials object.
|
||||||
* @type array $settings IDs for settings tied to the partial.
|
* See WP_Customize_Partial::__construct() for information
|
||||||
* @type string $primary_setting The ID for the setting that this partial is primarily responsible for
|
* on accepted arguments. Default empty array.
|
||||||
* rendering. If not supplied, it will default to the ID of the first setting.
|
* @return WP_Customize_Partial The instance of the partial that was added.
|
||||||
* @type string $capability Capability required to edit this partial.
|
|
||||||
* Normally this is empty and the capability is derived from the capabilities
|
|
||||||
* of the associated `$settings`.
|
|
||||||
* @type callable $render_callback Render callback.
|
|
||||||
* Callback is called with one argument, the instance of WP_Customize_Partial.
|
|
||||||
* The callback can either echo the partial or return the partial as a string,
|
|
||||||
* or return false if error.
|
|
||||||
* @type bool $container_inclusive Whether the container element is included in the partial, or if only
|
|
||||||
* the contents are rendered.
|
|
||||||
* @type bool $fallback_refresh Whether to refresh the entire preview in case a partial cannot be refreshed.
|
|
||||||
* A partial render is considered a failure if the render_callback returns
|
|
||||||
* false.
|
|
||||||
* }
|
|
||||||
* @return WP_Customize_Partial The instance of the panel that was added.
|
|
||||||
*/
|
*/
|
||||||
public function add_partial( $id, $args = array() ) {
|
public function add_partial( $id, $args = array() ) {
|
||||||
if ( $id instanceof WP_Customize_Partial ) {
|
if ( $id instanceof WP_Customize_Partial ) {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.5-beta3-48616';
|
$wp_version = '5.5-beta3-48617';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user