|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
|
namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>; |
|
|
namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>; |
|
|
|
|
|
|
|
|
class <%= blockClassModel %>_Component <% if (isComponentManager) { %>extends \Core\Component <% } %>{ |
|
|
class <%= blockClassModel %>_Component <% if (isComponentManager || isElementor) { %>extends \Core\Component <% } %>{ |
|
|
const VERSION = '<%= version %>';<% if (isComponentManager) { %> |
|
|
const VERSION = '<%= version %>';<% if (isComponentManager) { %> |
|
|
public $hook_prefix = 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>';<% } %> |
|
|
public $hook_prefix = 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>';<% } %> |
|
|
|
|
|
|
|
|
@ -34,6 +34,10 @@ class <%= blockClassModel %>_Component <% if (isComponentManager) { %>extends \C |
|
|
return apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::content', $output ); |
|
|
return apply_filters( 'axeweb_blocks/<%= ownerFilename %>/<%= blockFilename %>::content', $output ); |
|
|
}<% if (isElementor) { %> |
|
|
}<% if (isElementor) { %> |
|
|
|
|
|
|
|
|
|
|
|
function register_custom_logic(): void { |
|
|
|
|
|
add_action( 'elementor/widgets/widgets_registered', [ $this, 'register_elementor_widget' ] ); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function register_elementor_widget( $widgets_manager ): void { |
|
|
function register_elementor_widget( $widgets_manager ): void { |
|
|
require_once "helpers/<%= blockClassModel %>_Elementor_Widget.php"; |
|
|
require_once "helpers/<%= blockClassModel %>_Elementor_Widget.php"; |
|
|
$widgets_manager->register_widget_type( new Helpers\<%= blockClassModel %>_Elementor_Widget() ); |
|
|
$widgets_manager->register_widget_type( new Helpers\<%= blockClassModel %>_Elementor_Widget() ); |
|
|
|