]> _ Git - ccv-wordpress.git/commitdiff
WIP #3573 @0.75
authorStephen Cameron <stephen@cubedesigners.com>
Tue, 7 Apr 2020 16:05:30 +0000 (18:05 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Tue, 7 Apr 2020 16:05:30 +0000 (18:05 +0200)
wp-content/mu-plugins/cube/src/Elementor/Widgets/Timeline.php

index 67ffd5734ec42c4be9fe0d2b15cd8b856c726523..ac18875e598124bf26bc5530df39414a77477d93 100644 (file)
@@ -3,6 +3,7 @@
 namespace Cube\Elementor\Widgets;
 
 use Elementor\Controls_Manager;
+use Elementor\Utils;
 
 use function Roots\view;
 
@@ -63,7 +64,16 @@ class Timeline extends _Base {
                         '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',
@@ -72,15 +82,37 @@ class Timeline extends _Base {
                         '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 }}}',
             ]
         );