Cron: In `spawn_cron()`, when using `ALTERNATE_WP_CRON`, return early for any non-`GET`, instead of naively checking `! empty( $_POST )`.

Props johnbillion, markoheijnen.
Fixes #27447.

Built from https://develop.svn.wordpress.org/trunk@34576


git-svn-id: http://core.svn.wordpress.org/trunk@34540 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-09-26 04:51:26 +00:00
parent ffe7f0ec5a
commit 2f167faeb2
2 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ function spawn_cron( $gmt_time = 0 ) {
return;
if ( defined( 'ALTERNATE_WP_CRON' ) && ALTERNATE_WP_CRON ) {
if ( ! empty( $_POST ) || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) ) {
if ( 'GET' !== $_SERVER['REQUEST_METHOD'] || defined( 'DOING_AJAX' ) || defined( 'XMLRPC_REQUEST' ) ) {
return;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-34575';
$wp_version = '4.4-alpha-34576';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.