customize_save_{$id_base} WordPress Action Hook

The customize_save_{$id_base} hook is triggered when a user attempts to save a Customizer setting. This hook can be used to validate or sanitize a Customizer setting before it is saved. For example, you could use this hook to ensure that a Hex color value is entered correctly.

do_action( "customize_save_{$id_base}", WP_Customize_Setting $setting ) #

Fires when the WP_Customize_Setting::save() method is called.


Description

The dynamic portion of the hook name, $id_base refers to the base slug of the setting name.


Top ↑

Parameters

$setting

(WP_Customize_Setting)WP_Customize_Setting instance.


Top ↑

Source

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

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.4.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.