-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCompiler.php
More file actions
44 lines (30 loc) · 899 Bytes
/
Compiler.php
File metadata and controls
44 lines (30 loc) · 899 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
namespace TailPress\Framework\Assets;
abstract class Compiler
{
public string $handle = 'tailpress';
public array $assets = [];
public array $dependencies = [];
public bool $inFooter = false;
public ?string $editorStyleFile = null;
public function editorStyleFile($file): self
{
$this->editorStyleFile = $file;
return $this;
}
public function enqueueEditorStyle()
{
add_theme_support('editor-styles');
add_editor_style($this->getEditorStyleFile());
}
public function getEditorStyleFile(): ?string
{
return $this->editorStyleFile;
}
public function registerAsset( $asset, $dependencies = [], $args = true ): self
{
$this->assets[ $asset ] = new Asset( path: $asset, dependencies: $dependencies, args: $args );
return $this;
}
public function enqueueAssets(): void {}
}