diff --git a/admin/qtx_admin.php b/admin/qtx_admin.php index 1c92e69e..58d69bae 100644 --- a/admin/qtx_admin.php +++ b/admin/qtx_admin.php @@ -110,7 +110,7 @@ function qtranxf_collect_translations_posted() { qtranxf_clean_request( 'qtranslate-fields' ); } - if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) { + if ( wp_doing_ajax() ) { // parse variables collected as a query string in an option foreach ( $_REQUEST as $name => $value ) { if ( ! is_string( $value ) ) { diff --git a/admin/qtx_admin_utils.php b/admin/qtx_admin_utils.php index 8d0fb266..0068d1bc 100644 --- a/admin/qtx_admin_utils.php +++ b/admin/qtx_admin_utils.php @@ -317,7 +317,7 @@ function qtranxf_before_admin_bar_render() { function qtranxf_admin_the_title( $title ) { // For nav menus, keep the raw value as the languages are handled client-side (LSB) - if ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'add-menu-item' ) { + if ( wp_doing_ajax() && isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'add-menu-item' ) { // When a nav menu is being added it is first handled by AJAX, see "wp_ajax_add_menu_item" in ajax-actions.php // For the call to the filter "the_title", see "wp_setup_nav_menu_item" in nav-menus.php return $title; diff --git a/modules/wp-seo/qwpseo-activation.php b/modules/wp-seo/qwpseo-activation.php index 4f76ed18..ab080209 100644 --- a/modules/wp-seo/qwpseo-activation.php +++ b/modules/wp-seo/qwpseo-activation.php @@ -1,11 +1,11 @@ && !isset($_SERVER['REDIRECT_URL']) && ( ! isset( $_SERVER['REDIRECT_STATUS'] ) || $_SERVER['REDIRECT_STATUS'] == '200' ); @@ -1042,7 +1042,7 @@ function qtranxf_match_language_locale( $locale ) { } function qtranxf_get_page_referer() { - if ( defined( 'DOING_AJAX' ) ) { + if ( wp_doing_ajax() ) { global $q_config; if ( isset( $q_config['url_info']['page_referer'] ) ) { return $q_config['url_info']['page_referer'];