rebase on oct-10-2023
This commit is contained in:
@@ -541,8 +541,10 @@ function wp_unschedule_event( $timestamp, $hook, $args = array(), $wp_error = fa
|
||||
* if unscheduling one or more events fail.
|
||||
*/
|
||||
function wp_clear_scheduled_hook( $hook, $args = array(), $wp_error = false ) {
|
||||
// Backward compatibility.
|
||||
// Previously, this function took the arguments as discrete vars rather than an array like the rest of the API.
|
||||
/*
|
||||
* Backward compatibility.
|
||||
* Previously, this function took the arguments as discrete vars rather than an array like the rest of the API.
|
||||
*/
|
||||
if ( ! is_array( $args ) ) {
|
||||
_deprecated_argument( __FUNCTION__, '3.0.0', __( 'This argument has changed to an array to match the behavior of the other cron functions.' ) );
|
||||
$args = array_slice( func_get_args(), 1 ); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
|
||||
@@ -883,7 +885,7 @@ function spawn_cron( $gmt_time = 0 ) {
|
||||
wp_ob_end_flush_all();
|
||||
flush();
|
||||
|
||||
include_once ABSPATH . 'wp-cron.php';
|
||||
require_once ABSPATH . 'wp-cron.php';
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -974,7 +976,7 @@ function wp_cron() {
|
||||
*/
|
||||
function _wp_cron() {
|
||||
// Prevent infinite loops caused by lack of wp-cron.php.
|
||||
if ( strpos( $_SERVER['REQUEST_URI'], '/wp-cron.php' ) !== false || ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ) {
|
||||
if ( str_contains( $_SERVER['REQUEST_URI'], '/wp-cron.php' ) || ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user