Update output code format.

This commit is contained in:
2023-02-17 13:50:40 +02:00
parent 3a78aee088
commit 80464a61d7
3 changed files with 5 additions and 6 deletions
@@ -19,9 +19,9 @@ class <%= blockClassModel %>_Component <% if (isComponentManager || isElementor)
wp_register_style( 'block-<%= blockFilename %>', $base_path . 'templates/styles/<%= blockFilename %>.min.css', $style_deps, self::VERSION );
$script_deps = apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::script_deps', [ 'assets-script' ] );
wp_register_script( 'block-<%= blockFilename %>', $base_path . 'templates/scripts/<%= blockFilename %>.min.js', $script_deps, self::VERSION, true );
wp_register_script( 'block-<%= blockFilename %>', $base_path . 'templates/scripts/<%= blockFilename %>.min.js', $script_deps, self::VERSION, true );<% if (!isElementor) { %>
<% if (!isElementor) { %>if ( ! is_admin() ) {
if ( ! is_admin() ) {
wp_enqueue_style( 'block-<%= blockFilename %>' );
wp_enqueue_script( 'block-<%= blockFilename %>' );
}<% } %>
@@ -46,7 +46,6 @@ class <%= blockClassModel %>_Component <% if (isComponentManager || isElementor)
$widgets_manager->register_widget_type( new Helpers\<%= blockClassModel %>_Elementor_Widget() );
}
<% } %>
}
<% if (isComponentManager) { %><%= blockClassModel %>_Component::get_instance();<% } else {
@@ -32,7 +32,7 @@ class <%= blockClassModel %>_Component extends \Core\Component {
$widgets_manager->register_widget_type( new Helpers\<%= blockClassModel %>_Elementor_Widget() );
}
<% } %><% if (include_acf_block) { %>function register_acf_block() {
<% } %><% if (include_acf_block) { %> function register_acf_block() {
$this->register_block( __DIR__ . "/<%= blockFilename %>.block.json", [
'style_assets' => [
[