Updated logic of Elementor's build. Support Elementor_Widget Trait.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>\Helpers;
|
||||
|
||||
class <%= blockClassModel %>_Elementor_Widget extends \Elementor\Widget_Base {
|
||||
use \Core\Traits\Elementor_Widget;
|
||||
|
||||
const PLUGIN_NAME = '<%= blockFilename %>';
|
||||
|
||||
public function get_name() {
|
||||
@@ -35,12 +37,8 @@ class <%= blockClassModel %>_Elementor_Widget extends \Elementor\Widget_Base {
|
||||
|
||||
$component = new \AXEWEB_Blocks\Blocks\<%= ownerClass %>\<%= blockClassModel %>\<%= blockClassModel %>_Component();
|
||||
|
||||
$args = self::prepare( $settings );
|
||||
$args = $this->prepare( $settings );
|
||||
$component->render( $args );
|
||||
}
|
||||
|
||||
public static function prepare( $args ): array {
|
||||
$args['section_class'] = 'axeweb-block';
|
||||
return $args;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user