@@ -36,37 +36,6 @@ function __construct() {
3636
3737 }
3838
39- /**
40- * Check plugin dependencies on activation.
41- *
42- * @since 0.2.0
43- */
44- public function activate () {
45-
46- $ dependency_check = $ this ->verify_dependencies ( true , array ( 'activate ' => true , 'echo ' => false ) );
47- if ( $ dependency_check !== true ) die ( $ dependency_check );
48-
49- }
50-
51- /**
52- * Initialize Carbon Fields and load plugin logic
53- *
54- * @since 0.2.0
55- */
56- public function init () {
57-
58- if ( class_exists ( 'Carbon_Fields \\Carbon_Fields ' ) ) {
59- add_action ( 'after_setup_theme ' , array ( 'Carbon_Fields \\Carbon_Fields ' , 'boot ' ) );
60- } else {
61- new TGMPA ();
62- }
63-
64- if ( $ this ->verify_dependencies ( 'carbon_fields ' ) === true ) {
65- add_action ( 'carbon_fields_fields_registered ' , array ( $ this , 'load_plugin ' ));
66- }
67-
68- }
69-
7039 /**
7140 * Load plugin classes
7241 *
@@ -105,6 +74,37 @@ public function load_plugin() {
10574
10675 }
10776
77+ /**
78+ * Check plugin dependencies on activation.
79+ *
80+ * @since 0.2.0
81+ */
82+ public function activate () {
83+
84+ $ dependency_check = $ this ->verify_dependencies ( true , array ( 'activate ' => true , 'echo ' => false ) );
85+ if ( $ dependency_check !== true ) die ( $ dependency_check );
86+
87+ }
88+
89+ /**
90+ * Initialize Carbon Fields and load plugin logic
91+ *
92+ * @since 0.2.0
93+ */
94+ public function init () {
95+
96+ if ( class_exists ( 'Carbon_Fields \\Carbon_Fields ' ) ) {
97+ add_action ( 'after_setup_theme ' , array ( 'Carbon_Fields \\Carbon_Fields ' , 'boot ' ) );
98+ } else {
99+ new TGMPA ();
100+ }
101+
102+ if ( $ this ->verify_dependencies ( 'carbon_fields ' ) === true ) {
103+ add_action ( 'carbon_fields_fields_registered ' , array ( $ this , 'load_plugin ' ));
104+ }
105+
106+ }
107+
108108 /**
109109 * Function to verify dependencies, such as if an outdated version of Carbon
110110 * Fields is detected.
0 commit comments