@@ -53,40 +53,22 @@ public static function schedule_send() {
5353 wp_schedule_event ( $ init_send , 'weekly ' , 'formidable_send_usage ' );
5454 }
5555
56- /**
57- * Registers the filter that adds our custom cron schedule.
58- *
59- * The filter callback translates the schedule label, and 'cron_schedules' can be applied
60- * at any point in the request, so this defers itself until the text domain has loaded.
61- * Priority 0 keeps the schedule available to _wp_cron(), which runs on init at 10.
62- *
63- * @since x.x
64- *
65- * @return void
66- */
67- public static function add_schedules_filter () {
68- if ( ! did_action ( 'init ' ) ) {
69- add_action ( 'init ' , self ::class . '::add_schedules_filter ' , 0 );
70- return ;
71- }
72-
73- add_filter ( 'cron_schedules ' , self ::class . '::add_schedules ' );
74- }
75-
7656 /**
7757 * Adds once weekly to the existing schedules.
7858 *
59+ * WordPress core registers an identical 'weekly' schedule of its own, so this adds nothing.
60+ * The 'cron_schedules' registration is gone, and with it the translated label that made
61+ * this run before the text domain loaded.
62+ *
7963 * @since 3.06.04
64+ * @deprecated x.x
8065 *
81- * @param array $schedules Schedules .
66+ * @param array $schedules Unused. The registered cron schedules, keyed by schedule name .
8267 *
8368 * @return array
8469 */
8570 public static function add_schedules ( $ schedules = array () ) {
86- $ schedules ['weekly ' ] = array (
87- 'interval ' => DAY_IN_SECONDS * 7 ,
88- 'display ' => __ ( 'Once Weekly ' , 'formidable ' ),
89- );
71+ _deprecated_function ( __METHOD__ , 'x.x ' );
9072 return $ schedules ;
9173 }
9274
0 commit comments