From a5d94bef078e81cfdcc54305c3ccb4d5ab262e81 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 20 Jul 2012 15:15:22 +0000 Subject: [PATCH] Introduce cron_request filter. Props ikailo. fixes #13449 git-svn-id: https://develop.svn.wordpress.org/trunk@21293 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/cron.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wp-includes/cron.php b/wp-includes/cron.php index 9117ae5d34..64fab7d3be 100644 --- a/wp-includes/cron.php +++ b/wp-includes/cron.php @@ -244,8 +244,13 @@ function spawn_cron( $local_time = 0 ) { $doing_wp_cron = sprintf( '%.22F', $local_time ); set_transient( 'doing_cron', $doing_wp_cron ); - $cron_url = site_url( 'wp-cron.php?doing_wp_cron=' . $doing_wp_cron ); - wp_remote_post( $cron_url, array( 'timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters( 'https_local_ssl_verify', true ) ) ); + $cron_request = apply_filters( 'cron_request', array( + 'url' => site_url( 'wp-cron.php?doing_wp_cron=' . $doing_wp_cron ), + 'key' => $doing_wp_cron, + 'args' => array( 'timeout' => 0.01, 'blocking' => false, 'sslverify' => apply_filters( 'https_local_ssl_verify', true ) ) + ) ); + + wp_remote_post( $cron_request['url'], $cron_request['args'] ); } /**