Skip ALTERNATE_WP_CRON redirect when performing XML-RPC requests.

props markoheijnen.
fixes #27447.
Built from https://develop.svn.wordpress.org/trunk@29732


git-svn-id: http://core.svn.wordpress.org/trunk@29506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-09-11 14:02:15 +00:00
parent a32a75b9f4
commit f1ab373378

View File

@ -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 );