namespace Cube\Elementor\Widgets;
use Elementor\Controls_Manager;
+use Elementor\Utils;
use function Roots\view;
'label' => __('Highlight', 'cube'),
'type' => Controls_Manager::SWITCHER,
'return_value' => 'yes',
- 'default' => 'no',
+ 'default' => 'yes',
+ ],
+ [
+ 'name' => 'image',
+ 'label' => __('Image', 'cube'),
+ 'label_block' => true,
+ 'type' => Controls_Manager::MEDIA,
+ 'default' => [
+ 'url' => Utils::get_placeholder_image_src(),
+ ],
],
[
'name' => 'year',
'label_block' => true,
'default' => '',
],
+ [
+ 'name' => 'title',
+ 'label' => __('Title', 'cube'),
+ 'type' => Controls_Manager::TEXT,
+ 'label_block' => true,
+ 'default' => '',
+ ],
[
'name' => 'details',
'label' => __('Description', 'cube'),
'type' => Controls_Manager::WYSIWYG,
'default' => '',
],
-
+ [
+ 'name' => 'cta_text',
+ 'label' => __('Call to Action text', 'cube'),
+ 'type' => Controls_Manager::TEXT,
+ 'default' => ''
+ ],
+ [
+ 'name' => 'cta_link',
+ 'label' => __('Call to Action link', 'cube'),
+ 'type' => Controls_Manager::URL,
+ 'default' => [
+ 'url' => '',
+ 'is_external' => false,
+ ],
+ 'show_external' => true
+ ]
],
- 'title_field' => '{{{ year }}}',
+ 'title_field' => '{{{ year }}} {{{ title }}}',
]
);