filtrod 4.7.0
customize_changeset_save_data
Opis — z kodu źródłowego
Filters the settings' data that will be persisted into the changeset.
Plugins may amend additional data (such as additional meta for settings) into the changeset with this filter.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$data | array | Updated changeset data, mapping setting IDs to arrays containing a $value item and optionally other metadata. |
$context | array | { 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. } |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_changeset_save_data', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}
// rejestracja funkcji zwrotnej — podaj liczbę argumentów!
add_filter( 'customize_changeset_save_data', 'twoja_funkcja', 10, 2 );
function twoja_funkcja($param_1, $param_2) {
// Twój kod
}Popularne w tej kategorii