PluginProbe
Taskbuilder – Project Management & Task Management Tool With Kanban Board / 6.0.6
Taskbuilder – Project Management & Task Management Tool With Kanban Board v6.0.6
6.0.6 6.0.5 6.0.2 6.0.3 6.0.4 6.0.1 6.0.0 5.0.8 5.0.9 4.0.9 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 All 58 releases
← All changes | includes/wppm_cron.php +62 -62 1.0.26.0.6 View file →
@@ -1,63 +1,63 @@
1 -<?php
2 -if ( ! defined( 'ABSPATH' ) ) {
3 - exit; // Exit if accessed directly
4 -}
5 -if( !class_exists( 'WPPMCron' ) ) :
6 -
7 - final class WPPMCron {
8 - public static function init() {
9 - add_action( 'init', array( __CLASS__, 'wppm_schedule_events') );
10 - }
11 -
12 - public static function wppm_schedule_events(){
13 - // Schedule cron job for every minute events
14 - if ( !wp_next_scheduled('wppm_cron_one_minute') ) {
15 - wp_schedule_event(
16 - time(),
17 - 'wppm_1min',
18 - 'wppm_cron_one_minute'
19 - );
20 - //include( WPPM_ABSPATH.'includes/class-wppm_import_emails.php' );
21 - }
22 -
23 - // Schedule cron job for every five minute events
24 - if ( !wp_next_scheduled('wppm_cron_five_minute') ) {
25 - wp_schedule_event(
26 - time(),
27 - 'wppm_5min',
28 - 'wppm_cron_five_minute'
29 - );
30 - }
31 -
32 - // Schedule cron job for daily events
33 - if ( !wp_next_scheduled('wppm_cron_daily') ) {
34 - wp_schedule_event(
35 - time(),
36 - 'daily',
37 - 'wppm_cron_daily'
38 - );
39 - }
40 - }
41 -
42 - public static function wppm_unschedule_events(){
43 - // Remove every minute cron
44 - $timestamp = wp_next_scheduled( 'wppm_cron_one_minute' );
45 - if( $timestamp ) {
46 - wp_unschedule_event( $timestamp, 'wppm_cron_one_minute' );
47 - }
48 -
49 - // Remove every five minute cron
50 - $timestamp = wp_next_scheduled( 'wppm_cron_five_minute' );
51 - if( $timestamp ) {
52 - wp_unschedule_event( $timestamp, 'wppm_cron_five_minute' );
53 - }
54 -
55 - // Remove daily cron
56 - $timestamp = wp_next_scheduled( 'wppm_cron_daily' );
57 - if( $timestamp ) {
58 - wp_unschedule_event( $timestamp, 'wppm_cron_daily' );
59 - }
60 - }
61 - }
62 -endif;
1 +<?php
2 +if ( ! defined( 'ABSPATH' ) ) {
3 + exit; // Exit if accessed directly
4 +}
5 +if( !class_exists( 'WPPMCron' ) ) :
6 +
7 + final class WPPMCron {
8 + public static function init() {
9 + add_action( 'init', array( __CLASS__, 'wppm_schedule_events') );
10 + }
11 +
12 + public static function wppm_schedule_events(){
13 + // Schedule cron job for every minute events
14 + if ( !wp_next_scheduled('wppm_cron_one_minute') ) {
15 + wp_schedule_event(
16 + time(),
17 + 'wppm_1min',
18 + 'wppm_cron_one_minute'
19 + );
20 + //include( WPPM_ABSPATH.'includes/class-wppm_import_emails.php' );
21 + }
22 +
23 + // Schedule cron job for every five minute events
24 + if ( !wp_next_scheduled('wppm_cron_five_minute') ) {
25 + wp_schedule_event(
26 + time(),
27 + 'wppm_5min',
28 + 'wppm_cron_five_minute'
29 + );
30 + }
31 +
32 + // Schedule cron job for daily events
33 + if ( !wp_next_scheduled('wppm_cron_daily') ) {
34 + wp_schedule_event(
35 + time(),
36 + 'daily',
37 + 'wppm_cron_daily'
38 + );
39 + }
40 + }
41 +
42 + public static function wppm_unschedule_events(){
43 + // Remove every minute cron
44 + $timestamp = wp_next_scheduled( 'wppm_cron_one_minute' );
45 + if( $timestamp ) {
46 + wp_unschedule_event( $timestamp, 'wppm_cron_one_minute' );
47 + }
48 +
49 + // Remove every five minute cron
50 + $timestamp = wp_next_scheduled( 'wppm_cron_five_minute' );
51 + if( $timestamp ) {
52 + wp_unschedule_event( $timestamp, 'wppm_cron_five_minute' );
53 + }
54 +
55 + // Remove daily cron
56 + $timestamp = wp_next_scheduled( 'wppm_cron_daily' );
57 + if( $timestamp ) {
58 + wp_unschedule_event( $timestamp, 'wppm_cron_daily' );
59 + }
60 + }
61 + }
62 +endif;
63 63 WPPMCron::init();