customize_changeset_save_data WordPress Filter Hook

The customize_changeset_save_data hook is triggered when a changeset is saved. This hook allows you to access the data that is being saved and make changes before it is saved to the database. This is useful if you need to do some processing on the data before it is saved or if you want to save some data to a different location.

apply_filters( 'customize_changeset_save_data', array $data, array $context ) #

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.


Top ↑

Parameters

$data

(array)Updated changeset data, mapping setting IDs to arrays containing a $value item and optionally other metadata.

$context

(array)Filter context.

  • 'uuid'
    (string) Changeset UUID.
  • 'title'
    (string) Requested title for the changeset post.
  • 'status'
    (string) Requested status for the changeset post.
  • 'date_gmt'
    (string) Requested date for the changeset post in MySQL format and GMT timezone.
  • 'post_id'
    (int|false) Post ID for the changeset, or false if it doesn't exist yet.
  • 'previous_data'
    (array) Previous data contained in the changeset.
  • 'manager'
    (WP_Customize_Manager) Manager instance.


Top ↑

Source

File: wp-includes/class-wp-customize-manager.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.7.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More