PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.17.4
Shortcodes and extra features for Phlox theme v2.17.4
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / video.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 1 year ago accordion.php 1 year ago audio.php 4 years ago before-after.php 3 years ago button.php 1 year ago carousel-navigation.php 4 years ago circle-chart.php 1 year ago contact-box.php 4 years ago contact-form.php 1 year ago custom-list.php 1 year ago divider.php 4 years ago gallery.php 1 year ago gmap.php 4 years ago heading-modern.php 1 year ago icon.php 1 year ago image.php 1 year ago mailchimp.php 1 year ago modern-button.php 1 year ago products-grid.php 1 year ago quote.php 1 year ago recent-comments.php 1 year ago recent-posts-grid-carousel.php 1 year ago recent-posts-land-style.php 1 year ago recent-posts-masonry.php 1 year ago recent-posts-tiles-carousel.php 1 year ago recent-posts-tiles.php 1 year ago recent-posts-timeline.php 1 year ago recent-products.php 1 year ago responsive-table.php 1 year ago search.php 4 years ago staff.php 1 year ago svg.php 1 year ago tabs.php 1 year ago testimonial.php 1 year ago text.php 1 year ago touch-slider.php 1 year ago video.php 4 years ago
video.php
284 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 exit; // Exit if accessed directly.
10 }
11
12 /**
13 * Elementor 'Video' widget.
14 *
15 * Elementor widget that displays an 'Video' with lightbox.
16 *
17 * @since 1.0.0
18 */
19 class Video extends Widget_Base {
20
21 /**
22 * Get widget name.
23 *
24 * Retrieve 'Video' widget name.
25 *
26 * @since 1.0.0
27 * @access public
28 *
29 * @return string Widget name.
30 */
31 public function get_name() {
32 return 'aux_video';
33 }
34
35 /**
36 * Get widget title.
37 *
38 * Retrieve 'Video' widget title.
39 *
40 * @since 1.0.0
41 * @access public
42 *
43 * @return string Widget title.
44 */
45 public function get_title() {
46 return __('Video Player', 'auxin-elements' );
47 }
48
49 /**
50 * Get widget icon.
51 *
52 * Retrieve 'Video' widget icon.
53 *
54 * @since 1.0.0
55 * @access public
56 *
57 * @return string Widget icon.
58 */
59 public function get_icon() {
60 return 'eicon-youtube auxin-badge';
61 }
62
63 /**
64 * Get widget categories.
65 *
66 * Retrieve 'Video' widget icon.
67 *
68 * @since 1.0.0
69 * @access public
70 *
71 * @return string Widget icon.
72 */
73 public function get_categories() {
74 return array( 'auxin-core' );
75 }
76
77 /**
78 * Register 'Video' widget controls.
79 *
80 * Adds different input fields to allow the user to change and customize the widget settings.
81 *
82 * @since 1.0.0
83 * @access protected
84 */
85 protected function register_controls() {
86
87 /*-----------------------------------------------------------------------------------*/
88 /* audio_section
89 /*-----------------------------------------------------------------------------------*/
90
91 $this->start_controls_section(
92 'audio_section',
93 array(
94 'label' => __('Video', 'auxin-elements' ),
95 )
96 );
97
98 $this->add_control(
99 'type',
100 array(
101 'label' => __('Video Type', 'auxin-elements'),
102 'label_block' => true,
103 'type' => Controls_Manager::SELECT,
104 'default' => 'media',
105 'options' => array(
106 'media' => __( 'Media Library', 'auxin-elements' ),
107 'link' => __( 'Youtube/Vimeo Link', 'auxin-elements' )
108 )
109 )
110 );
111
112 $this->add_control(
113 'media',
114 array(
115 'label' => __('Video file','auxin-elements'),
116 'type' => 'aux-media',
117 'media_filter' => 'video',
118 'condition' => array(
119 'type' => array( 'media' ),
120 )
121 )
122 );
123
124 $this->add_control(
125 'provider_link',
126 array(
127 'label' => __('Youtube/Vimeo Link','auxin-elements'),
128 'description' => __('Youtube, Vimeo or any video embed link.','auxin-elements'),
129 'type' => Controls_Manager::URL,
130 'show_external' => false,
131 'placeholder' => 'https://vimeo.com/119777338',
132 'condition' => [
133 'type' => 'link'
134 ],
135 'dynamic' => [
136 'active' => true
137 ]
138 )
139 );
140
141 $this->add_control(
142 'autoplay',
143 array(
144 'label' => __('AutoPlay','auxin-elements' ),
145 'type' => Controls_Manager::SWITCHER,
146 'label_on' => __( 'On', 'auxin-elements' ),
147 'label_off' => __( 'Off', 'auxin-elements' ),
148 'return_value' => 'yes',
149 'default' => 'no'
150 )
151 );
152
153 $this->add_control(
154 'loop',
155 array(
156 'label' => __('Repeat the video','auxin-elements' ),
157 'type' => Controls_Manager::SWITCHER,
158 'label_on' => __( 'On', 'auxin-elements' ),
159 'label_off' => __( 'Off', 'auxin-elements' ),
160 'return_value' => 'yes',
161 'default' => 'yes'
162 )
163 );
164
165 $this->add_control(
166 'poster',
167 array(
168 'label' => __('Video poster','auxin-elements'),
169 'description' => __('An image that represents the video content.','auxin-elements'),
170 'type' => Controls_Manager::MEDIA
171 )
172 );
173
174 $this->end_controls_section();
175
176 /*-----------------------------------------------------------------------------------*/
177 /* skin_section
178 /*-----------------------------------------------------------------------------------*/
179
180 $this->start_controls_section(
181 'style_section',
182 array(
183 'label' => __('Style', 'auxin-elements' ),
184 'tab' => Controls_Manager::TAB_STYLE,
185 )
186 );
187
188 $this->add_control(
189 'width',
190 array(
191 'label' => __('Width','auxin-elements'),
192 'description' => __('Width size of video in pixel.','auxin-elements'),
193 'type' => Controls_Manager::SLIDER,
194 'size_units' => array('px'),
195 'range' => array(
196 'px' => array(
197 'min' => 1,
198 'max' => 1600,
199 'step' => 1
200 )
201 )
202 )
203 );
204
205
206 $this->add_control(
207 'height',
208 array(
209 'label' => __('Height','auxin-elements'),
210 'description' => __('Height size of video in pixel.','auxin-elements'),
211 'type' => Controls_Manager::SLIDER,
212 'size_units' => array('px'),
213 'range' => array(
214 'px' => array(
215 'min' => 1,
216 'max' => 1600,
217 'step' => 1
218 )
219 )
220 )
221 );
222
223 $this->add_control(
224 'skin',
225 array(
226 'label' => __('Player skin','auxin-elements'),
227 'description' => __('Specifies skin for the player.','auxin-elements'),
228 'type' => 'aux-visual-select',
229 'options' => array(
230 'dark' => array(
231 'label' => __('Dark', 'auxin-elements'),
232 'image' => AUXIN_URL . 'images/visual-select/audio-player-dark.svg'
233 ),
234 'light' => array(
235 'label' => __('Light', 'auxin-elements'),
236 'image' => AUXIN_URL . 'images/visual-select/audio-player-light.svg'
237 )
238 ),
239 'default' => 'dark'
240 )
241 );
242
243 $this->end_controls_section();
244 }
245
246 /**
247 * Render image box widget output on the frontend.
248 *
249 * Written in PHP and used to generate the final HTML.
250 *
251 * @since 1.0.0
252 * @access protected
253 */
254 protected function render() {
255
256 $settings = $this->get_settings_for_display();
257 $src = '';
258
259 if( 'media' == $settings['type'] ){
260 $src = $settings['media']['id'];
261 } elseif( 'link' == $settings['type'] ){
262 if ( ! $src = $settings['provider_link']['url'] ){
263 $src = 'https://vimeo.com/119777338';
264 }
265 }
266
267 $args = array(
268 'src' => $src,
269 'url' => '',
270 'autoplay' => $settings['autoplay'],
271 'loop' => $settings['loop'],
272 'poster' => $settings['poster']['id'],
273
274 'width' => $settings['width']['size'],
275 'height' => $settings['height']['size'],
276 'skin' => $settings['skin']
277 );
278
279 // get the shortcode base blog page
280 echo auxin_widget_video_callback( $args );
281 }
282
283 }
284