wp_die_ajax_handler
Filter HookDescription
Filters the callback for killing WordPress execution for Ajax requests.Hook Information
File Location |
wp-includes/functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 3779 |
Hook Parameters
Type | Name | Description |
---|---|---|
callable
|
$callback
|
Callback function name. |
Usage Examples
Basic Usage
<?php
// Hook into wp_die_ajax_handler
add_filter('wp_die_ajax_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:3779
- How this hook is used in WordPress core
<?php
3774 *
3775 * @since 3.4.0
3776 *
3777 * @param callable $callback Callback function name.
3778 */
3779 $callback = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
3780 } elseif ( wp_is_json_request() ) {
3781 /**
3782 * Filters the callback for killing WordPress execution for JSON requests.
3783 *
3784 * @since 5.1.0
PHP Documentation
<?php
/**
* Filters the callback for killing WordPress execution for Ajax requests.
*
* @since 3.4.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.