Added Basic Elementor widget logic.

This commit is contained in:
2022-11-25 19:42:28 +02:00
parent 00866a8115
commit 4d1d2337bf
4 changed files with 85 additions and 8 deletions
@@ -36,4 +36,11 @@ class <%= blockClassModel %>_Component {
echo apply_filters( 'the_content', wpautop( $output ) );
}
<% if (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() );
}<% } %>
}
// ( new <%= blockClassModel %>_Component() ); // Initialization