On this page
wp_doing_ajax(): bool
Determines whether the current request is a WordPress Ajax request.
Return
bool True if it's a WordPress Ajax request, false otherwise.
Source
File: wp-includes/load.php. View all references
function wp_doing_ajax() {
/**
* Filters whether the current request is a WordPress Ajax request.
*
* @since 4.7.0
*
* @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
*/
return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
}
Hooks
- apply_filters( 'wp_doing_ajax',
bool $wp_doing_ajax ) -
Filters whether the current request is a WordPress Ajax request.
Related
Uses
| Uses | Description |
|---|---|
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| is_protected_endpoint() wp-includes/load.php | Determines whether we are currently on an endpoint that should be protected against WSODs. |
| is_protected_ajax_action() wp-includes/load.php | Determines whether we are currently handling an Ajax action that should be protected against WSODs. |
| wp_check_comment_flood() wp-includes/comment.php | Checks whether comment flooding is occurring. |
| WP_Comments_List_Table::handle_row_actions() wp-admin/includes/class-wp-comments-list-table.php | Generates and displays row actions links. |
| WP_Terms_List_Table::handle_row_actions() wp-admin/includes/class-wp-terms-list-table.php | Generates and displays row action links. |
| themes_api() wp-admin/includes/theme.php | Retrieves theme installer pages from the WordPress.org Themes API. |
| WP_List_Table::set_pagination_args() wp-admin/includes/class-wp-list-table.php | An internal method that sets all the necessary pagination arguments |
| check_upload_size() wp-admin/includes/ms.php | Determine if uploaded file exceeds space quota. |
| wp_dashboard_cached_rss_widget() wp-admin/includes/dashboard.php | Checks to see if all of the feed url in $check_urls are cached. |
| WP_Comments_List_Table::prepare_items() wp-admin/includes/class-wp-comments-list-table.php | |
| WP_Terms_List_Table::column_name() wp-admin/includes/class-wp-terms-list-table.php | |
| WP_Customize_Manager::doing_ajax() wp-includes/class-wp-customize-manager.php | Returns true if it’s an Ajax request. |
| _wp_customize_include() wp-includes/theme.php | Includes and instantiates the WP_Customize_Manager class. |
| check_ajax_referer() wp-includes/pluggable.php | Verifies the Ajax request to prevent processing requests external of the blog. |
| wp_validate_auth_cookie() wp-includes/pluggable.php | Validates authentication cookie. |
| wp_debug_mode() wp-includes/load.php | Set PHP error reporting based on WordPress debug settings. |
| wp_send_json() wp-includes/functions.php | Sends a JSON response back to an Ajax request. |
| wp_die() wp-includes/functions.php | Kills WordPress execution and displays HTML page with an error message. |
| WP_Ajax_Response::send() wp-includes/class-wp-ajax-response.php | Display XML formatted responses. |
| wp_user_settings() wp-includes/option.php | Saves and restores user interface settings stored in a cookie. |
| wp_allow_comment() wp-includes/comment.php | Validates whether this comment is allowed to be made. |
Changelog
| Version | Description |
|---|---|
| 4.7.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_doing_ajax