wp_die_json_handler
Filter HookDescription
Filters the callback for killing WordPress execution for JSON requests.Hook Information
| File Location | wp-includes/functions.phpView on GitHub | 
| Hook Type | Filter | 
| Line Number | 3788 | 
Hook Parameters
| Type | Name | Description | 
|---|---|---|
| callable | $callback | Callback function name. | 
Usage Examples
                        Basic Usage
                    
                    <?php
// Hook into wp_die_json_handler
add_filter('wp_die_json_handler', 'my_custom_filter', 10, 1);
function my_custom_filter($callback) {
    // Your custom filtering logic here
    return $callback;
}
Source Code Context
                        wp-includes/functions.php:3788
                        - How this hook is used in WordPress core
                    
                    <?php
3783  		 *
3784  		 * @since 5.1.0
3785  		 *
3786  		 * @param callable $callback Callback function name.
3787  		 */
3788  		$callback = apply_filters( 'wp_die_json_handler', '_json_wp_die_handler' );
3789  	} elseif ( wp_is_serving_rest_request() && wp_is_jsonp_request() ) {
3790  		/**
3791  		 * Filters the callback for killing WordPress execution for JSONP REST requests.
3792  		 *
3793  		 * @since 5.2.0
PHP Documentation
<?php
/**
		 * Filters the callback for killing WordPress execution for JSON requests.
		 *
		 * @since 5.1.0
		 *
		 * @param callable $callback Callback function name.
		 */
                        Quick Info
                    
                    - Hook Type: Filter
- Parameters: 1
- File: wp-includes/functions.php
                        Related Hooks
                    
                    Related hooks will be displayed here in future updates.
