Skip to content

Commit 94eb448

Browse files
[#141] Fixing css/js bugs with preview and console log (#142)
1 parent b085d80 commit 94eb448

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

wp-content/plugins/acf-blocks-toolkit/includes/helpers.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ function block_attrs( array $block, string $custom_class = '', array $attrs = []
7777

7878
do_action( 'acfbt_block_attr', $block );
7979

80-
if ( is_preview() ) {
81-
return;
82-
}
83-
8480
echo wp_kses_data( get_block_wrapper_attributes( $extra ) );
8581
}
8682
}

wp-content/themes/wp-starter/inc/class-vite.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ public function __construct() {
6464

6565
$this->env = getenv( 'ENVIRONMENT' );
6666

67-
//set frontend css/js
67+
// set frontend css/js
6868
$this->entries['default'] = 'main.js';
6969

70-
//set editor css/js
71-
$this->entries['editor'] = 'main.js';
70+
// set editor css/js
71+
$this->entries['editor'] = 'main.js';
7272

73-
add_action( 'wp_head', [ $this, 'init' ] );
73+
add_action( 'wp_head', [ $this, 'init' ], 100 );
7474

7575
add_action(
7676
'admin_head',
@@ -455,5 +455,3 @@ public function block_assets( $entry = '' ): void {
455455
}
456456
}
457457
}
458-
459-
new Vite();

0 commit comments

Comments
 (0)