Filter hook 'customize_save_response'

in WP Core File wp-includes/class-wp-customize-manager.php at line 2611

View Source

customize_save_response

Filter Hook
Description
Filters response data for a successful customize_save Ajax request. This filter does not apply if there was a nonce or authentication failure.

Hook Information

File Location wp-includes/class-wp-customize-manager.php View on GitHub
Hook Type Filter
Line Number 2611

Hook Parameters

Type Name Description
array $response Additional information passed back to the 'saved' event on `wp.customize`.
WP_Customize_Manager $manager WP_Customize_Manager instance.

Usage Examples

Basic Usage
<?php
// Hook into customize_save_response
add_filter('customize_save_response', 'my_custom_filter', 10, 2);

function my_custom_filter($response, $manager) {
    // Your custom filtering logic here
    return $response;
}

Source Code Context

wp-includes/class-wp-customize-manager.php:2611 - How this hook is used in WordPress core
<?php
2606  		 *
2607  		 * @param array                $response Additional information passed back to the 'saved'
2608  		 *                                       event on `wp.customize`.
2609  		 * @param WP_Customize_Manager $manager  WP_Customize_Manager instance.
2610  		 */
2611  		$response = apply_filters( 'customize_save_response', $response, $this );
2612  
2613  		if ( is_wp_error( $r ) ) {
2614  			wp_send_json_error( $response );
2615  		} else {
2616  			wp_send_json_success( $response );

PHP Documentation

<?php
/**
		 * Filters response data for a successful customize_save Ajax request.
		 *
		 * This filter does not apply if there was a nonce or authentication failure.
		 *
		 * @since 4.2.0
		 *
		 * @param array                $response Additional information passed back to the 'saved'
		 *                                       event on `wp.customize`.
		 * @param WP_Customize_Manager $manager  WP_Customize_Manager instance.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/class-wp-customize-manager.php
Related Hooks

Related hooks will be displayed here in future updates.