Skip to content

Commit

Permalink
🚨 Run Pint
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Dec 31, 2024
1 parent 8764c05 commit a27d05a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
public function __invoke()
{
if (file_exists($composer = __DIR__ . '/vendor/autoload.php')) {
if (file_exists($composer = __DIR__.'/vendor/autoload.php')) {
require_once $composer;
}

Expand Down
10 changes: 5 additions & 5 deletions src/GutenTweaks.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function inlineBlockStyles(): void

$styles = sprintf(
'<style>%s</style>',
(new Minify\CSS($this->path . 'public/css/app.css'))->minify()
(new Minify\CSS($this->path.'public/css/app.css'))->minify()
);

$styles = str_replace('@charset "UTF-8";', '', $styles);
Expand All @@ -72,7 +72,7 @@ public function inlineBlockStyles(): void
public function enqueueBlockAssets(): void
{
add_filter('enqueue_block_editor_assets', function () {
if ($manifest = include($this->path . 'public/js/editor.asset.php')) {
if ($manifest = include ($this->path.'public/js/editor.asset.php')) {
wp_enqueue_script(
'blocks/editor.js',
$this->asset('js/editor.js'),
Expand All @@ -89,13 +89,13 @@ public function enqueueBlockAssets(): void
*/
public function asset(string $asset = '', string $manifest = 'public/mix-manifest.json'): string
{
if (! file_exists($manifest = $this->path . $manifest)) {
return $this->uri . 'public/' . $asset;
if (! file_exists($manifest = $this->path.$manifest)) {
return $this->uri.'public/'.$asset;
}

$manifest = json_decode(file_get_contents($manifest), true);

return $this->uri . 'public/' . ($manifest[$asset] ?? $asset);
return $this->uri.'public/'.($manifest[$asset] ?? $asset);
}

/**
Expand Down

0 comments on commit a27d05a

Please sign in to comment.