customize_save_validation_before
Fires before save validation happens.
Description
Plugins can add just-in-time } filters at this point to catch any settings registered after customize_register.. The dynamic portion(s) of the hook name, $this
->ID refers to the setting ID.
Parameters (1)
- 0. $instance (WP_Customize_Manager)
-
WP_Customize_Manager
instance.
Usage
- To run the hook, copy the example below.
- // run the action
- do_action( 'customize_save_validation_before', $instance );
- The following example is for adding a hook callback.
- // define the customize_save_validation_before callback
- function action_customize_save_validation_before( $instance ) {
- // make action magic happen here...
- };
- // add the action
- add_action( 'customize_save_validation_before', 'action_customize_save_validation_before', 10, 1 );
- To remove a hook callback, use the example below.
- // remove the action
- remove_action( 'customize_save_validation_before', 'action_customize_save_validation_before', 10, 1 );
Defined (1)
The action is defined in the following location(s).
- /wp-includes/class-wp-customize-manager.php
- do_action( 'customize_save_validation_before', $this );