Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Merge branch 'fix/editor-style-enqueuing' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
admturner committed May 3, 2024
2 parents b43f54a + bc3c78e commit b48f7c3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions inc/asset-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ function (): void {
$asset_file['version'],
true
);

wp_enqueue_style(
'hrswds-global-editor-style',
get_template_directory_uri() . '/build/index.css',
array(),
$asset_file['version'],
);
}
);

Expand Down Expand Up @@ -76,6 +69,7 @@ function (): void {
* @return void
*/
function (): void {
global $current_screen;
$asset_file = include get_template_directory() . '/build/index.asset.php';

wp_enqueue_style(
Expand All @@ -84,6 +78,15 @@ function (): void {
array(),
$asset_file['version']
);

if ( $current_screen instanceof \WP_Screen && $current_screen->is_block_editor() ) {
wp_enqueue_style(
'hrswds-global-editor-style',

Check failure on line 84 in inc/asset-loader.php

View workflow job for this annotation

GitHub Actions / PHP Coding Standards

Multi-line function call not indented correctly; expected 20 spaces but found 16
get_template_directory_uri() . '/build/index.css',

Check failure on line 85 in inc/asset-loader.php

View workflow job for this annotation

GitHub Actions / PHP Coding Standards

Multi-line function call not indented correctly; expected 20 spaces but found 16
array(),

Check failure on line 86 in inc/asset-loader.php

View workflow job for this annotation

GitHub Actions / PHP Coding Standards

Multi-line function call not indented correctly; expected 20 spaces but found 16
$asset_file['version'],

Check failure on line 87 in inc/asset-loader.php

View workflow job for this annotation

GitHub Actions / PHP Coding Standards

Multi-line function call not indented correctly; expected 20 spaces but found 16
);

Check failure on line 88 in inc/asset-loader.php

View workflow job for this annotation

GitHub Actions / PHP Coding Standards

Multi-line function call not indented correctly; expected 16 spaces but found 12
}
}
);

Expand Down

0 comments on commit b48f7c3

Please sign in to comment.