File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ class Block_Patterns {
3737 * Block_Patterns constructor.
3838 */
3939 public function __construct () {
40- $ this ->setup_properties ();
4140
4241 add_action ( 'init ' , array ( $ this , 'run ' ) );
4342 }
@@ -48,6 +47,7 @@ public function __construct() {
4847 * @return void
4948 */
5049 public function run () {
50+ $ this ->setup_properties ();
5151 $ this ->register_categories ();
5252 $ this ->register_patterns ();
5353 }
Original file line number Diff line number Diff line change @@ -26,6 +26,26 @@ class Block_Styles {
2626 * Block Styles constructor.
2727 */
2828 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 () {
2949 $ this ->styles = array (
3050 'core/categories ' => array (
3151 array (
@@ -34,9 +54,6 @@ public function __construct() {
3454 ),
3555 ),
3656 );
37-
38- add_action ( 'init ' , array ( $ this , 'add_block_styles ' ) );
39-
4057 }
4158
4259 /**
You can’t perform that action at this time.
0 commit comments