Filters the settings' data that will be persisted into the changeset.
Description
Plugins may amend additional data (such as additional meta for settings) into the changeset with this filter.
Parameters
$dataarray
Updated changeset data, mapping setting IDs to arrays containing a $value item and optionally other metadata.
$contextarray
{ Filter context. @type string $uuid Changeset UUID. @type string $title Requested title for the changeset post. @type string $status Requested status for the changeset post. @type string $date_gmt Requested date for the changeset post in MySQL format and GMT timezone. @type int|false $post_id Post ID for the changeset, or false if it doesn't exist yet. @type array $previous_data Previous data contained in the changeset. @type WP_Customize_Manager $manager Manager instance.}
$uuidstring
Changeset UUID.
$titlestring
Requested title for the changeset post.
$statusstring
Requested status for the changeset post.
$date_gmtstring
Requested date for the changeset post in MySQL format and GMT timezone.
$post_idint|false
Post ID for the changeset, or false if it doesn't exist yet.
2899<?php2900 * @type string $date_gmt Requested date for the changeset post in MySQL format and GMT timezone.2901 * @type int|false $post_id Post ID for the changeset, or false if it doesn't exist yet.2902 * @type array $previous_data Previous data contained in the changeset.2903 * @type WP_Customize_Manager $manager Manager instance.2904 * }2905 */2906 $data = apply_filters( 'customize_changeset_save_data', $data, $filter_context );29072908 // Switch theme if publishing changes now.2909 if ( 'publish' === $args['status'] && ! $this->is_theme_active() ) {2910 // Temporarily stop previewing the theme to allow switch_themes() to operate properly.2911 $this->stop_previewing_theme();2912 switch_theme( $this->get_stylesheet() );
History
Introduced in 4.7.0. Unchanged from 6.7.7 through 7.1.0.