Update templates, white spacings and code format.
This commit is contained in:
@@ -44,8 +44,8 @@ class <%= blockClassModel %>_Component <% if (isComponentManager || isElementor)
|
||||
function register_elementor_widget( $widgets_manager ): void {
|
||||
require_once "helpers/<%= blockClassModel %>_Elementor_Widget.php";
|
||||
$widgets_manager->register_widget_type( new Helpers\<%= blockClassModel %>_Elementor_Widget() );
|
||||
}
|
||||
<% } %>
|
||||
}<% } %>
|
||||
|
||||
}
|
||||
|
||||
<% if (isComponentManager) { %><%= blockClassModel %>_Component::get_instance();<% } else {
|
||||
|
||||
@@ -24,15 +24,7 @@ class <%= blockClassModel %>_Component extends \Core\Component {
|
||||
|
||||
wp_enqueue_script( 'script-block-<%= blockFilename %>' );
|
||||
}<% } %>
|
||||
<% if (include_elementor_widget) { %>function register_custom_logic(): void {
|
||||
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_elementor_widget' ] );
|
||||
}
|
||||
|
||||
<% } %><% if (include_elementor_widget) { %> function register_elementor_widget( $widgets_manager ) {
|
||||
$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' => [
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user