wphooks.info - pre_unschedule_hook

pre_unschedule_hook

(trunk - 5.1-alpha-44286)

*** New in trunk ***

The hook occurs in the following file:

wp-includes/cron.php:
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
	 *
	 * For plugins replacing wp-cron, return the number of events successfully
	 * unscheduled (zero if no events were registered with the hook) or false
	 * if unscheduling one or more events fails.
	 *
	 * @since 5.0.0
	 *
	 * @param null|array $pre  Value to return instead. Default null to continue unscheduling the hook.
	 * @param string     $hook Action hook, the execution of which will be unscheduled.
	 */
	$pre = apply_filters( 'pre_unschedule_hook', null, $hook );
	if ( null !== $pre ) {
		return $pre;
	}

	$crons = _get_cron_array();
	if ( empty( $crons ) ) {
		return 0;
	}