PluginProbe ʕ •ᴥ•ʔ
Kirki – Freeform Page Builder, Website Builder & Customizer / 6.0.13
Kirki – Freeform Page Builder, Website Builder & Customizer v6.0.13
6.1.1 6.1.0 6.0.14 6.0.13 6.0.12 6.0.11 6.0.10 6.0.9 6.0.8 6.0.7 6.0.6 6.0.5 6.0.4 6.0.3 6.0.2 6.0.1 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.1.8 3.1.9 4.0.19 4.0.20 4.0.21 4.0.22 4.0.23 4.0.24 4.1 4.2.0 5.0.0 5.1.0 5.1.1 5.2.0 5.2.1 5.2.2 5.2.3 6.0.0 trunk 3.0.40 3.0.41 3.0.42 3.0.43 3.0.44 3.0.45 3.1.0 3.1.1 3.1.2
kirki / includes / KirkiBase.php
kirki / includes Last commit date
API 2 weeks ago Admin 2 weeks ago Ajax 2 weeks ago ExportImport 2 weeks ago FormValidator 2 months ago Frontend 2 weeks ago Manager 2 weeks ago API.php 2 weeks ago Admin.php 2 months ago Ajax.php 2 weeks ago Apps.php 2 weeks ago ContentManager.php 2 months ago DbQueryUtils.php 2 months ago ElementVisibilityConditions.php 2 months ago Frontend.php 2 months ago HelperFunctions.php 2 weeks ago KirkiBase.php 2 weeks ago PostsQueryUtils.php 2 months ago Staging.php 2 weeks ago View.php 1 month ago
KirkiBase.php
87 lines
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 use Kirki\Ajax;
8 use Kirki\API;
9 use Kirki\Apps;
10 use Kirki\ContentManager;
11 use Kirki\Customizer;
12 use Kirki\ElementVisibilityConditions;
13 use Kirki\HelperFunctions;
14 use Kirki\Manager\PluginActiveEvents;
15 use Kirki\Manager\PluginDeactivateEvents;
16 use Kirki\Manager\PluginInitEvents;
17 use Kirki\Manager\PluginLoadedEvents;
18 use Kirki\Manager\PluginShortcode;
19
20 if ( ! class_exists( 'KirkiBase' ) ) {
21 abstract class KirkiBase {
22 /**
23 * Class constructor
24 */
25 protected function __construct() {
26 $current_limit = ini_get( 'memory_limit' );
27 if ( HelperFunctions::convertToBytes( $current_limit ) < 512 * 1024 * 1024 ) {
28 if ( function_exists( 'wp_raise_memory_limit' ) ) {
29 wp_raise_memory_limit( '512M' );
30 }
31 }
32 register_activation_hook( $this->get_plugin_file(), array( $this, 'activate' ) );
33 register_deactivation_hook( $this->get_plugin_file(), array( $this, 'deactivate' ) );
34 add_action( 'init', array( $this, 'plugin_init' ) );
35 new PluginLoadedEvents();
36 new PluginInitEvents();
37 new PluginShortcode();
38
39
40 Customizer::init();
41 }
42
43 protected static $instance = false;
44 /**
45 * Initializes a singleton instance
46 *
47 * @return static
48 */
49 public static function init() {
50
51 if ( ! self::$instance ) {
52 self::$instance = new static();
53 }
54
55 new Ajax();
56 new API();
57 new ContentManager();
58 new ElementVisibilityConditions();
59
60 return self::$instance;
61 }
62
63 public function plugin_init() {
64 new Apps();
65 }
66
67 /**
68 * Do stuff upon plugin activation
69 *
70 * @return void
71 */
72 public function activate() {
73 new PluginActiveEvents();
74 }
75
76 /**
77 * Do stuff upon plugin deactivation
78 *
79 * @return void
80 */
81 public function deactivate() {
82 new PluginDeactivateEvents();
83 }
84
85 }
86 }
87