File tree 2 files changed +21
-4
lines changed
2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ class Block_Patterns {
37
37
* Block_Patterns constructor.
38
38
*/
39
39
public function __construct () {
40
- $ this ->setup_properties ();
41
40
42
41
add_action ( 'init ' , array ( $ this , 'run ' ) );
43
42
}
@@ -48,6 +47,7 @@ public function __construct() {
48
47
* @return void
49
48
*/
50
49
public function run () {
50
+ $ this ->setup_properties ();
51
51
$ this ->register_categories ();
52
52
$ this ->register_patterns ();
53
53
}
Original file line number Diff line number Diff line change @@ -26,6 +26,26 @@ class Block_Styles {
26
26
* Block Styles constructor.
27
27
*/
28
28
public function __construct () {
29
+
30
+ add_action ( 'init ' , array ( $ this , 'run ' ) );
31
+ }
32
+
33
+ /**
34
+ * Run the class functionality.
35
+ *
36
+ * @return void
37
+ */
38
+ public function run () {
39
+ $ this ->setup_properties ();
40
+ $ this ->add_block_styles ();
41
+ }
42
+
43
+ /**
44
+ * Setup class properties.
45
+ *
46
+ * @return void
47
+ */
48
+ private function setup_properties () {
29
49
$ this ->styles = array (
30
50
'core/categories ' => array (
31
51
array (
@@ -34,9 +54,6 @@ public function __construct() {
34
54
),
35
55
),
36
56
);
37
-
38
- add_action ( 'init ' , array ( $ this , 'add_block_styles ' ) );
39
-
40
57
}
41
58
42
59
/**
You can’t perform that action at this time.
0 commit comments