PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.7
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.7
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/controllers/FrmCronController.php +5 -10 6.306.7 View file →
@@ -2,10 +2,8 @@
2 2 /**
3 3 * Cron controller
4 4 *
5 5 * @since 6.3.2
6 - *
7 - * @package Formidable
8 6 */
9 7
10 8 if ( ! defined( 'ABSPATH' ) ) {
11 9 die( 'You are not allowed to call this page directly.' );
@@ -34,18 +32,14 @@
34 32 /**
35 33 * Schedules cron events.
36 34 *
37 35 * @since 6.7
38 - *
39 - * @return void
40 36 */
41 37 public static function schedule_events() {
42 38 $events = self::get_events();
39 + unset( $events['formidable_send_usage'] ); // This is scheduled in another place.
40 + unset( $events['frm_payment_cron'] ); // This is scheduled in another place.
43 41
44 - // These are scheduled in another place.
45 - unset( $events['formidable_send_usage'] );
46 - unset( $events['frm_payment_cron'] );
47 -
48 42 foreach ( $events as $event => $recurrence ) {
49 43 if ( ! wp_next_scheduled( $event ) ) {
50 44 wp_schedule_event( time(), $recurrence, $event );
51 45 }
@@ -59,11 +53,12 @@
59 53 *
60 54 * @return void
61 55 */
62 56 public static function remove_crons() {
63 - foreach ( self::get_events() as $event => $recurrence ) {
57 + $events = self::get_events();
58 +
59 + foreach ( $events as $event => $recurrence ) {
64 60 $timestamp = wp_next_scheduled( $event );
65 -
66 61 if ( false !== $timestamp ) {
67 62 wp_unschedule_event( $timestamp, $event );
68 63 }
69 64 }