From 2becf84579e555d72384d92e1ddb9290a9315f24 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 11 Sep 2014 14:01:04 +0000 Subject: [PATCH] Skip ALTERNATE_WP_CRON redirect when performing XML-RPC requests. props markoheijnen. fixes #27447. git-svn-id: https://develop.svn.wordpress.org/trunk@29732 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/cron.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/cron.php b/src/wp-includes/cron.php index fc876147cc..244699c8ed 100644 --- a/src/wp-includes/cron.php +++ b/src/wp-includes/cron.php @@ -245,9 +245,10 @@ function spawn_cron( $gmt_time = 0 ) { if ( isset($keys[0]) && $keys[0] > $gmt_time ) return; - if ( defined('ALTERNATE_WP_CRON') && ALTERNATE_WP_CRON ) { - if ( !empty($_POST) || defined('DOING_AJAX') ) + if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) { + if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) ) { return; + } $doing_wp_cron = sprintf( '%.22F', $gmt_time ); set_transient( 'doing_cron', $doing_wp_cron );