-
Notifications
You must be signed in to change notification settings - Fork 1
/
class-pictifly.php
91 lines (77 loc) · 2.63 KB
/
class-pictifly.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
class Pictifly{
/**
* The unique identifier of this plugin.
*
* @since 0.4.0
* @access protected
* @var string $plugin_name The string used to uniquely identify this plugin.
*/
protected $plugin_name;
/**
* The current version of the plugin.
*
* @since 0.4.0
* @access protected
* @var string $version The current version of the plugin.
*/
protected $version;
/**
* Define the core functionality of the plugin.
*
* Set the plugin name and the plugin version that can be used throughout the plugin.
* Load the dependencies, define the locale, and set the hooks for the admin area and
* the public-facing side of the site.
*
* @since 0.4.0
*/
public function __construct() {
if ( defined( 'PF_VERSION' ) ) {
$this->version = PF_VERSION;
} else {
$this->version = '0.4.5';
}
$this->plugin_name = PF_SLUG;
$this->load_dependencies();
}
private function load_dependencies() {
require_once 'inc/plugin-activation.php';
require_once 'vendor/autoload.php';
require_once 'kernel/pf_sizes_store.php';
/**
* Image related class
*/
require_once 'kernel/classes/class-pf-image.php';
require_once 'kernel/classes/class-pf-breakpoint.php';
require_once 'kernel/classes/class-pf-size.php';
/**
* Admin related class
*/
require_once 'kernel/classes/admin/class-pf-ajax.php';
require_once 'kernel/classes/admin/class-pf-settings.php';
require_once 'kernel/classes/admin/class-pf-admin.php';
require_once 'kernel/classes/admin/class-pf-compress.php';
require_once 'kernel/classes/admin/class-pf-regenerate.php';
require_once 'kernel/classes/admin/class-pf-tools.php';
// NEED TO REFRACTO FILE BELOW
require_once 'kernel/pf_configs.php';
require_once 'kernel/pf_functions.php';
require_once 'kernel/hooks/wp-attachment-hooks.php';
require_once 'kernel/enqueue_scripts.php';
require_once 'kernel/media-library/pf_keypoint_field.php';
require_once 'kernel/media-library/wpml_support.php';
require_once 'kernel/plugin-compatibilty/wp-rocket-config.php';
}
public function run(){
$pf_settings = PF_Settings::getInstance();
$pf_settings->register_ajax_action();
$my_admin = new PF_Admin();
$my_admin->run();
$pf_tools = new PF_Tools();
$pf_tools->run();
$pf_regenerate = new PF_Regenerate();
$pf_regenerate->run();
$pf_compress = new PF_Compress();
$pf_compress->run();
}
}