customize_save_validation_before
Action HookDescription
Fires before save validation happens. Plugins can add just-in-time {@see 'customize_validate_{$this->ID}'} filters at this point to catch any settings registered after `customize_register`. The dynamic portion of the hook name, `$this->ID` refers to the setting ID.Hook Information
File Location |
wp-includes/class-wp-customize-manager.php
View on GitHub
|
Hook Type | Action |
Line Number | 2779 |
Hook Parameters
Type | Name | Description |
---|---|---|
WP_Customize_Manager
|
$manager
|
WP_Customize_Manager instance. |
Usage Examples
Basic Usage
<?php
// Hook into customize_save_validation_before
add_action('customize_save_validation_before', 'my_custom_function', 10, 1);
function my_custom_function($manager) {
// Your custom code here
}
Source Code Context
wp-includes/class-wp-customize-manager.php:2779
- How this hook is used in WordPress core
<?php
2774 *
2775 * @since 4.6.0
2776 *
2777 * @param WP_Customize_Manager $manager WP_Customize_Manager instance.
2778 */
2779 do_action( 'customize_save_validation_before', $this );
2780
2781 // Validate settings.
2782 $validated_values = array_merge(
2783 array_fill_keys( array_keys( $args['data'] ), null ), // Make sure existence/capability checks are done on value-less setting updates.
2784 $post_values
PHP Documentation
<?php
/**
* Fires before save validation happens.
*
* Plugins can add just-in-time {@see 'customize_validate_{$this->ID}'} filters
* at this point to catch any settings registered after `customize_register`.
* The dynamic portion of the hook name, `$this->ID` refers to the setting ID.
*
* @since 4.6.0
*
* @param WP_Customize_Manager $manager WP_Customize_Manager instance.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-includes/class-wp-customize-manager.php
Related Hooks
Related hooks will be displayed here in future updates.