PluginProbe
Easy Elements for Elementor – Addons & Website Templates / 1.2.1
Easy Elements for Elementor – Addons & Website Templates v1.2.1
1.5.3 1.5.2 1.5.1 1.5.0 1.4.9 1.4.6 1.4.7 1.4.8 1.4.5 1.4.4 1.4.3 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 All 47 releases
← All changes | widgets/tab/tab.php +24 -13 1.3.01.2.1 View file →
@@ -1,10 +1,32 @@
1 1 <?php
2 -namespace Easyel\EasyElements\Widgets;
3 2 if ( ! defined( 'ABSPATH' ) ) {
4 3 exit;
5 4 }
6 5 class Easyel_Tab_Widget extends \Elementor\Widget_Base {
6 +
7 + public function get_style_depends() {
8 + $handle = 'eel-tab-style';
9 + $css_path = plugin_dir_path( __FILE__ ) . 'css/tab.min.css';
10 +
11 + if ( ! wp_style_is( $handle, 'registered' ) && file_exists( $css_path ) ) {
12 + wp_register_style( $handle, plugins_url( 'css/tab.min.css', __FILE__ ), [], defined( 'WP_DEBUG' ) && WP_DEBUG ? filemtime( $css_path ) : EASYELEMENTS_VER );
13 + }
14 + return [ $handle ];
15 + }
16 +
17 +
18 + public function get_script_depends() {
19 + $handle = 'eel-tab-script';
20 + $js_path = plugin_dir_path( __FILE__ ) . 'js/tab.js';
21 +
22 + if ( ! wp_script_is( $handle, 'registered' ) && file_exists( $js_path ) ) {
23 + wp_enqueue_script( $handle, plugins_url( 'js/tab.js', __FILE__ ), [ 'jquery' ], defined( 'WP_DEBUG' ) && WP_DEBUG ? filemtime( $js_path ) : EASYELEMENTS_VER, true );
24 +
25 + }
26 + return [ $handle ];
27 + }
28 +
7 29 public function get_name() {
8 30 return 'eel-tab';
9 31 }
10 32
@@ -22,20 +44,8 @@
22 44
23 45 public function get_keywords() {
24 46 return [ 'tab', 'link', 'click', 'text' ];
25 47 }
26 -
27 - public function get_style_depends() {
28 - return [
29 - 'eel-tab',
30 - ];
31 - }
32 -
33 - public function get_script_depends() {
34 - return [
35 - 'eel-tab',
36 - ];
37 - }
38 48
39 49 protected function register_controls() {
40 50
41 51 $this->start_controls_section(
@@ -824,4 +834,5 @@
824 834 echo '</div>';
825 835 }
826 836 }
827 837 }
838 +?>