wppaste
WordPress

WP_Customize_Selective_Refresh

Since
4.5.0
Source
wp-includes/customize/class-wp-customize-selective-refresh.php:15
Core Customizer class for implementing selective refresh.

Compatibility

WordPress
since 4.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 7

Every hook that fires from inside WP_Customize_Selective_Refresh, in the order it appears in the class, grouped by the method that fires it.

Properties · 4

$managerWP_Customize_Managerpublic
Customize manager.
$partialsWP_Customize_Partial[]protected
Registered instances of WP_Customize_Partial.
$triggered_errorsarrayprotected
Log of errors triggered when partials are rendered.
$current_partial_idstring|nullprotected
Keep track of the current partial being rendered.

Methods · 12

Source code

#[AllowDynamicProperties]final class WP_Customize_Selective_Refresh { 	/**	 * Query var used in requests to render partials.	 *	 * @since 4.5.0	 */	const RENDER_QUERY_VAR = 'wp_customize_render_partials'; 	/**	 * Customize manager.	 *	 * @since 4.5.0	 * @var WP_Customize_Manager	 */	public $manager; 	/**	 * Registered instances of WP_Customize_Partial.	 *	 * @since 4.5.0	 * @var WP_Customize_Partial[]	 */	protected $partials = array(); 	/**	 * Log of errors triggered when partials are rendered.	 *	 * @since 4.5.0	 * @var array	 */	protected $triggered_errors = array(); 	/**	 * Keep track of the current partial being rendered.	 *	 * @since 4.5.0	 * @var string|null	 */	protected $current_partial_id; 	/**	 * Plugin bootstrap for Partial Refresh functionality.	 *	 * @since 4.5.0	 *	 * @param WP_Customize_Manager $manager Customizer bootstrap instance.	 */	public function __construct( WP_Customize_Manager $manager ) {		$this->manager = $manager;		require_once ABSPATH . WPINC . '/customize/class-wp-customize-partial.php'; 		add_action( 'customize_preview_init', array( $this, 'init_preview' ) );	} 	/**	 * Retrieves the registered partials.	 *	 * @since 4.5.0	 *	 * @return array Partials.	 */	public function partials() {		return $this->partials;	} 	/**	 * Adds a partial.	 *	 * @since 4.5.0	 *	 * @see WP_Customize_Partial::__construct()	 *	 * @param WP_Customize_Partial|string $id   Customize Partial object, or Partial ID.	 * @param array                       $args Optional. Array of properties for the new Partials object.	 *                                          See WP_Customize_Partial::__construct() for information	 *                                          on accepted arguments. Default empty array.	 * @return WP_Customize_Partial The instance of the partial that was added.	 */

Changelog

Introduced in 4.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 tag, from src/wp-includes/customize/class-wp-customize-selective-refresh.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.