File tree Expand file tree Collapse file tree 4 files changed +58
-2
lines changed
src/classes/Common/Integrations/Editor Expand file tree Collapse file tree 4 files changed +58
-2
lines changed Original file line number Diff line number Diff line change 3737
3838 CommonIntegrations \ACF ::class,
3939 CommonIntegrations \ACFBlockCreator::class,
40- CommonIntegrations \Editor::class,
40+
41+ // Block Editor Integration
42+ CommonIntegrations \Editor \Editor::class,
4143
4244 Customizer \Customizer::class,
4345 ReusableContent \ReusableContentHooks::class,
Original file line number Diff line number Diff line change 22
33declare (strict_types=1 );
44
5- namespace DoWStarterTheme \Common \Integrations ;
5+ namespace DoWStarterTheme \Common \Integrations \ Editor ;
66
77use DoWStarterTheme \Common \Contracts \Hookable ;
88use DoWStarterTheme \Common \Config \Config ;
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace DoWStarterTheme \Common \Integrations \Editor ;
6+
7+ use DoWStarterTheme \Common \Assets \Script ;
8+
9+ /**
10+ * Editor Script asset class.
11+ *
12+ * This class is responsible for enqueuing scripts in the block editor.
13+ */
14+ class EditorScript extends Script
15+ {
16+ /**
17+ * Enqueues asset.
18+ *
19+ * @action enqueue_block_editor_assets
20+ *
21+ * @return void
22+ */
23+ public function enqueueAsset (): void
24+ {
25+ $ this ->enqueue ();
26+ }
27+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ namespace DoWStarterTheme \Common \Integrations \Editor ;
6+
7+ use DoWStarterTheme \Common \Assets \Style ;
8+
9+ /**
10+ * Editor Style asset class.
11+ */
12+ class EditorStyle extends Style
13+ {
14+ protected string $ name = 'style-editor ' ;
15+
16+ /**
17+ * Enqueues asset.
18+ *
19+ * @action enqueue_block_editor_assets
20+ *
21+ * @return void
22+ */
23+ public function enqueueAsset (): void
24+ {
25+ $ this ->enqueue ();
26+ }
27+ }
You can’t perform that action at this time.
0 commit comments