Skip to content

Commit

Permalink
[#141] Fixing css/js bugs with preview and console log
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-schmidt-viget committed Aug 1, 2024
1 parent 62c3db0 commit 7ccbb2e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
4 changes: 0 additions & 4 deletions wp-content/plugins/acf-blocks-toolkit/includes/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ function block_attrs( array $block, string $custom_class = '', array $attrs = []

do_action( 'acfbt_block_attr', $block );

if ( is_preview() ) {
return;
}

echo wp_kses_data( get_block_wrapper_attributes( $extra ) );
}
}
Expand Down
10 changes: 4 additions & 6 deletions wp-content/themes/wp-starter/inc/class-vite.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ public function __construct() {

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

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

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

add_action( 'wp_head', [ $this, 'init' ] );
add_action( 'wp_head', [ $this, 'init' ], 100 );

add_action(
'admin_head',
Expand Down Expand Up @@ -455,5 +455,3 @@ public function block_assets( $entry = '' ): void {
}
}
}

new Vite();

0 comments on commit 7ccbb2e

Please sign in to comment.