C:\xampp\htdocs\landing\wp-content\plugins\imagify\inc\classes\class-imagify-cron-library-size.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
defined
'ABSPATH' ) || die( 'Cheatin’ uh?' );

/**
 * Class that handles the cron that calculate and cache the library size.
 *
 * @since  1.7
 * @author Grégory Viguier
 */
class Imagify_Cron_Library_Size extends Imagify_Abstract_Cron {

    
/**
     * Class version.
     *
     * @var   string
     * @since 1.7
     */
    
const VERSION '1.0';

    
/**
     * Cron name.
     *
     * @var    string
     * @since  1.7
     * @access protected
     */
    
protected $event_name 'imagify_update_library_size_calculations_event';

    
/**
     * Cron recurrence.
     *
     * @var   string
     * @since 1.7
     * @access protected
     */
    
protected $event_recurrence 'weekly';

    
/**
     * Cron time.
     *
     * @var   string
     * @since 1.7
     * @access protected
     */
    
protected $event_time '04:00';

    
/**
     * The single instance of the class.
     *
     * @var    object
     * @since  1.7
     * @access protected
     */
    
protected static $_instance;

    
/**
     * Get the main Instance.
     *
     * @since  1.7
     * @access public
     * @author Grégory Viguier
     *
     * @return object Main instance.
     */
    
public static function get_instance() {
        if ( ! isset( 
self::$_instance ) ) {
            
self::$_instance = new self();
        }

        return 
self::$_instance;
    }


    
/** ----------------------------------------------------------------------------------------- */
    /** HOOKS =================================================================================== */
    /** ----------------------------------------------------------------------------------------- */

    /**
     * The event action.
     *
     * @since  1.7
     * @access public
     * @author Grégory Viguier
     */
    
public function do_event() {
        
imagify_do_async_job( array(
            
'action'      => 'imagify_update_estimate_sizes',
            
'_ajax_nonce' => wp_create_nonce'update_estimate_sizes' ),
        ) );
    }
}
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586