[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/customize/ -> class-wp-customize-selective-refresh.php (summary)

Customize API: WP_Customize_Selective_Refresh class

File Size: 456 lines (15 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 12 functions

  __construct()
  partials()
  add_partial()
  get_partial()
  remove_partial()
  init_preview()
  enqueue_preview_scripts()
  export_preview_data()
  add_dynamic_partials()
  is_render_partials_request()
  handle_error()
  handle_render_partials_request()

Functions
Functions that are not part of a class:

__construct( WP_Customize_Manager $manager )   X-Ref
Plugin bootstrap for Partial Refresh functionality.

param: WP_Customize_Manager $manager Manager instance.

partials()   X-Ref
Retrieves the registered partials.

return: array Partials.

add_partial( $id, $args = array()   X-Ref
Adds a partial.

param: WP_Customize_Partial|string $id   Customize Partial object, or Panel ID.
param: array                       $args {
return: WP_Customize_Partial             The instance of the panel that was added.

get_partial( $id )   X-Ref
Retrieves a partial.

param: string $id Customize Partial ID.
return: WP_Customize_Partial|null The partial, if set. Otherwise null.

remove_partial( $id )   X-Ref
Removes a partial.

param: string $id Customize Partial ID.

init_preview()   X-Ref
Initializes the Customizer preview.


enqueue_preview_scripts()   X-Ref
Enqueues preview scripts.


export_preview_data()   X-Ref
Exports data in preview after it has finished rendering so that partials can be added at runtime.


add_dynamic_partials( $partial_ids )   X-Ref
Registers dynamically-created partials.

param: string[] $partial_ids Array of the partial IDs to add.
return: WP_Customize_Partial[] Array of added WP_Customize_Partial instances.

is_render_partials_request()   X-Ref
Checks whether the request is for rendering partials.

Note that this will not consider whether the request is authorized or valid,
just that essentially the route is a match.

return: bool Whether the request is for rendering partials.

handle_error( $errno, $errstr, $errfile = null, $errline = null )   X-Ref
Handles PHP errors triggered during rendering the partials.

These errors will be relayed back to the client in the Ajax response.

param: int    $errno   Error number.
param: string $errstr  Error string.
param: string $errfile Error file.
param: string $errline Error line.
return: true Always true.

handle_render_partials_request()   X-Ref
Handles the Ajax request to return the rendered partials for the requested placements.




Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7