Orbit Fox by ThemeIsle - Version 2.8.14

Version Description

  • 2019-12-02
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 Orbit Fox by ThemeIsle
Version 2.8.14
Comparing to
See all releases

Code changes from version 2.8.13 to 2.8.14

Files changed (32) hide show
  1. CHANGELOG.md +5 -0
  2. core/assets/css/orbit-fox-admin.css +1 -1
  3. core/includes/class-orbit-fox.php +1 -1
  4. obfx_modules/menu-icons/init.php +1 -1
  5. readme.md +6 -0
  6. readme.txt +6 -0
  7. themeisle-companion.php +1 -1
  8. themeisle-hash.json +1 -1
  9. vendor/autoload.php +1 -1
  10. vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php +27 -16
  11. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php +71 -44
  12. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php +197 -131
  13. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php +91 -79
  14. vendor/codeinwp/elementor-extra-widgets/widgets/woo/best-products.php +28 -20
  15. vendor/codeinwp/elementor-extra-widgets/widgets/woo/featured-products.php +17 -8
  16. vendor/codeinwp/elementor-extra-widgets/widgets/woo/popular-products.php +18 -8
  17. vendor/codeinwp/elementor-extra-widgets/widgets/woo/products-categories.php +18 -8
  18. vendor/codeinwp/elementor-extra-widgets/widgets/woo/recent-products.php +16 -6
  19. vendor/codeinwp/elementor-extra-widgets/widgets/woo/sale-products.php +17 -7
  20. vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget-plus.php +3 -1
  21. vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget.php +3 -1
  22. vendor/codeinwp/themeisle-content-forms/assets/content-forms.css +4 -0
  23. vendor/codeinwp/themeisle-content-forms/form_manager.php +2 -2
  24. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_manager.php +1 -1
  25. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php +12 -12
  26. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php +260 -251
  27. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_manager.php +3 -3
  28. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php +63 -44
  29. vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php +14 -14
  30. vendor/codeinwp/themeisle-content-forms/includes/widgets-public/contact_public.php +7 -7
  31. vendor/composer/autoload_real.php +5 -5
  32. vendor/composer/installed.json +8 -8
CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
 
 
 
 
 
 
2
  ### v2.8.13 - 2019-11-18
3
  **Changes:**
4
  * Fix dependency issues on content forms module
1
 
2
+ ### v2.8.14 - 2019-12-02
3
+ **Changes:**
4
+ * Fix fatal error with Membership Pro
5
+ * Various bug fixes to forms and Elementor widgets
6
+
7
  ### v2.8.13 - 2019-11-18
8
  **Changes:**
9
  * Fix dependency issues on content forms module
core/assets/css/orbit-fox-admin.css CHANGED
@@ -8,7 +8,7 @@
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
- Version: 2.8.13
12
  */
13
 
14
  /* Document
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
+ Version: 2.8.14
12
  */
13
 
14
  /* Document
core/includes/class-orbit-fox.php CHANGED
@@ -69,7 +69,7 @@ class Orbit_Fox {
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
- $this->version = '2.8.13';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
+ $this->version = '2.8.14';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
obfx_modules/menu-icons/init.php CHANGED
@@ -280,7 +280,7 @@ class Menu_Icons_OBFX_Module extends Orbit_Fox_Module_Abstract {
280
  require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' );
281
 
282
  // Let's check if another walker has been defined.
283
- $walker = apply_filters( 'wp_edit_nav_menu_walker', '' );
284
 
285
  // Yes, a conflict!
286
  if ( ! empty( $walker ) && $walker !== 'Menu_Icons_OBFX_Walker' ) {
280
  require_once( ABSPATH . 'wp-admin/includes/nav-menu.php' );
281
 
282
  // Let's check if another walker has been defined.
283
+ $walker = apply_filters( 'wp_edit_nav_menu_walker', '', '' );
284
 
285
  // Yes, a conflict!
286
  if ( ! empty( $walker ) && $walker !== 'Menu_Icons_OBFX_Walker' ) {
readme.md CHANGED
@@ -108,6 +108,12 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
108
  5. Social Sharing Module
109
 
110
  ## Changelog ##
 
 
 
 
 
 
111
  ### 2.8.13 - 2019-11-18 ###
112
 
113
  * Fix dependency issues on content forms module
108
  5. Social Sharing Module
109
 
110
  ## Changelog ##
111
+ ### 2.8.14 - 2019-12-02 ###
112
+
113
+ * Fix fatal error with Membership Pro
114
+ * Various bug fixes to forms and Elementor widgets
115
+
116
+
117
  ### 2.8.13 - 2019-11-18 ###
118
 
119
  * Fix dependency issues on content forms module
readme.txt CHANGED
@@ -108,6 +108,12 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
108
  5. Social Sharing Module
109
 
110
  == Changelog ==
 
 
 
 
 
 
111
  = 2.8.13 - 2019-11-18 =
112
 
113
  * Fix dependency issues on content forms module
108
  5. Social Sharing Module
109
 
110
  == Changelog ==
111
+ = 2.8.14 - 2019-12-02 =
112
+
113
+ * Fix fatal error with Membership Pro
114
+ * Various bug fixes to forms and Elementor widgets
115
+
116
+
117
  = 2.8.13 - 2019-11-18 =
118
 
119
  * Fix dependency issues on content forms module
themeisle-companion.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://orbitfox.com/
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
- * Version: 2.8.13
19
  * Author: Themeisle
20
  * Author URI: https://orbitfox.com/
21
  * License: GPL-2.0+
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://orbitfox.com/
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, Gutenberg blocks, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
+ * Version: 2.8.14
19
  * Author: Themeisle
20
  * Author URI: https://orbitfox.com/
21
  * License: GPL-2.0+
themeisle-hash.json CHANGED
@@ -1 +1 @@
1
- {"class-autoloader.php":"61ea652f66f6ca0ead234c6357f88791","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"cce7672bca8f3e9dc53a7114109f72d0","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
1
+ {"class-autoloader.php":"61ea652f66f6ca0ead234c6357f88791","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"3da8830321a7bb9e0736233636d23e3e","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit059169ae0106262ecfb9bf0d45d6d9fa::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitcb0da32f0096cc6797604c220560a841::getLoader();
vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php CHANGED
@@ -10,6 +10,8 @@
10
 
11
  namespace ThemeIsle;
12
 
 
 
13
  if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
14
 
15
  class ElementorExtraWidgets {
@@ -28,15 +30,15 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
28
  * Defines the library behaviour
29
  */
30
  protected function init() {
31
- add_action( 'elementor/init', array( $this, 'add_elementor_category' ) );
32
- add_action( 'elementor/frontend/after_register_scripts', array( $this, 'register_assets' ) );
33
- add_action( 'elementor/preview/enqueue_scripts', array( $this, 'register_assets' ) );
 
 
34
 
35
  add_action( 'widgets_init', array( $this, 'register_woo_widgets' ) );
36
  add_action( 'widgets_init', array( $this, 'register_posts_widgets' ) );
37
 
38
- add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ), 999 );
39
-
40
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'add_elementor_widgets' ) );
41
  if ( ! defined( 'EAW_PRO_VERSION' ) ) {
42
  add_action( 'elementor/editor/after_enqueue_scripts', array( $this, 'enqueue_sidebar_css' ) );
@@ -45,8 +47,10 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
45
 
46
  /**
47
  * Add the Category for Orbit Fox Widgets.
 
 
48
  */
49
- public function add_elementor_category() {
50
 
51
  $category_args = apply_filters( 'elementor_extra_widgets_category_args', array(
52
  'slug' => 'obfx-elementor-widgets',
@@ -55,29 +59,36 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
55
  ) );
56
 
57
  // add a separate category for the premium widgets
58
- \Elementor\Plugin::instance()->elements_manager->add_category(
59
  $category_args['slug'] . '-pro',
60
  array(
61
  'title' => 'Premium ' . $category_args['title'],
62
  'icon' => $category_args['slug'],
63
- ),
64
- 1
65
  );
66
 
67
- \Elementor\Plugin::instance()->elements_manager->add_category(
68
  $category_args['slug'],
69
  array(
70
  'title' => $category_args['title'],
71
  'icon' => $category_args['slug'],
72
- ),
73
- 1
74
  );
75
  }
76
 
77
- public function register_assets() {
78
- // Register custom JS for grid.
79
- wp_register_script( 'obfx-grid-js', plugins_url( '/js/obfx-grid.js', __FILE__ ), array(), $this::$version, true );
 
80
  wp_register_style( 'eaw-elementor', plugins_url( '/css/public.css', __FILE__ ), array(), $this::$version );
 
 
 
 
 
 
 
 
81
  }
82
 
83
  public function enqueue_sidebar_css() {
@@ -264,4 +275,4 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
264
  _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'themeisle-companion' ), '1.0.0' );
265
  }
266
  }
267
- }
10
 
11
  namespace ThemeIsle;
12
 
13
+ use Elementor\Plugin;
14
+
15
  if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
16
 
17
  class ElementorExtraWidgets {
30
  * Defines the library behaviour
31
  */
32
  protected function init() {
33
+
34
+ add_action( 'elementor/frontend/after_enqueue_styles', array( $this, 'register_styles' ) );
35
+ add_action( 'elementor/frontend/after_register_scripts', [ $this, 'register_scripts' ] );
36
+
37
+ add_action( 'elementor/elements/categories_registered', array( $this, 'add_elementor_category' ) );
38
 
39
  add_action( 'widgets_init', array( $this, 'register_woo_widgets' ) );
40
  add_action( 'widgets_init', array( $this, 'register_posts_widgets' ) );
41
 
 
 
42
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'add_elementor_widgets' ) );
43
  if ( ! defined( 'EAW_PRO_VERSION' ) ) {
44
  add_action( 'elementor/editor/after_enqueue_scripts', array( $this, 'enqueue_sidebar_css' ) );
47
 
48
  /**
49
  * Add the Category for Orbit Fox Widgets.
50
+ *
51
+ * @param \Elementor\Elements_Manager $elements_manager Elementor elements manager.
52
  */
53
+ public function add_elementor_category( $elements_manager ) {
54
 
55
  $category_args = apply_filters( 'elementor_extra_widgets_category_args', array(
56
  'slug' => 'obfx-elementor-widgets',
59
  ) );
60
 
61
  // add a separate category for the premium widgets
62
+ $elements_manager->add_category(
63
  $category_args['slug'] . '-pro',
64
  array(
65
  'title' => 'Premium ' . $category_args['title'],
66
  'icon' => $category_args['slug'],
67
+ )
 
68
  );
69
 
70
+ $elements_manager->add_category(
71
  $category_args['slug'],
72
  array(
73
  'title' => $category_args['title'],
74
  'icon' => $category_args['slug'],
75
+ )
 
76
  );
77
  }
78
 
79
+ /**
80
+ * Register style.
81
+ */
82
+ public function register_styles() {
83
  wp_register_style( 'eaw-elementor', plugins_url( '/css/public.css', __FILE__ ), array(), $this::$version );
84
+ wp_register_style( 'font-awesome-5-all', ELEMENTOR_ASSETS_URL . 'lib/font-awesome/css/all.min.css', false, $this::$version );
85
+ }
86
+
87
+ /**
88
+ * Register js scripts.
89
+ */
90
+ public function register_scripts() {
91
+ wp_register_script( 'obfx-grid-js', plugins_url( '/js/obfx-grid.js', __FILE__ ), array(), $this::$version, true );
92
  }
93
 
94
  public function enqueue_sidebar_css() {
275
  _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'themeisle-companion' ), '1.0.0' );
276
  }
277
  }
278
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php CHANGED
@@ -11,8 +11,11 @@
11
  namespace ThemeIsle\ElementorExtraWidgets;
12
 
13
  use Elementor\Controls_Manager;
 
14
  use Elementor\Group_Control_Box_Shadow;
 
15
  use Elementor\Scheme_Color;
 
16
  use Elementor\Widget_Base;
17
 
18
  if ( ! defined( 'ABSPATH' ) ) {
@@ -62,6 +65,15 @@ class Posts_Grid extends Widget_Base {
62
  return [ 'obfx-grid-js' ];
63
  }
64
 
 
 
 
 
 
 
 
 
 
65
  /**
66
  * Widget Category.
67
  *
@@ -305,6 +317,26 @@ class Posts_Grid extends Widget_Base {
305
  ]
306
  );
307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  // Image height.
309
  $this->add_responsive_control(
310
  'grid_image_height',
@@ -765,7 +797,7 @@ class Posts_Grid extends Widget_Base {
765
 
766
  // Background.
767
  $this->add_group_control(
768
- \Elementor\Group_Control_Background::get_type(),
769
  [
770
  'name' => 'grid_style_background',
771
  'types' => [ 'classic', 'gradient' ],
@@ -821,7 +853,7 @@ class Posts_Grid extends Widget_Base {
821
 
822
  // Background for items options.
823
  $this->add_group_control(
824
- \Elementor\Group_Control_Background::get_type(),
825
  [
826
  'name' => 'grid_items_style_background',
827
  'types' => [ 'classic', 'gradient' ],
@@ -914,10 +946,10 @@ class Posts_Grid extends Widget_Base {
914
 
915
  // Title typography.
916
  $this->add_group_control(
917
- \Elementor\Group_Control_Typography::get_type(),
918
  [
919
  'name' => 'grid_title_style_typography',
920
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
921
  'selector' => '{{WRAPPER}} .obfx-grid .entry-title.obfx-grid-title, {{WRAPPER}} .obfx-grid .entry-title.obfx-grid-title > a',
922
  ]
923
  );
@@ -973,11 +1005,11 @@ class Posts_Grid extends Widget_Base {
973
 
974
  // Meta typography.
975
  $this->add_group_control(
976
- \Elementor\Group_Control_Typography::get_type(),
977
  [
978
  'name' => 'grid_meta_style_typography',
979
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
980
- 'selector' => '{{WRAPPER}} .obfx-grid-meta',
981
  ]
982
  );
983
 
@@ -999,6 +1031,23 @@ class Posts_Grid extends Widget_Base {
999
  ]
1000
  );
1001
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1002
  // Meta margin.
1003
  $this->add_responsive_control(
1004
  'grid_meta_style_margin',
@@ -1030,10 +1079,10 @@ class Posts_Grid extends Widget_Base {
1030
 
1031
  // Content typography.
1032
  $this->add_group_control(
1033
- \Elementor\Group_Control_Typography::get_type(),
1034
  [
1035
  'name' => 'grid_content_style_typography',
1036
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
1037
  'selector' => '{{WRAPPER}} .obfx-grid-content',
1038
  'condition' => [
1039
  'section_grid_content.grid_content_hide' => '',
@@ -1092,10 +1141,10 @@ class Posts_Grid extends Widget_Base {
1092
 
1093
  // Price typography.
1094
  $this->add_group_control(
1095
- \Elementor\Group_Control_Typography::get_type(),
1096
  [
1097
  'name' => 'grid_content_price_style_typography',
1098
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
1099
  'selector' => '{{WRAPPER}} .obfx-grid-price',
1100
  'condition' => [
1101
  'section_grid_content.grid_content_price' => 'yes',
@@ -1167,10 +1216,10 @@ class Posts_Grid extends Widget_Base {
1167
 
1168
  // Content typography.
1169
  $this->add_group_control(
1170
- \Elementor\Group_Control_Typography::get_type(),
1171
  [
1172
  'name' => 'grid_button_style_typography',
1173
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
1174
  'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1175
  'condition' => [
1176
  'section_grid_content.grid_content_default_btn!' => '',
@@ -1397,9 +1446,6 @@ class Posts_Grid extends Widget_Base {
1397
  protected function render() {
1398
  // Get settings.
1399
  $settings = $this->get_settings();
1400
- $this->maybe_load_widget_style();
1401
- // ensure the needed scripts
1402
-
1403
 
1404
  // Output.
1405
  echo '<div class="obfx-grid">';
@@ -1487,11 +1533,10 @@ class Posts_Grid extends Widget_Base {
1487
  // Button.
1488
  $this->renderButton();
1489
 
1490
- echo '</div><!-- .obfx-grid-col-content -->';
1491
  echo '</article>';
1492
  echo '</div>';
1493
-
1494
- } // End while().
1495
 
1496
  // Pagination.
1497
  if ( ! empty( $settings['grid_pagination'] ) ) { ?>
@@ -1551,10 +1596,11 @@ class Posts_Grid extends Widget_Base {
1551
  $a_tag_open = $settings['grid_image_link'] == 'yes' ? '<a href="' . get_permalink() . '" title="' . the_title( '', '', false ) .'">' : '';
1552
  $a_tag_close = '</a>';
1553
 
 
1554
  echo '<div class="obfx-grid-col-image" '. $alignment .'>';
1555
  echo $a_tag_open;
1556
  the_post_thumbnail(
1557
- 'full', array(
1558
  'class' => 'img-responsive',
1559
  'alt' => get_the_title( get_post_thumbnail_id() ),
1560
  )
@@ -1604,7 +1650,7 @@ class Posts_Grid extends Widget_Base {
1604
  case 'author': ?>
1605
  <span class="obfx-grid-author">
1606
  <?php
1607
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-user"></i>' : '';
1608
 
1609
  echo get_the_author(); ?>
1610
  </span>
@@ -1614,7 +1660,7 @@ class Posts_Grid extends Widget_Base {
1614
  case 'date': ?>
1615
  <span class="obfx-grid-date">
1616
  <?php
1617
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-calendar"></i>' : '';
1618
  echo get_the_date(); ?>
1619
  </span>
1620
  <?php
@@ -1633,7 +1679,7 @@ class Posts_Grid extends Widget_Base {
1633
  case 'comments': ?>
1634
  <span class="obfx-grid-comments">
1635
  <?php
1636
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-comment"></i>' : '';
1637
 
1638
  if ( $settings['grid_post_type'] == 'product' ) {
1639
  echo comments_number( __( 'No reviews', 'themeisle-companion' ), __( '1 review', 'themeisle-companion' ), __( '% reviews', 'themeisle-companion' ) );
@@ -1758,7 +1804,7 @@ class Posts_Grid extends Widget_Base {
1758
  if ( $post_type_category ) { ?>
1759
  <span class="obfx-grid-categories">
1760
  <?php
1761
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-bookmark"></i>' : '';
1762
 
1763
  foreach ( $post_type_category as $category ) {
1764
  if ( $i == $maxCategories ) {
@@ -1790,7 +1836,7 @@ class Posts_Grid extends Widget_Base {
1790
  if ( $post_type_tags ) { ?>
1791
  <span class="obfx-grid-tags">
1792
  <?php
1793
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-tags"></i>' : '';
1794
 
1795
  foreach ( $post_type_tags as $tag ) {
1796
  if ( $i == $maxTags ) {
@@ -1808,23 +1854,4 @@ class Posts_Grid extends Widget_Base {
1808
  <?php
1809
  }
1810
  }
1811
-
1812
- /**
1813
- * Load the widget style dynamically if it is a widget preview
1814
- * or enqueue style and scripts if not
1815
- *
1816
- * This way we are sure that the assets files are loaded only when this block is present in page.
1817
- */
1818
- protected function maybe_load_widget_style() {
1819
- if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
1820
- <style>
1821
- <?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
1822
- </style>
1823
- <?php
1824
- } else {
1825
- wp_enqueue_script( 'obfx-grid-js' );
1826
- wp_enqueue_style( 'eaw-elementor' );
1827
- }
1828
- }
1829
  }
1830
-
11
  namespace ThemeIsle\ElementorExtraWidgets;
12
 
13
  use Elementor\Controls_Manager;
14
+ use Elementor\Group_Control_Background;
15
  use Elementor\Group_Control_Box_Shadow;
16
+ use Elementor\Group_Control_Typography;
17
  use Elementor\Scheme_Color;
18
+ use Elementor\Scheme_Typography;
19
  use Elementor\Widget_Base;
20
 
21
  if ( ! defined( 'ABSPATH' ) ) {
65
  return [ 'obfx-grid-js' ];
66
  }
67
 
68
+ /**
69
+ * Retrieve the list of styles the post grid widget depended on.
70
+ *
71
+ * @return array Widget scripts dependencies.
72
+ */
73
+ public function get_style_depends() {
74
+ return [ 'eaw-elementor', 'font-awesome-5-all' ];
75
+ }
76
+
77
  /**
78
  * Widget Category.
79
  *
317
  ]
318
  );
319
 
320
+ $available_size = [ 'full' => __( 'Full size', 'themeisle-companion' ) ];
321
+ global $_wp_additional_image_sizes;
322
+ if ( ! empty( $_wp_additional_image_sizes ) ) {
323
+ foreach ( $_wp_additional_image_sizes as $label => $size_data ) {
324
+ if ( $size_data['height'] === 0 || $size_data['width'] === 0 ){
325
+ continue;
326
+ }
327
+ $available_size[ $label ] = $size_data['width'] . ' x ' . $size_data['height'];
328
+ }
329
+ }
330
+
331
+ $this->add_control(
332
+ 'grid_image_size',
333
+ [
334
+ 'label' => __( 'Image size', 'plugin-domain', 'themeisle-companion' ),
335
+ 'type' => Controls_Manager::SELECT,
336
+ 'options' => array_unique( $available_size ),
337
+ ]
338
+ );
339
+
340
  // Image height.
341
  $this->add_responsive_control(
342
  'grid_image_height',
797
 
798
  // Background.
799
  $this->add_group_control(
800
+ Group_Control_Background::get_type(),
801
  [
802
  'name' => 'grid_style_background',
803
  'types' => [ 'classic', 'gradient' ],
853
 
854
  // Background for items options.
855
  $this->add_group_control(
856
+ Group_Control_Background::get_type(),
857
  [
858
  'name' => 'grid_items_style_background',
859
  'types' => [ 'classic', 'gradient' ],
946
 
947
  // Title typography.
948
  $this->add_group_control(
949
+ Group_Control_Typography::get_type(),
950
  [
951
  'name' => 'grid_title_style_typography',
952
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
953
  'selector' => '{{WRAPPER}} .obfx-grid .entry-title.obfx-grid-title, {{WRAPPER}} .obfx-grid .entry-title.obfx-grid-title > a',
954
  ]
955
  );
1005
 
1006
  // Meta typography.
1007
  $this->add_group_control(
1008
+ Group_Control_Typography::get_type(),
1009
  [
1010
  'name' => 'grid_meta_style_typography',
1011
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1012
+ 'selector' => '{{WRAPPER}} .obfx-grid-meta > span',
1013
  ]
1014
  );
1015
 
1031
  ]
1032
  );
1033
 
1034
+ $this->add_responsive_control(
1035
+ 'grid_meta_icon_spacing',
1036
+ [
1037
+ 'label' => __( 'Icons spacing', 'themeisle-companion' ),
1038
+ 'type' => Controls_Manager::SLIDER,
1039
+ 'range' => [
1040
+ 'px' => [
1041
+ 'min' => 0,
1042
+ 'max' => 50,
1043
+ ],
1044
+ ],
1045
+ 'selectors' => [
1046
+ '{{WRAPPER}} .obfx-grid-meta i' => 'margin-right: {{SIZE}}{{UNIT}};',
1047
+ ],
1048
+ ]
1049
+ );
1050
+
1051
  // Meta margin.
1052
  $this->add_responsive_control(
1053
  'grid_meta_style_margin',
1079
 
1080
  // Content typography.
1081
  $this->add_group_control(
1082
+ Group_Control_Typography::get_type(),
1083
  [
1084
  'name' => 'grid_content_style_typography',
1085
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1086
  'selector' => '{{WRAPPER}} .obfx-grid-content',
1087
  'condition' => [
1088
  'section_grid_content.grid_content_hide' => '',
1141
 
1142
  // Price typography.
1143
  $this->add_group_control(
1144
+ Group_Control_Typography::get_type(),
1145
  [
1146
  'name' => 'grid_content_price_style_typography',
1147
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1148
  'selector' => '{{WRAPPER}} .obfx-grid-price',
1149
  'condition' => [
1150
  'section_grid_content.grid_content_price' => 'yes',
1216
 
1217
  // Content typography.
1218
  $this->add_group_control(
1219
+ Group_Control_Typography::get_type(),
1220
  [
1221
  'name' => 'grid_button_style_typography',
1222
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1223
  'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1224
  'condition' => [
1225
  'section_grid_content.grid_content_default_btn!' => '',
1446
  protected function render() {
1447
  // Get settings.
1448
  $settings = $this->get_settings();
 
 
 
1449
 
1450
  // Output.
1451
  echo '<div class="obfx-grid">';
1533
  // Button.
1534
  $this->renderButton();
1535
 
1536
+ echo '</div>';
1537
  echo '</article>';
1538
  echo '</div>';
1539
+ }
 
1540
 
1541
  // Pagination.
1542
  if ( ! empty( $settings['grid_pagination'] ) ) { ?>
1596
  $a_tag_open = $settings['grid_image_link'] == 'yes' ? '<a href="' . get_permalink() . '" title="' . the_title( '', '', false ) .'">' : '';
1597
  $a_tag_close = '</a>';
1598
 
1599
+ $image_size = ! empty( $settings['grid_image_size'] ) ? $settings['grid_image_size'] : 'full';
1600
  echo '<div class="obfx-grid-col-image" '. $alignment .'>';
1601
  echo $a_tag_open;
1602
  the_post_thumbnail(
1603
+ $image_size, array(
1604
  'class' => 'img-responsive',
1605
  'alt' => get_the_title( get_post_thumbnail_id() ),
1606
  )
1650
  case 'author': ?>
1651
  <span class="obfx-grid-author">
1652
  <?php
1653
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fas fa-user"></i>' : '';
1654
 
1655
  echo get_the_author(); ?>
1656
  </span>
1660
  case 'date': ?>
1661
  <span class="obfx-grid-date">
1662
  <?php
1663
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fas fa-calendar"></i>' : '';
1664
  echo get_the_date(); ?>
1665
  </span>
1666
  <?php
1679
  case 'comments': ?>
1680
  <span class="obfx-grid-comments">
1681
  <?php
1682
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fas fa-comment"></i>' : '';
1683
 
1684
  if ( $settings['grid_post_type'] == 'product' ) {
1685
  echo comments_number( __( 'No reviews', 'themeisle-companion' ), __( '1 review', 'themeisle-companion' ), __( '% reviews', 'themeisle-companion' ) );
1804
  if ( $post_type_category ) { ?>
1805
  <span class="obfx-grid-categories">
1806
  <?php
1807
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fas fa-bookmark"></i>' : '';
1808
 
1809
  foreach ( $post_type_category as $category ) {
1810
  if ( $i == $maxCategories ) {
1836
  if ( $post_type_tags ) { ?>
1837
  <span class="obfx-grid-tags">
1838
  <?php
1839
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fas fa-tags"></i>' : '';
1840
 
1841
  foreach ( $post_type_tags as $tag ) {
1842
  if ( $i == $maxTags ) {
1854
  <?php
1855
  }
1856
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1857
  }
 
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php CHANGED
@@ -9,16 +9,21 @@
9
  */
10
  namespace ThemeIsle\ElementorExtraWidgets;
11
 
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- } // End if().
 
 
 
 
 
15
 
16
  /**
17
  * Class Pricing_Table
18
  *
19
  * @package ThemeIsle\ElementorExtraWidgets
20
  */
21
- class Pricing_Table extends \Elementor\Widget_Base {
22
 
23
  /**
24
  * Widget title.
@@ -47,6 +52,15 @@ class Pricing_Table extends \Elementor\Widget_Base {
47
  return 'obfx-pricing-table';
48
  }
49
 
 
 
 
 
 
 
 
 
 
50
  /**
51
  * Widget Category
52
  *
@@ -93,7 +107,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
93
  $this->add_control(
94
  'title',
95
  [
96
- 'type' => \Elementor\Controls_Manager::TEXT,
97
  'label' => __( 'Title', 'themeisle-companion' ),
98
  'placeholder' => __( 'Title', 'themeisle-companion' ),
99
  'default' => __( 'Pricing Plan', 'themeisle-companion' ),
@@ -103,7 +117,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
103
  $this->add_control(
104
  'title_tag',
105
  [
106
- 'type' => \Elementor\Controls_Manager::SELECT,
107
  'label' => __( 'Title HTML tag', 'themeisle-companion' ),
108
  'default' => 'h3',
109
  'options' => [
@@ -121,7 +135,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
121
  $this->add_control(
122
  'subtitle',
123
  [
124
- 'type' => \Elementor\Controls_Manager::TEXT,
125
  'label' => __( 'Subtitle', 'themeisle-companion' ),
126
  'placeholder' => __( 'Subtitle', 'themeisle-companion' ),
127
  'default' => __( 'Description', 'themeisle-companion' ),
@@ -131,7 +145,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
131
  $this->add_control(
132
  'subtitle_tag',
133
  [
134
- 'type' => \Elementor\Controls_Manager::SELECT,
135
  'label' => __( 'Subtitle HTML Tag', 'themeisle-companion' ),
136
  'default' => 'p',
137
  'options' => [
@@ -162,7 +176,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
162
  $this->add_control(
163
  'price_tag_text',
164
  [
165
- 'type' => \Elementor\Controls_Manager::TEXT,
166
  'label' => __( 'Price', 'themeisle-companion' ),
167
  'placeholder' => __( 'Price', 'themeisle-companion' ),
168
  'default' => __( '50', 'themeisle-companion' ),
@@ -173,7 +187,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
173
  $this->add_control(
174
  'price_tag_currency',
175
  [
176
- 'type' => \Elementor\Controls_Manager::TEXT,
177
  'label' => __( 'Currency', 'themeisle-companion' ),
178
  'placeholder' => __( 'Currency', 'themeisle-companion' ),
179
  'default' => __( '$', 'themeisle-companion' ),
@@ -183,7 +197,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
183
  $this->add_control(
184
  'price_tag_currency_position',
185
  [
186
- 'type' => \Elementor\Controls_Manager::SELECT,
187
  'label' => __( 'Currency Position', 'themeisle-companion' ),
188
  'default' => 'left',
189
  'options' => [
@@ -196,7 +210,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
196
  $this->add_control(
197
  'price_tag_period',
198
  [
199
- 'type' => \Elementor\Controls_Manager::TEXT,
200
  'label' => __( 'Period', 'themeisle-companion' ),
201
  'placeholder' => __( '/month', 'themeisle-companion' ),
202
  'default' => __( '/month', 'themeisle-companion' ),
@@ -221,7 +235,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
221
  'feature_list',
222
  [
223
  'label' => __( 'Plan Features', 'themeisle-companion' ),
224
- 'type' => \Elementor\Controls_Manager::REPEATER,
225
  'default' => [
226
  [
227
  'accent' => __( 'First', 'themeisle-companion' ),
@@ -238,7 +252,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
238
  ],
239
  'fields' => [
240
  [
241
- 'type' => \Elementor\Controls_Manager::TEXT,
242
  'name' => 'accent',
243
  'label' => __( 'Accented Text', 'themeisle-companion' ),
244
  'description' => __( 'Appears before feature text', 'themeisle-companion' ),
@@ -246,20 +260,23 @@ class Pricing_Table extends \Elementor\Widget_Base {
246
  'default' => __( 'Accent', 'themeisle-companion' ),
247
  ],
248
  [
249
- 'type' => \Elementor\Controls_Manager::TEXT,
250
  'name' => 'text',
251
  'label' => __( 'Text', 'themeisle-companion' ),
252
  'label_block' => true,
253
  'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
254
  'default' => __( 'Feature', 'themeisle-companion' ),
255
  ],
256
- [
257
- 'type' => \Elementor\Controls_Manager::ICON,
258
- 'name' => 'feature_icon',
259
- 'label' => __( 'Icon', 'themeisle-companion' ),
260
- 'label_block' => true,
261
- 'default' => 'fa fa-star',
262
- ],
 
 
 
263
  ],
264
  'title_field' => '{{ accent + " " + text }}',
265
  ]
@@ -269,7 +286,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
269
  'features_align',
270
  [
271
  'label' => __( 'Alignment', 'themeisle-companion' ),
272
- 'type' => \Elementor\Controls_Manager::CHOOSE,
273
  'options' => [
274
  'left' => [
275
  'title' => __( 'Left', 'themeisle-companion' ),
@@ -312,7 +329,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
312
  $this->add_control(
313
  'button_text',
314
  [
315
- 'type' => \Elementor\Controls_Manager::TEXT,
316
  'label' => __( 'Text', 'themeisle-companion' ),
317
  'placeholder' => __( 'Buy Now', 'themeisle-companion' ),
318
  'default' => __( 'Buy Now', 'themeisle-companion' ),
@@ -322,26 +339,25 @@ class Pricing_Table extends \Elementor\Widget_Base {
322
  $this->add_control(
323
  'button_link',
324
  [
325
- 'type' => \Elementor\Controls_Manager::URL,
326
  'label' => __( 'Link', 'themeisle-companion' ),
327
  'placeholder' => __( 'https://example.com', 'themeisle-companion' ),
328
  ]
329
  );
330
 
331
  $this->add_control(
332
- 'button_icon',
333
  [
334
- 'type' => \Elementor\Controls_Manager::ICON,
335
- 'label' => __( 'Icon', 'themeisle-companion' ),
336
- 'label_block' => true,
337
- 'default' => '',
338
  ]
339
  );
340
 
341
  $this->add_control(
342
  'button_icon_align',
343
  [
344
- 'type' => \Elementor\Controls_Manager::SELECT,
345
  'label' => __( 'Icon Position', 'themeisle-companion' ),
346
  'default' => 'left',
347
  'options' => [
@@ -357,7 +373,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
357
  $this->add_control(
358
  'button_icon_indent',
359
  [
360
- 'type' => \Elementor\Controls_Manager::SLIDER,
361
  'label' => __( 'Icon Spacing', 'themeisle-companion' ),
362
  'range' => [
363
  'px' => [
@@ -384,7 +400,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
384
  'section_header_style',
385
  [
386
  'label' => __( 'Header', 'themeisle-companion' ),
387
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
388
  ]
389
  );
390
 
@@ -392,7 +408,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
392
  'header_padding',
393
  [
394
  'label' => __( 'Header Padding', 'themeisle-companion' ),
395
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
396
  'size_units' => [ 'px', 'em', '%' ],
397
  'selectors' => [
398
  '{{WRAPPER}} .obfx-title-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -403,11 +419,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
403
  $this->add_control(
404
  'plan_title_color',
405
  [
406
- 'type' => \Elementor\Controls_Manager::COLOR,
407
  'label' => __( 'Title Color', 'themeisle-companion' ),
408
  'scheme' => [
409
- 'type' => \Elementor\Scheme_Color::get_type(),
410
- 'value' => \Elementor\Scheme_Color::COLOR_1,
411
  ],
412
  'default' => '#464959',
413
  'selectors' => [
@@ -417,10 +433,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
417
  );
418
 
419
  $this->add_group_control(
420
- \Elementor\Group_Control_Typography::get_type(),
421
  [
422
  'name' => 'plan_title_typography',
423
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
424
  'selector' => '{{WRAPPER}} .obfx-pricing-table-title',
425
  ]
426
  );
@@ -428,11 +444,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
428
  $this->add_control(
429
  'plan_subtitle_color',
430
  [
431
- 'type' => \Elementor\Controls_Manager::COLOR,
432
  'label' => __( 'Subtitle Color', 'themeisle-companion' ),
433
  'scheme' => [
434
- 'type' => \Elementor\Scheme_Color::get_type(),
435
- 'value' => \Elementor\Scheme_Color::COLOR_1,
436
  ],
437
  'default' => '#60647d',
438
  'selectors' => [
@@ -442,16 +458,16 @@ class Pricing_Table extends \Elementor\Widget_Base {
442
  );
443
 
444
  $this->add_group_control(
445
- \Elementor\Group_Control_Typography::get_type(),
446
  [
447
  'name' => 'plan_subtitle_typography',
448
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
449
  'selector' => '{{WRAPPER}} .obfx-pricing-table-subtitle',
450
  ]
451
  );
452
 
453
  $this->add_group_control(
454
- \Elementor\Group_Control_Background::get_type(),
455
  [
456
  'name' => 'heading_section_bg',
457
  'label' => __( 'Section Background', 'themeisle-companion' ),
@@ -470,14 +486,14 @@ class Pricing_Table extends \Elementor\Widget_Base {
470
  'section_price_box',
471
  [
472
  'label' => __( 'Price Tag', 'themeisle-companion' ),
473
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
474
  ]
475
  );
476
 
477
  $this->add_responsive_control(
478
  'price_box_padding',
479
  [
480
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
481
  'label' => __( 'Price Box Padding', 'themeisle-companion' ),
482
  'size_units' => [ 'px', 'em', '%' ],
483
  'selectors' => [
@@ -487,7 +503,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
487
  );
488
 
489
  $this->add_group_control(
490
- \Elementor\Group_Control_Background::get_type(),
491
  [
492
  'name' => 'pricing_section_bg',
493
  'label' => __( 'Section Background', 'themeisle-companion' ),
@@ -500,7 +516,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
500
  'price_tag_heading_currency',
501
  [
502
  'label' => __( 'Currency', 'themeisle-companion' ),
503
- 'type' => \Elementor\Controls_Manager::HEADING,
504
  'separator' => 'before',
505
  ]
506
  );
@@ -509,10 +525,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
509
  'currency_color',
510
  [
511
  'label' => __( 'Currency Color', 'themeisle-companion' ),
512
- 'type' => \Elementor\Controls_Manager::COLOR,
513
  'scheme' => [
514
- 'type' => \Elementor\Scheme_Color::get_type(),
515
- 'value' => \Elementor\Scheme_Color::COLOR_1,
516
  ],
517
  'default' => '#60647d',
518
  'selectors' => [
@@ -522,10 +538,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
522
  );
523
 
524
  $this->add_group_control(
525
- \Elementor\Group_Control_Typography::get_type(),
526
  [
527
  'name' => 'currency_typography',
528
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
529
  'selector' => '{{WRAPPER}} .obfx-price-currency',
530
  ]
531
  );
@@ -534,7 +550,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
534
  'price_tag_heading_price',
535
  [
536
  'label' => __( 'Price', 'themeisle-companion' ),
537
- 'type' => \Elementor\Controls_Manager::HEADING,
538
  'separator' => 'before',
539
  ]
540
  );
@@ -543,10 +559,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
543
  'price_text_color',
544
  [
545
  'label' => __( 'Price Color', 'themeisle-companion' ),
546
- 'type' => \Elementor\Controls_Manager::COLOR,
547
  'scheme' => [
548
- 'type' => \Elementor\Scheme_Color::get_type(),
549
- 'value' => \Elementor\Scheme_Color::COLOR_1,
550
  ],
551
  'default' => '#60647d',
552
  'selectors' => [
@@ -556,10 +572,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
556
  );
557
 
558
  $this->add_group_control(
559
- \Elementor\Group_Control_Typography::get_type(),
560
  [
561
  'name' => 'price_typography',
562
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
563
  'selector' => '{{WRAPPER}} .obfx-price',
564
  ]
565
  );
@@ -568,7 +584,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
568
  'price_tag_heading_period',
569
  [
570
  'label' => __( 'Period', 'themeisle-companion' ),
571
- 'type' => \Elementor\Controls_Manager::HEADING,
572
  'separator' => 'before',
573
  ]
574
  );
@@ -577,10 +593,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
577
  'period_color',
578
  [
579
  'label' => __( 'Period Color', 'themeisle-companion' ),
580
- 'type' => \Elementor\Controls_Manager::COLOR,
581
  'scheme' => [
582
- 'type' => \Elementor\Scheme_Color::get_type(),
583
- 'value' => \Elementor\Scheme_Color::COLOR_1,
584
  ],
585
  'default' => '#60647d',
586
  'selectors' => [
@@ -590,10 +606,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
590
  );
591
 
592
  $this->add_group_control(
593
- \Elementor\Group_Control_Typography::get_type(),
594
  [
595
  'name' => 'price_sub_text_typography',
596
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
597
  'selector' => '{{WRAPPER}} .obfx-pricing-period',
598
  ]
599
  );
@@ -608,12 +624,12 @@ class Pricing_Table extends \Elementor\Widget_Base {
608
  'section_features_style',
609
  [
610
  'label' => __( 'Features', 'themeisle-companion' ),
611
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
612
  ]
613
  );
614
 
615
  $this->add_group_control(
616
- \Elementor\Group_Control_Background::get_type(),
617
  [
618
  'name' => 'features_section_bg',
619
  'label' => __( 'Section Background', 'themeisle-companion' ),
@@ -625,7 +641,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
625
  $this->add_responsive_control(
626
  'features_box_padding',
627
  [
628
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
629
  'label' => __( 'Features List Padding', 'themeisle-companion' ),
630
  'size_units' => [ 'px', 'em', '%' ],
631
  'selectors' => [
@@ -638,7 +654,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
638
  'features_accented_heading',
639
  [
640
  'label' => __( 'Accented', 'themeisle-companion' ),
641
- 'type' => \Elementor\Controls_Manager::HEADING,
642
  'separator' => 'before',
643
  ]
644
  );
@@ -646,11 +662,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
646
  $this->add_control(
647
  'features_accented_text_color',
648
  [
649
- 'type' => \Elementor\Controls_Manager::COLOR,
650
  'label' => __( 'Accented Color', 'themeisle-companion' ),
651
  'scheme' => [
652
- 'type' => \Elementor\Scheme_Color::get_type(),
653
- 'value' => \Elementor\Scheme_Color::COLOR_1,
654
  ],
655
  'default' => '#60647d',
656
  'selectors' => [
@@ -660,10 +676,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
660
  );
661
 
662
  $this->add_group_control(
663
- \Elementor\Group_Control_Typography::get_type(),
664
  [
665
  'name' => 'features_accented_typography',
666
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
667
  'selector' => '{{WRAPPER}} .obfx-pricing-table-accented',
668
  ]
669
  );
@@ -672,7 +688,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
672
  'features_features_heading',
673
  [
674
  'label' => __( 'Features', 'themeisle-companion' ),
675
- 'type' => \Elementor\Controls_Manager::HEADING,
676
  'separator' => 'before',
677
  ]
678
  );
@@ -681,10 +697,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
681
  'features_text_color',
682
  [
683
  'label' => __( 'Features Color', 'themeisle-companion' ),
684
- 'type' => \Elementor\Controls_Manager::COLOR,
685
  'scheme' => [
686
- 'type' => \Elementor\Scheme_Color::get_type(),
687
- 'value' => \Elementor\Scheme_Color::COLOR_1,
688
  ],
689
  'default' => '#b1b3c0',
690
  'selectors' => [
@@ -694,10 +710,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
694
  );
695
 
696
  $this->add_group_control(
697
- \Elementor\Group_Control_Typography::get_type(),
698
  [
699
  'name' => 'features_features_typography',
700
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
701
  'selector' => '{{WRAPPER}} .obfx-pricing-table-feature',
702
  ]
703
  );
@@ -706,7 +722,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
706
  'features_icons_heading',
707
  [
708
  'label' => __( 'Icons', 'themeisle-companion' ),
709
- 'type' => \Elementor\Controls_Manager::HEADING,
710
  'separator' => 'before',
711
  ]
712
  );
@@ -715,10 +731,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
715
  'features_icon_color',
716
  [
717
  'label' => __( 'Icon Color', 'themeisle-companion' ),
718
- 'type' => \Elementor\Controls_Manager::COLOR,
719
  'scheme' => [
720
- 'type' => \Elementor\Scheme_Color::get_type(),
721
- 'value' => \Elementor\Scheme_Color::COLOR_1,
722
  ],
723
  'default' => '#b1b3c0',
724
  'selectors' => [
@@ -727,10 +743,30 @@ class Pricing_Table extends \Elementor\Widget_Base {
727
  ]
728
  );
729
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
730
  $this->add_control(
731
  'features_icon_indent',
732
  [
733
- 'type' => \Elementor\Controls_Manager::SLIDER,
734
  'label' => __( 'Icon Spacing', 'themeisle-companion' ),
735
  'default' => [
736
  'size' => 5,
@@ -757,12 +793,12 @@ class Pricing_Table extends \Elementor\Widget_Base {
757
  'section_button_style',
758
  [
759
  'label' => __( 'Button', 'themeisle-companion' ),
760
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
761
  ]
762
  );
763
 
764
  $this->add_group_control(
765
- \Elementor\Group_Control_Background::get_type(), [
766
  'name' => 'button_section_bg',
767
  'label' => __( 'Section Background', 'themeisle-companion' ),
768
  'types' => [ 'classic', 'gradient' ],
@@ -771,11 +807,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
771
  );
772
 
773
  $this->add_group_control(
774
- \Elementor\Group_Control_Typography::get_type(),
775
  [
776
  'name' => 'typography',
777
  'label' => __( 'Typography', 'themeisle-companion' ),
778
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_4,
779
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button-wrapper',
780
  ]
781
  );
@@ -784,7 +820,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
784
  'border_radius',
785
  [
786
  'label' => __( 'Border Radius', 'themeisle-companion' ),
787
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
788
  'size_units' => [ 'px', '%' ],
789
  'selectors' => [
790
  '{{WRAPPER}} .obfx-pricing-table-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -796,7 +832,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
796
  'text_padding',
797
  [
798
  'label' => __( 'Padding', 'themeisle-companion' ),
799
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
800
  'size_units' => [ 'px', 'em', '%' ],
801
  'selectors' => [
802
  '{{WRAPPER}} .obfx-pricing-table-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -804,6 +840,26 @@ class Pricing_Table extends \Elementor\Widget_Base {
804
  ]
805
  );
806
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
807
  // Add the tabbed control.
808
  $this->tabbed_button_controls();
809
 
@@ -826,11 +882,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
826
  $this->add_control(
827
  'button_text_color',
828
  [
829
- 'type' => \Elementor\Controls_Manager::COLOR,
830
  'label' => __( 'Text Color', 'themeisle-companion' ),
831
  'scheme' => [
832
- 'type' => \Elementor\Scheme_Color::get_type(),
833
- 'value' => \Elementor\Scheme_Color::COLOR_1,
834
  ],
835
  'default' => '#fff',
836
  'selectors' => [
@@ -841,11 +897,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
841
  $this->add_control(
842
  'button_bg_color',
843
  [
844
- 'type' => \Elementor\Controls_Manager::COLOR,
845
  'label' => __( 'Background Color', 'themeisle-companion' ),
846
  'scheme' => [
847
- 'type' => \Elementor\Scheme_Color::get_type(),
848
- 'value' => \Elementor\Scheme_Color::COLOR_1,
849
  ],
850
  'default' => '#93c64f',
851
  'selectors' => [
@@ -855,7 +911,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
855
  );
856
 
857
  $this->add_group_control(
858
- \Elementor\Group_Control_Box_Shadow::get_type(),
859
  [
860
  'name' => 'button_box_shadow',
861
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button',
@@ -875,11 +931,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
875
  $this->add_control(
876
  'button_hover_text_color',
877
  [
878
- 'type' => \Elementor\Controls_Manager::COLOR,
879
  'label' => __( 'Text Color', 'themeisle-companion' ),
880
  'scheme' => [
881
- 'type' => \Elementor\Scheme_Color::get_type(),
882
- 'value' => \Elementor\Scheme_Color::COLOR_1,
883
  ],
884
  'default' => '#fff',
885
  'selectors' => [
@@ -890,11 +946,11 @@ class Pricing_Table extends \Elementor\Widget_Base {
890
  $this->add_control(
891
  'button_hover_bg_color',
892
  [
893
- 'type' => \Elementor\Controls_Manager::COLOR,
894
  'label' => __( 'Background Color', 'themeisle-companion' ),
895
  'scheme' => [
896
- 'type' => \Elementor\Scheme_Color::get_type(),
897
- 'value' => \Elementor\Scheme_Color::COLOR_1,
898
  ],
899
  'default' => '#74c600',
900
  'selectors' => [
@@ -904,7 +960,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
904
  );
905
 
906
  $this->add_group_control(
907
- \Elementor\Group_Control_Box_Shadow::get_type(),
908
  [
909
  'name' => 'button_hover_box_shadow',
910
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button:hover',
@@ -916,7 +972,7 @@ class Pricing_Table extends \Elementor\Widget_Base {
916
  'background_hover_transition',
917
  [
918
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
919
- 'type' => \Elementor\Controls_Manager::SLIDER,
920
  'default' => [
921
  'size' => 0.3,
922
  ],
@@ -944,12 +1000,10 @@ class Pricing_Table extends \Elementor\Widget_Base {
944
  protected function render() {
945
  $settings = $this->get_settings();
946
 
947
- $this->maybe_load_widget_style();
948
-
949
  $this->add_render_attribute( 'title', 'class', 'obfx-pricing-table-title' );
950
  $this->add_render_attribute( 'subtitle', 'class', 'obfx-pricing-table-subtitle' );
951
  $this->add_render_attribute( 'button', 'class', 'obfx-pricing-table-button' );
952
- $this->add_render_attribute( 'button_icon', 'class', $settings['button_icon'] );
953
  $this->add_render_attribute( 'button_icon_align', 'class', 'obfx-button-icon-align-' . $settings['button_icon_align'] );
954
  if ( ! empty( $settings['button_link']['url'] ) ) {
955
  $this->add_render_attribute( 'button', 'href', $settings['button_link']['url'] );
@@ -1019,9 +1073,17 @@ class Pricing_Table extends \Elementor\Widget_Base {
1019
  $output .= '<ul class="obfx-feature-list">';
1020
  foreach ( $settings['feature_list'] as $feature ) {
1021
  $output .= '<li>';
1022
- if ( ! empty( $feature['feature_icon'] ) ) {
 
 
 
 
 
 
 
1023
  $output .= '<i class="obfx-pricing-table-feature-icon ' . esc_attr( $feature['feature_icon'] ) . '"></i>';
1024
- }
 
1025
  if ( ! empty( $feature['accent'] ) ) {
1026
  $output .= '<span class="obfx-pricing-table-accented">' . esc_html( $feature['accent'] ) . '</span>';
1027
  $output .= ' ';
@@ -1039,16 +1101,17 @@ class Pricing_Table extends \Elementor\Widget_Base {
1039
 
1040
  $output .= '<a ' . $this->get_render_attribute_string( 'button' ) . '>';
1041
 
1042
- if ( ! empty( $settings['button_icon'] ) && ( $settings['button_icon_align'] == 'left' ) ) {
1043
- $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1044
- $output .= '<i ' . $this->get_render_attribute_string( 'button_icon' ) . '></i>';
 
 
1045
  }
1046
 
1047
  $output .= '<span class="elementor-button-text">' . esc_html( $settings['button_text'] ) . '</span>';
1048
 
1049
- if ( ! empty( $settings['button_icon'] ) && ( $settings['button_icon_align'] == 'right' ) ) {
1050
- $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1051
- $output .= '<i ' . $this->get_render_attribute_string( 'button_icon' ) . '></i>';
1052
  }
1053
 
1054
  $output .= '</a>';
@@ -1060,21 +1123,24 @@ class Pricing_Table extends \Elementor\Widget_Base {
1060
  echo $output;
1061
  }
1062
 
1063
- /**
1064
- * Load the widget style dynamically if it is a widget preview
1065
- * or enqueue style and scripts if not
1066
- *
1067
- * This way we are sure that the assets files are loaded only when this block is present in page.
1068
- */
1069
- protected function maybe_load_widget_style() {
1070
- if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
1071
- <style>
1072
- <?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
1073
- </style>
1074
- <?php
1075
  } else {
1076
- wp_enqueue_style('eaw-elementor');
 
 
1077
  }
 
1078
  }
1079
  }
1080
 
9
  */
10
  namespace ThemeIsle\ElementorExtraWidgets;
11
 
12
+ use Elementor\Controls_Manager;
13
+ use Elementor\Group_Control_Background;
14
+ use Elementor\Group_Control_Box_Shadow;
15
+ use Elementor\Group_Control_Typography;
16
+ use Elementor\Plugin;
17
+ use Elementor\Scheme_Color;
18
+ use Elementor\Scheme_Typography;
19
+ use Elementor\Widget_Base;
20
 
21
  /**
22
  * Class Pricing_Table
23
  *
24
  * @package ThemeIsle\ElementorExtraWidgets
25
  */
26
+ class Pricing_Table extends Widget_Base {
27
 
28
  /**
29
  * Widget title.
52
  return 'obfx-pricing-table';
53
  }
54
 
55
+ /**
56
+ * Retrieve the list of styles the pricing table widget depended on.
57
+ *
58
+ * @return array Widget scripts dependencies.
59
+ */
60
+ public function get_style_depends() {
61
+ return [ 'eaw-elementor' ];
62
+ }
63
+
64
  /**
65
  * Widget Category
66
  *
107
  $this->add_control(
108
  'title',
109
  [
110
+ 'type' => Controls_Manager::TEXT,
111
  'label' => __( 'Title', 'themeisle-companion' ),
112
  'placeholder' => __( 'Title', 'themeisle-companion' ),
113
  'default' => __( 'Pricing Plan', 'themeisle-companion' ),
117
  $this->add_control(
118
  'title_tag',
119
  [
120
+ 'type' => Controls_Manager::SELECT,
121
  'label' => __( 'Title HTML tag', 'themeisle-companion' ),
122
  'default' => 'h3',
123
  'options' => [
135
  $this->add_control(
136
  'subtitle',
137
  [
138
+ 'type' => Controls_Manager::TEXT,
139
  'label' => __( 'Subtitle', 'themeisle-companion' ),
140
  'placeholder' => __( 'Subtitle', 'themeisle-companion' ),
141
  'default' => __( 'Description', 'themeisle-companion' ),
145
  $this->add_control(
146
  'subtitle_tag',
147
  [
148
+ 'type' => Controls_Manager::SELECT,
149
  'label' => __( 'Subtitle HTML Tag', 'themeisle-companion' ),
150
  'default' => 'p',
151
  'options' => [
176
  $this->add_control(
177
  'price_tag_text',
178
  [
179
+ 'type' => Controls_Manager::TEXT,
180
  'label' => __( 'Price', 'themeisle-companion' ),
181
  'placeholder' => __( 'Price', 'themeisle-companion' ),
182
  'default' => __( '50', 'themeisle-companion' ),
187
  $this->add_control(
188
  'price_tag_currency',
189
  [
190
+ 'type' => Controls_Manager::TEXT,
191
  'label' => __( 'Currency', 'themeisle-companion' ),
192
  'placeholder' => __( 'Currency', 'themeisle-companion' ),
193
  'default' => __( '$', 'themeisle-companion' ),
197
  $this->add_control(
198
  'price_tag_currency_position',
199
  [
200
+ 'type' => Controls_Manager::SELECT,
201
  'label' => __( 'Currency Position', 'themeisle-companion' ),
202
  'default' => 'left',
203
  'options' => [
210
  $this->add_control(
211
  'price_tag_period',
212
  [
213
+ 'type' => Controls_Manager::TEXT,
214
  'label' => __( 'Period', 'themeisle-companion' ),
215
  'placeholder' => __( '/month', 'themeisle-companion' ),
216
  'default' => __( '/month', 'themeisle-companion' ),
235
  'feature_list',
236
  [
237
  'label' => __( 'Plan Features', 'themeisle-companion' ),
238
+ 'type' => Controls_Manager::REPEATER,
239
  'default' => [
240
  [
241
  'accent' => __( 'First', 'themeisle-companion' ),
252
  ],
253
  'fields' => [
254
  [
255
+ 'type' => Controls_Manager::TEXT,
256
  'name' => 'accent',
257
  'label' => __( 'Accented Text', 'themeisle-companion' ),
258
  'description' => __( 'Appears before feature text', 'themeisle-companion' ),
260
  'default' => __( 'Accent', 'themeisle-companion' ),
261
  ],
262
  [
263
+ 'type' => Controls_Manager::TEXT,
264
  'name' => 'text',
265
  'label' => __( 'Text', 'themeisle-companion' ),
266
  'label_block' => true,
267
  'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
268
  'default' => __( 'Feature', 'themeisle-companion' ),
269
  ],
270
+ [
271
+ 'type' => Controls_Manager::ICONS,
272
+ 'name' => 'feature_icon_new',
273
+ 'label' => __( 'Icon', 'themeisle-companion' ),
274
+ 'default' => [
275
+ 'value' => 'fas fa-star',
276
+ 'library' => 'solid',
277
+ ],
278
+ 'fa4compatibility' => 'feature_icon',
279
+ ],
280
  ],
281
  'title_field' => '{{ accent + " " + text }}',
282
  ]
286
  'features_align',
287
  [
288
  'label' => __( 'Alignment', 'themeisle-companion' ),
289
+ 'type' => Controls_Manager::CHOOSE,
290
  'options' => [
291
  'left' => [
292
  'title' => __( 'Left', 'themeisle-companion' ),
329
  $this->add_control(
330
  'button_text',
331
  [
332
+ 'type' => Controls_Manager::TEXT,
333
  'label' => __( 'Text', 'themeisle-companion' ),
334
  'placeholder' => __( 'Buy Now', 'themeisle-companion' ),
335
  'default' => __( 'Buy Now', 'themeisle-companion' ),
339
  $this->add_control(
340
  'button_link',
341
  [
342
+ 'type' => Controls_Manager::URL,
343
  'label' => __( 'Link', 'themeisle-companion' ),
344
  'placeholder' => __( 'https://example.com', 'themeisle-companion' ),
345
  ]
346
  );
347
 
348
  $this->add_control(
349
+ 'button_icon_new',
350
  [
351
+ 'type' => Controls_Manager::ICONS,
352
+ 'label' => __( 'Icon', 'themeisle-companion' ),
353
+ 'fa4compatibility' => 'button_icon',
 
354
  ]
355
  );
356
 
357
  $this->add_control(
358
  'button_icon_align',
359
  [
360
+ 'type' => Controls_Manager::SELECT,
361
  'label' => __( 'Icon Position', 'themeisle-companion' ),
362
  'default' => 'left',
363
  'options' => [
373
  $this->add_control(
374
  'button_icon_indent',
375
  [
376
+ 'type' => Controls_Manager::SLIDER,
377
  'label' => __( 'Icon Spacing', 'themeisle-companion' ),
378
  'range' => [
379
  'px' => [
400
  'section_header_style',
401
  [
402
  'label' => __( 'Header', 'themeisle-companion' ),
403
+ 'tab' => Controls_Manager::TAB_STYLE,
404
  ]
405
  );
406
 
408
  'header_padding',
409
  [
410
  'label' => __( 'Header Padding', 'themeisle-companion' ),
411
+ 'type' => Controls_Manager::DIMENSIONS,
412
  'size_units' => [ 'px', 'em', '%' ],
413
  'selectors' => [
414
  '{{WRAPPER}} .obfx-title-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
419
  $this->add_control(
420
  'plan_title_color',
421
  [
422
+ 'type' => Controls_Manager::COLOR,
423
  'label' => __( 'Title Color', 'themeisle-companion' ),
424
  'scheme' => [
425
+ 'type' => Scheme_Color::get_type(),
426
+ 'value' => Scheme_Color::COLOR_1,
427
  ],
428
  'default' => '#464959',
429
  'selectors' => [
433
  );
434
 
435
  $this->add_group_control(
436
+ Group_Control_Typography::get_type(),
437
  [
438
  'name' => 'plan_title_typography',
439
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
440
  'selector' => '{{WRAPPER}} .obfx-pricing-table-title',
441
  ]
442
  );
444
  $this->add_control(
445
  'plan_subtitle_color',
446
  [
447
+ 'type' => Controls_Manager::COLOR,
448
  'label' => __( 'Subtitle Color', 'themeisle-companion' ),
449
  'scheme' => [
450
+ 'type' => Scheme_Color::get_type(),
451
+ 'value' => Scheme_Color::COLOR_1,
452
  ],
453
  'default' => '#60647d',
454
  'selectors' => [
458
  );
459
 
460
  $this->add_group_control(
461
+ Group_Control_Typography::get_type(),
462
  [
463
  'name' => 'plan_subtitle_typography',
464
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
465
  'selector' => '{{WRAPPER}} .obfx-pricing-table-subtitle',
466
  ]
467
  );
468
 
469
  $this->add_group_control(
470
+ Group_Control_Background::get_type(),
471
  [
472
  'name' => 'heading_section_bg',
473
  'label' => __( 'Section Background', 'themeisle-companion' ),
486
  'section_price_box',
487
  [
488
  'label' => __( 'Price Tag', 'themeisle-companion' ),
489
+ 'tab' => Controls_Manager::TAB_STYLE,
490
  ]
491
  );
492
 
493
  $this->add_responsive_control(
494
  'price_box_padding',
495
  [
496
+ 'type' => Controls_Manager::DIMENSIONS,
497
  'label' => __( 'Price Box Padding', 'themeisle-companion' ),
498
  'size_units' => [ 'px', 'em', '%' ],
499
  'selectors' => [
503
  );
504
 
505
  $this->add_group_control(
506
+ Group_Control_Typography::get_type(),
507
  [
508
  'name' => 'pricing_section_bg',
509
  'label' => __( 'Section Background', 'themeisle-companion' ),
516
  'price_tag_heading_currency',
517
  [
518
  'label' => __( 'Currency', 'themeisle-companion' ),
519
+ 'type' => Controls_Manager::HEADING,
520
  'separator' => 'before',
521
  ]
522
  );
525
  'currency_color',
526
  [
527
  'label' => __( 'Currency Color', 'themeisle-companion' ),
528
+ 'type' => Controls_Manager::COLOR,
529
  'scheme' => [
530
+ 'type' => Scheme_Color::get_type(),
531
+ 'value' => Scheme_Color::COLOR_1,
532
  ],
533
  'default' => '#60647d',
534
  'selectors' => [
538
  );
539
 
540
  $this->add_group_control(
541
+ Group_Control_Typography::get_type(),
542
  [
543
  'name' => 'currency_typography',
544
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
545
  'selector' => '{{WRAPPER}} .obfx-price-currency',
546
  ]
547
  );
550
  'price_tag_heading_price',
551
  [
552
  'label' => __( 'Price', 'themeisle-companion' ),
553
+ 'type' => Controls_Manager::HEADING,
554
  'separator' => 'before',
555
  ]
556
  );
559
  'price_text_color',
560
  [
561
  'label' => __( 'Price Color', 'themeisle-companion' ),
562
+ 'type' => Controls_Manager::COLOR,
563
  'scheme' => [
564
+ 'type' => Scheme_Color::get_type(),
565
+ 'value' => Scheme_Color::COLOR_1,
566
  ],
567
  'default' => '#60647d',
568
  'selectors' => [
572
  );
573
 
574
  $this->add_group_control(
575
+ Group_Control_Typography::get_type(),
576
  [
577
  'name' => 'price_typography',
578
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
579
  'selector' => '{{WRAPPER}} .obfx-price',
580
  ]
581
  );
584
  'price_tag_heading_period',
585
  [
586
  'label' => __( 'Period', 'themeisle-companion' ),
587
+ 'type' => Controls_Manager::HEADING,
588
  'separator' => 'before',
589
  ]
590
  );
593
  'period_color',
594
  [
595
  'label' => __( 'Period Color', 'themeisle-companion' ),
596
+ 'type' => Controls_Manager::COLOR,
597
  'scheme' => [
598
+ 'type' => Scheme_Color::get_type(),
599
+ 'value' => Scheme_Color::COLOR_1,
600
  ],
601
  'default' => '#60647d',
602
  'selectors' => [
606
  );
607
 
608
  $this->add_group_control(
609
+ Group_Control_Typography::get_type(),
610
  [
611
  'name' => 'price_sub_text_typography',
612
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
613
  'selector' => '{{WRAPPER}} .obfx-pricing-period',
614
  ]
615
  );
624
  'section_features_style',
625
  [
626
  'label' => __( 'Features', 'themeisle-companion' ),
627
+ 'tab' => Controls_Manager::TAB_STYLE,
628
  ]
629
  );
630
 
631
  $this->add_group_control(
632
+ Group_Control_Background::get_type(),
633
  [
634
  'name' => 'features_section_bg',
635
  'label' => __( 'Section Background', 'themeisle-companion' ),
641
  $this->add_responsive_control(
642
  'features_box_padding',
643
  [
644
+ 'type' => Controls_Manager::DIMENSIONS,
645
  'label' => __( 'Features List Padding', 'themeisle-companion' ),
646
  'size_units' => [ 'px', 'em', '%' ],
647
  'selectors' => [
654
  'features_accented_heading',
655
  [
656
  'label' => __( 'Accented', 'themeisle-companion' ),
657
+ 'type' => Controls_Manager::HEADING,
658
  'separator' => 'before',
659
  ]
660
  );
662
  $this->add_control(
663
  'features_accented_text_color',
664
  [
665
+ 'type' => Controls_Manager::COLOR,
666
  'label' => __( 'Accented Color', 'themeisle-companion' ),
667
  'scheme' => [
668
+ 'type' => Scheme_Color::get_type(),
669
+ 'value' => Scheme_Color::COLOR_1,
670
  ],
671
  'default' => '#60647d',
672
  'selectors' => [
676
  );
677
 
678
  $this->add_group_control(
679
+ Group_Control_Typography::get_type(),
680
  [
681
  'name' => 'features_accented_typography',
682
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
683
  'selector' => '{{WRAPPER}} .obfx-pricing-table-accented',
684
  ]
685
  );
688
  'features_features_heading',
689
  [
690
  'label' => __( 'Features', 'themeisle-companion' ),
691
+ 'type' => Controls_Manager::HEADING,
692
  'separator' => 'before',
693
  ]
694
  );
697
  'features_text_color',
698
  [
699
  'label' => __( 'Features Color', 'themeisle-companion' ),
700
+ 'type' => Controls_Manager::COLOR,
701
  'scheme' => [
702
+ 'type' => Scheme_Color::get_type(),
703
+ 'value' => Scheme_Color::COLOR_1,
704
  ],
705
  'default' => '#b1b3c0',
706
  'selectors' => [
710
  );
711
 
712
  $this->add_group_control(
713
+ Group_Control_Typography::get_type(),
714
  [
715
  'name' => 'features_features_typography',
716
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
717
  'selector' => '{{WRAPPER}} .obfx-pricing-table-feature',
718
  ]
719
  );
722
  'features_icons_heading',
723
  [
724
  'label' => __( 'Icons', 'themeisle-companion' ),
725
+ 'type' => Controls_Manager::HEADING,
726
  'separator' => 'before',
727
  ]
728
  );
731
  'features_icon_color',
732
  [
733
  'label' => __( 'Icon Color', 'themeisle-companion' ),
734
+ 'type' => Controls_Manager::COLOR,
735
  'scheme' => [
736
+ 'type' => Scheme_Color::get_type(),
737
+ 'value' => Scheme_Color::COLOR_1,
738
  ],
739
  'default' => '#b1b3c0',
740
  'selectors' => [
743
  ]
744
  );
745
 
746
+ $this->add_responsive_control(
747
+ 'features_icon_size',
748
+ [
749
+ 'type' => Controls_Manager::SLIDER,
750
+ 'label' => __( 'Icon Size', 'themeisle-companion' ),
751
+ 'default' => [
752
+ 'size' => 16,
753
+ ],
754
+ 'range' => [
755
+ 'px' => [
756
+ 'max' => 100,
757
+ ],
758
+ ],
759
+ 'selectors' => [
760
+ '{{WRAPPER}} i.obfx-pricing-table-feature-icon' => 'font-size: {{SIZE}}{{UNIT}};',
761
+ '{{WRAPPER}} img.obfx-pricing-table-feature-icon' => 'width: {{SIZE}}{{UNIT}};',
762
+ ],
763
+ ]
764
+ );
765
+
766
  $this->add_control(
767
  'features_icon_indent',
768
  [
769
+ 'type' => Controls_Manager::SLIDER,
770
  'label' => __( 'Icon Spacing', 'themeisle-companion' ),
771
  'default' => [
772
  'size' => 5,
793
  'section_button_style',
794
  [
795
  'label' => __( 'Button', 'themeisle-companion' ),
796
+ 'tab' => Controls_Manager::TAB_STYLE,
797
  ]
798
  );
799
 
800
  $this->add_group_control(
801
+ Group_Control_Background::get_type(), [
802
  'name' => 'button_section_bg',
803
  'label' => __( 'Section Background', 'themeisle-companion' ),
804
  'types' => [ 'classic', 'gradient' ],
807
  );
808
 
809
  $this->add_group_control(
810
+ Group_Control_Typography::get_type(),
811
  [
812
  'name' => 'typography',
813
  'label' => __( 'Typography', 'themeisle-companion' ),
814
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
815
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button-wrapper',
816
  ]
817
  );
820
  'border_radius',
821
  [
822
  'label' => __( 'Border Radius', 'themeisle-companion' ),
823
+ 'type' => Controls_Manager::DIMENSIONS,
824
  'size_units' => [ 'px', '%' ],
825
  'selectors' => [
826
  '{{WRAPPER}} .obfx-pricing-table-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
832
  'text_padding',
833
  [
834
  'label' => __( 'Padding', 'themeisle-companion' ),
835
+ 'type' => Controls_Manager::DIMENSIONS,
836
  'size_units' => [ 'px', 'em', '%' ],
837
  'selectors' => [
838
  '{{WRAPPER}} .obfx-pricing-table-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
840
  ]
841
  );
842
 
843
+ $this->add_responsive_control(
844
+ 'button_icon_size',
845
+ [
846
+ 'type' => Controls_Manager::SLIDER,
847
+ 'label' => __( 'Icon Size', 'themeisle-companion' ),
848
+ 'default' => [
849
+ 'size' => 16,
850
+ ],
851
+ 'range' => [
852
+ 'px' => [
853
+ 'max' => 100,
854
+ ],
855
+ ],
856
+ 'selectors' => [
857
+ '{{WRAPPER}} .obfx-pricing-table-button-wrapper i' => 'font-size: {{SIZE}}{{UNIT}};',
858
+ '{{WRAPPER}} .obfx-pricing-table-button-wrapper img' => 'width: {{SIZE}}{{UNIT}};',
859
+ ],
860
+ ]
861
+ );
862
+
863
  // Add the tabbed control.
864
  $this->tabbed_button_controls();
865
 
882
  $this->add_control(
883
  'button_text_color',
884
  [
885
+ 'type' => Controls_Manager::COLOR,
886
  'label' => __( 'Text Color', 'themeisle-companion' ),
887
  'scheme' => [
888
+ 'type' => Scheme_Color::get_type(),
889
+ 'value' => Scheme_Color::COLOR_1,
890
  ],
891
  'default' => '#fff',
892
  'selectors' => [
897
  $this->add_control(
898
  'button_bg_color',
899
  [
900
+ 'type' => Controls_Manager::COLOR,
901
  'label' => __( 'Background Color', 'themeisle-companion' ),
902
  'scheme' => [
903
+ 'type' => Scheme_Color::get_type(),
904
+ 'value' => Scheme_Color::COLOR_1,
905
  ],
906
  'default' => '#93c64f',
907
  'selectors' => [
911
  );
912
 
913
  $this->add_group_control(
914
+ Group_Control_Box_Shadow::get_type(),
915
  [
916
  'name' => 'button_box_shadow',
917
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button',
931
  $this->add_control(
932
  'button_hover_text_color',
933
  [
934
+ 'type' => Controls_Manager::COLOR,
935
  'label' => __( 'Text Color', 'themeisle-companion' ),
936
  'scheme' => [
937
+ 'type' => Scheme_Color::get_type(),
938
+ 'value' => Scheme_Color::COLOR_1,
939
  ],
940
  'default' => '#fff',
941
  'selectors' => [
946
  $this->add_control(
947
  'button_hover_bg_color',
948
  [
949
+ 'type' => Controls_Manager::COLOR,
950
  'label' => __( 'Background Color', 'themeisle-companion' ),
951
  'scheme' => [
952
+ 'type' => Scheme_Color::get_type(),
953
+ 'value' => Scheme_Color::COLOR_1,
954
  ],
955
  'default' => '#74c600',
956
  'selectors' => [
960
  );
961
 
962
  $this->add_group_control(
963
+ Group_Control_Box_Shadow::get_type(),
964
  [
965
  'name' => 'button_hover_box_shadow',
966
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button:hover',
972
  'background_hover_transition',
973
  [
974
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
975
+ 'type' => Controls_Manager::SLIDER,
976
  'default' => [
977
  'size' => 0.3,
978
  ],
1000
  protected function render() {
1001
  $settings = $this->get_settings();
1002
 
 
 
1003
  $this->add_render_attribute( 'title', 'class', 'obfx-pricing-table-title' );
1004
  $this->add_render_attribute( 'subtitle', 'class', 'obfx-pricing-table-subtitle' );
1005
  $this->add_render_attribute( 'button', 'class', 'obfx-pricing-table-button' );
1006
+ // $this->add_render_attribute( 'button_icon', 'class', $settings['button_icon'] );
1007
  $this->add_render_attribute( 'button_icon_align', 'class', 'obfx-button-icon-align-' . $settings['button_icon_align'] );
1008
  if ( ! empty( $settings['button_link']['url'] ) ) {
1009
  $this->add_render_attribute( 'button', 'href', $settings['button_link']['url'] );
1073
  $output .= '<ul class="obfx-feature-list">';
1074
  foreach ( $settings['feature_list'] as $feature ) {
1075
  $output .= '<li>';
1076
+
1077
+ if ( empty($feature['feature_icon']) || isset($feature['__fa4_migrated']['feature_icon_new']) ) {
1078
+ if( isset($feature['feature_icon_new']['value']['url']) ) {
1079
+ $output .= '<img class="obfx-pricing-table-feature-icon" src="'.esc_url( $feature['feature_icon_new']['value']['url'] ).'" alt="'.esc_attr(get_post_meta($feature['feature_icon_new']['value']['id'], '_wp_attachment_image_alt', true)).'"/>';
1080
+ } else {
1081
+ $output .= '<i class="obfx-pricing-table-feature-icon '.esc_attr( $feature['feature_icon_new']['value'] ).'" aria-hidden="true"></i>';
1082
+ }
1083
+ } else {
1084
  $output .= '<i class="obfx-pricing-table-feature-icon ' . esc_attr( $feature['feature_icon'] ) . '"></i>';
1085
+ }
1086
+
1087
  if ( ! empty( $feature['accent'] ) ) {
1088
  $output .= '<span class="obfx-pricing-table-accented">' . esc_html( $feature['accent'] ) . '</span>';
1089
  $output .= ' ';
1101
 
1102
  $output .= '<a ' . $this->get_render_attribute_string( 'button' ) . '>';
1103
 
1104
+
1105
+
1106
+
1107
+ if ( $settings['button_icon_align'] == 'left' ) {
1108
+ $output .= $this->display_button_icon( $settings );
1109
  }
1110
 
1111
  $output .= '<span class="elementor-button-text">' . esc_html( $settings['button_text'] ) . '</span>';
1112
 
1113
+ if ( $settings['button_icon_align'] == 'right' ) {
1114
+ $output .= $this->display_button_icon( $settings );
 
1115
  }
1116
 
1117
  $output .= '</a>';
1123
  echo $output;
1124
  }
1125
 
1126
+ private function display_button_icon($settings) {
1127
+ $output = '';
1128
+ if ( empty( $settings['button_icon'] ) || isset( $settings['__fa4_migrated']['button_icon_new'] ) ) {
1129
+ if ( isset( $settings['button_icon_new']['value']['url'] ) ) {
1130
+ $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1131
+ $output .= '<img src="' . esc_url( $settings['button_icon_new']['value']['url'] ) . '" alt="' . esc_attr( get_post_meta( $settings['button_icon_new']['value']['id'], '_wp_attachment_image_alt', true ) ) . '"/>';
1132
+ $output .= '</span>';
1133
+ } else {
1134
+ $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1135
+ $output .= '<i class="' . esc_attr( $settings['button_icon_new']['value'] ) . '" aria-hidden="true"></i>';
1136
+ $output .= '</span>';
1137
+ }
1138
  } else {
1139
+ $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1140
+ $output .= '<i class="' . esc_attr( $settings['button_icon'] ) . '"></i>';
1141
+ $output .= '</span>';
1142
  }
1143
+ return $output;
1144
  }
1145
  }
1146
 
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php CHANGED
@@ -9,16 +9,20 @@
9
  */
10
  namespace ThemeIsle\ElementorExtraWidgets;
11
 
12
- if ( ! defined( 'ABSPATH' ) ) {
13
- exit;
14
- } // End if().
 
 
 
 
15
 
16
  /**
17
  * Class Services
18
  *
19
  * @package ThemeIsle\ElementorExtraWidgets
20
  */
21
- class Services extends \Elementor\Widget_Base {
22
 
23
  /**
24
  * Widget name.
@@ -47,6 +51,15 @@ class Services extends \Elementor\Widget_Base {
47
  return 'fa fa-diamond';
48
  }
49
 
 
 
 
 
 
 
 
 
 
50
 
51
  /**
52
  * Widget Category
@@ -83,33 +96,42 @@ class Services extends \Elementor\Widget_Base {
83
  'services_list',
84
  [
85
  'label' => __( 'Services', 'themeisle-companion' ),
86
- 'type' => \Elementor\Controls_Manager::REPEATER,
87
  'default' => [
88
  [
89
  'title' => __( 'Award-Winning​', 'themeisle-companion' ),
90
  'text' => __( 'Add some text here to describe your services to the page visitors.​', 'themeisle-companion' ),
91
- 'icon' => 'fa fa-trophy',
 
 
 
92
  'color' => '#333333',
93
  'type' => 'icon',
94
  ],
95
  [
96
  'title' => __( 'Professional​', 'themeisle-companion' ),
97
  'text' => __( 'Add some text here to describe your services to the page visitors.​', 'themeisle-companion' ),
98
- 'icon' => 'fa fa-suitcase',
 
 
 
99
  'color' => '#333333',
100
  'type' => 'icon',
101
  ],
102
  [
103
  'title' => __( 'Consulting​', 'themeisle-companion' ),
104
  'text' => __( 'Add some text here to describe your services to the page visitors.​', 'themeisle-companion' ),
105
- 'icon' => 'fa fa-handshake-o',
 
 
 
106
  'color' => '#333333',
107
  'type' => 'icon',
108
  ],
109
  ],
110
  'fields' => [
111
  [
112
- 'type' => \Elementor\Controls_Manager::CHOOSE,
113
  'name' => 'type',
114
  'label_block' => true,
115
  'label' => __( 'Type', 'themeisle-companion' ),
@@ -126,29 +148,33 @@ class Services extends \Elementor\Widget_Base {
126
  ],
127
  ],
128
  [
129
- 'type' => \Elementor\Controls_Manager::TEXT,
130
  'name' => 'title',
131
  'label_block' => true,
132
  'label' => __( 'Title & Description', 'themeisle-companion' ),
133
  'default' => __( 'Service Title', 'themeisle-companion' ),
134
  ],
135
  [
136
- 'type' => \Elementor\Controls_Manager::TEXTAREA,
137
  'name' => 'text',
138
  'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
139
  'default' => __( 'Feature', 'themeisle-companion' ),
140
  ],
141
  [
142
- 'type' => \Elementor\Controls_Manager::ICON,
143
- 'name' => 'icon',
144
- 'label' => __( 'Icon', 'themeisle-companion' ),
145
- 'default' => 'fa fa-diamond',
 
 
 
 
146
  'condition' => [
147
  'type' => 'icon',
148
  ],
149
  ],
150
  [
151
- 'type' => \Elementor\Controls_Manager::COLOR,
152
  'name' => 'color',
153
  'label_block' => false,
154
  'label' => __( 'Icon Color', 'themeisle-companion' ),
@@ -158,7 +184,7 @@ class Services extends \Elementor\Widget_Base {
158
  ],
159
  ],
160
  [
161
- 'type' => \Elementor\Controls_Manager::MEDIA,
162
  'name' => 'image',
163
  'label' => __( 'Image', 'themeisle-companion' ),
164
  'condition' => [
@@ -166,7 +192,7 @@ class Services extends \Elementor\Widget_Base {
166
  ],
167
  ],
168
  [
169
- 'type' => \Elementor\Controls_Manager::URL,
170
  'name' => 'link',
171
  'label' => __( 'Link to', 'themeisle-companion' ),
172
  'separator' => 'before',
@@ -181,7 +207,7 @@ class Services extends \Elementor\Widget_Base {
181
  'align',
182
  [
183
  'label' => '<i class="fa fa-arrows"></i> ' . __( 'Icon Position', 'themeisle-companion' ),
184
- 'type' => \Elementor\Controls_Manager::CHOOSE,
185
  'options' => [
186
  'left' => [
187
  'title' => __( 'Left', 'themeisle-companion' ),
@@ -206,7 +232,7 @@ class Services extends \Elementor\Widget_Base {
206
  $this->add_responsive_control(
207
  'grid_columns',
208
  [
209
- 'type' => \Elementor\Controls_Manager::SELECT,
210
  'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
211
  'default' => 3,
212
  'tablet_default' => 2,
@@ -231,14 +257,14 @@ class Services extends \Elementor\Widget_Base {
231
  'section_style_icon',
232
  [
233
  'label' => __( 'Icon / Image', 'themeisle-companion' ),
234
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
235
  ]
236
  );
237
  $this->add_control(
238
  'icon_space',
239
  [
240
  'label' => __( 'Spacing', 'themeisle-companion' ),
241
- 'type' => \Elementor\Controls_Manager::SLIDER,
242
  'default' => [
243
  'size' => 15,
244
  ],
@@ -259,7 +285,7 @@ class Services extends \Elementor\Widget_Base {
259
  'icon_size',
260
  [
261
  'label' => __( 'Size', 'themeisle-companion' ),
262
- 'type' => \Elementor\Controls_Manager::SLIDER,
263
  'range' => [
264
  'px' => [
265
  'min' => 6,
@@ -270,7 +296,8 @@ class Services extends \Elementor\Widget_Base {
270
  'size' => 35,
271
  ],
272
  'selectors' => [
273
- '{{WRAPPER}} .obfx-icon' => 'font-size: {{SIZE}}{{UNIT}};',
 
274
  '{{WRAPPER}} .obfx-image' => 'max-width: {{SIZE}}{{UNIT}};',
275
  ],
276
  ]
@@ -280,7 +307,7 @@ class Services extends \Elementor\Widget_Base {
280
  'section_style_content',
281
  [
282
  'label' => __( 'Content', 'themeisle-companion' ),
283
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
284
  ]
285
  );
286
 
@@ -288,7 +315,7 @@ class Services extends \Elementor\Widget_Base {
288
  'text_align',
289
  [
290
  'label' => __( 'Alignment', 'themeisle-companion' ),
291
- 'type' => \Elementor\Controls_Manager::CHOOSE,
292
  'toggle' => false,
293
  'default' => 'center',
294
  'options' => [
@@ -316,7 +343,7 @@ class Services extends \Elementor\Widget_Base {
316
  'heading_title',
317
  [
318
  'label' => __( 'Title', 'themeisle-companion' ),
319
- 'type' => \Elementor\Controls_Manager::HEADING,
320
  'separator' => 'before',
321
  ]
322
  );
@@ -325,7 +352,7 @@ class Services extends \Elementor\Widget_Base {
325
  'title_bottom_space',
326
  [
327
  'label' => __( 'Spacing', 'themeisle-companion' ),
328
- 'type' => \Elementor\Controls_Manager::SLIDER,
329
  'range' => [
330
  'px' => [
331
  'min' => 0,
@@ -342,7 +369,7 @@ class Services extends \Elementor\Widget_Base {
342
  'title_color',
343
  [
344
  'label' => __( 'Color', 'themeisle-companion' ),
345
- 'type' => \Elementor\Controls_Manager::COLOR,
346
  'default' => '',
347
  'selectors' => [
348
  '{{WRAPPER}} .obfx-service-title' => 'color: {{VALUE}};',
@@ -351,11 +378,11 @@ class Services extends \Elementor\Widget_Base {
351
  );
352
 
353
  $this->add_group_control(
354
- \Elementor\Group_Control_Typography::get_type(),
355
  [
356
  'name' => 'title_typography',
357
  'selector' => '{{WRAPPER}} .obfx-service-title',
358
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
359
  ]
360
  );
361
 
@@ -363,7 +390,7 @@ class Services extends \Elementor\Widget_Base {
363
  'heading_description',
364
  [
365
  'label' => __( 'Description', 'themeisle-companion' ),
366
- 'type' => \Elementor\Controls_Manager::HEADING,
367
  'separator' => 'before',
368
  ]
369
  );
@@ -372,24 +399,24 @@ class Services extends \Elementor\Widget_Base {
372
  'description_color',
373
  [
374
  'label' => __( 'Color', 'themeisle-companion' ),
375
- 'type' => \Elementor\Controls_Manager::COLOR,
376
  'default' => '',
377
  'selectors' => [
378
  '{{WRAPPER}} .obfx-service-text' => 'color: {{VALUE}};',
379
  ],
380
  'scheme' => [
381
- 'type' => \Elementor\Scheme_Color::get_type(),
382
- 'value' => \Elementor\Scheme_Color::COLOR_3,
383
  ],
384
  ]
385
  );
386
 
387
  $this->add_group_control(
388
- \Elementor\Group_Control_Typography::get_type(),
389
  [
390
  'name' => 'description_typography',
391
  'selector' => '{{WRAPPER}} .obfx-service-text',
392
- 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_3,
393
  ]
394
  );
395
 
@@ -404,7 +431,7 @@ class Services extends \Elementor\Widget_Base {
404
  'section_grid_style',
405
  [
406
  'label' => __( 'Grid', 'themeisle-companion' ),
407
- 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
408
  ]
409
  );
410
 
@@ -413,7 +440,7 @@ class Services extends \Elementor\Widget_Base {
413
  'grid_style_columns_margin',
414
  [
415
  'label' => __( 'Columns margin', 'themeisle-companion' ),
416
- 'type' => \Elementor\Controls_Manager::SLIDER,
417
  'default' => [
418
  'size' => 15,
419
  ],
@@ -435,7 +462,7 @@ class Services extends \Elementor\Widget_Base {
435
  'grid_style_rows_margin',
436
  [
437
  'label' => __( 'Rows margin', 'themeisle-companion' ),
438
- 'type' => \Elementor\Controls_Manager::SLIDER,
439
  'default' => [
440
  'size' => 30,
441
  ],
@@ -453,7 +480,7 @@ class Services extends \Elementor\Widget_Base {
453
 
454
  // Background.
455
  $this->add_group_control(
456
- \Elementor\Group_Control_Background::get_type(),
457
  [
458
  'name' => 'grid_style_background',
459
  'types' => [ 'classic', 'gradient' ],
@@ -466,7 +493,7 @@ class Services extends \Elementor\Widget_Base {
466
  'grid_items_style_heading',
467
  [
468
  'label' => __( 'Items', 'themeisle-companion' ),
469
- 'type' => \Elementor\Controls_Manager::HEADING,
470
  'separator' => 'before',
471
  ]
472
  );
@@ -476,7 +503,7 @@ class Services extends \Elementor\Widget_Base {
476
  'grid_items_style_padding',
477
  [
478
  'label' => __( 'Padding', 'themeisle-companion' ),
479
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
480
  'size_units' => [ 'px', '%' ],
481
  'selectors' => [
482
  '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -489,7 +516,7 @@ class Services extends \Elementor\Widget_Base {
489
  'grid_items_style_border_radius',
490
  [
491
  'label' => __( 'Border Radius', 'themeisle-companion' ),
492
- 'type' => \Elementor\Controls_Manager::DIMENSIONS,
493
  'size_units' => [ 'px', '%' ],
494
  'selectors' => [
495
  '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -515,7 +542,7 @@ class Services extends \Elementor\Widget_Base {
515
  );
516
 
517
  $this->add_group_control(
518
- \Elementor\Group_Control_Background::get_type(),
519
  [
520
  'name' => 'grid_items_background',
521
  'types' => [ 'classic', 'gradient' ],
@@ -524,7 +551,7 @@ class Services extends \Elementor\Widget_Base {
524
  );
525
 
526
  $this->add_group_control(
527
- \Elementor\Group_Control_Box_Shadow::get_type(),
528
  [
529
  'name' => 'grid_items_box_shadow',
530
  'selector' => '{{WRAPPER}} .obfx-service-box',
@@ -541,7 +568,7 @@ class Services extends \Elementor\Widget_Base {
541
  );
542
 
543
  $this->add_group_control(
544
- \Elementor\Group_Control_Background::get_type(),
545
  [
546
  'name' => 'grid_items_background_hover',
547
  'types' => [ 'classic', 'gradient' ],
@@ -550,7 +577,7 @@ class Services extends \Elementor\Widget_Base {
550
  );
551
 
552
  $this->add_group_control(
553
- \Elementor\Group_Control_Box_Shadow::get_type(),
554
  [
555
  'name' => 'grid_items_box_shadow_hover',
556
  'selector' => '{{WRAPPER}} .obfx-service-box:hover',
@@ -561,7 +588,7 @@ class Services extends \Elementor\Widget_Base {
561
  'hover_transition',
562
  [
563
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
564
- 'type' => \Elementor\Controls_Manager::SLIDER,
565
  'default' => [
566
  'size' => 0.3,
567
  ],
@@ -587,15 +614,11 @@ class Services extends \Elementor\Widget_Base {
587
  protected function render() {
588
  $settings = $this->get_settings();
589
 
590
- $this->maybe_load_widget_style();
591
-
592
  echo '<div class="obfx-grid"><div class="obfx-grid-container' . ( ! empty( $settings['grid_columns_mobile'] ) ? ' obfx-grid-mobile-' . $settings['grid_columns_mobile'] : '' ) . ( ! empty( $settings['grid_columns_tablet'] ) ? ' obfx-grid-tablet-' . $settings['grid_columns_tablet'] : '' ) . ( ! empty( $settings['grid_columns'] ) ? ' obfx-grid-desktop-' . $settings['grid_columns'] : '' ) . '">';
593
  foreach ( $settings['services_list'] as $service ) {
594
- $icon_tag = 'span';
595
 
596
  if ( ! empty( $service['link']['url'] ) ) {
597
  $this->add_render_attribute( 'link', 'href', $settings['link']['url'] );
598
- $icon_tag = 'a';
599
 
600
  if ( $service['link']['is_external'] ) {
601
  $this->add_render_attribute( 'link', 'target', '_blank' );
@@ -619,11 +642,18 @@ class Services extends \Elementor\Widget_Base {
619
  } ?>
620
  <div class="obfx-service-box obfx-grid-col">
621
  <?php
622
- if ( $service['type'] === 'icon' && ! empty( $service['icon'] ) ) { ?>
623
- <span class="obfx-icon-wrap"><i class="obfx-icon <?php echo esc_attr( $service['icon'] ); ?>" style="color: <?php echo esc_attr( $service['color'] ); ?>"></i></span>
624
- <?php
 
 
 
 
 
 
 
625
  } elseif ( $service['type'] === 'image' && ! empty( $service['image']['url'] ) ) { ?>
626
- <span class="obfx-image-wrap"><img class="obfx-image" src="<?php echo esc_url( $service['image']['url'] ); ?>"/></span>
627
  <?php
628
  }
629
  if ( ! empty( $service['title'] ) || ! empty( $service['text'] ) ) { ?>
@@ -635,34 +665,16 @@ class Services extends \Elementor\Widget_Base {
635
  if ( ! empty( $service['text'] ) ) { ?>
636
  <p class="obfx-service-text"><?php echo esc_attr( $service['text'] ); ?></p>
637
  <?php } ?>
638
- </div><!-- /.obfx-service-box-content -->
639
  <?php } ?>
640
- </div><!-- /.obfx-service-box -->
641
  <?php
642
  if ( ! empty( $service['link'] ) ) {
643
  echo '</a>';
644
  } ?>
645
- </div><!-- /.obfx-grid-wrapper -->
646
- <?php
647
- }// End foreach().
648
- echo '</div></div>';
649
-
650
- }
651
-
652
- /**
653
- * Load the widget style dynamically if it is a widget preview
654
- * or enqueue style and scripts if not
655
- *
656
- * This way we are sure that the assets files are loaded only when this block is present in page.
657
- */
658
- protected function maybe_load_widget_style() {
659
- if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
660
- <style>
661
- <?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
662
- </style>
663
  <?php
664
- } else {
665
- wp_enqueue_style('eaw-elementor');
666
  }
 
667
  }
668
  }
9
  */
10
  namespace ThemeIsle\ElementorExtraWidgets;
11
 
12
+ use Elementor\Controls_Manager;
13
+ use Elementor\Group_Control_Background;
14
+ use Elementor\Group_Control_Box_Shadow;
15
+ use Elementor\Group_Control_Typography;
16
+ use Elementor\Scheme_Color;
17
+ use Elementor\Scheme_Typography;
18
+ use Elementor\Widget_Base;
19
 
20
  /**
21
  * Class Services
22
  *
23
  * @package ThemeIsle\ElementorExtraWidgets
24
  */
25
+ class Services extends Widget_Base {
26
 
27
  /**
28
  * Widget name.
51
  return 'fa fa-diamond';
52
  }
53
 
54
+ /**
55
+ * Retrieve the list of styles the services widget depended on.
56
+ *
57
+ * @return array Widget scripts dependencies.
58
+ */
59
+ public function get_style_depends() {
60
+ return [ 'eaw-elementor' ];
61
+ }
62
+
63
 
64
  /**
65
  * Widget Category
96
  'services_list',
97
  [
98
  'label' => __( 'Services', 'themeisle-companion' ),
99
+ 'type' => Controls_Manager::REPEATER,
100
  'default' => [
101
  [
102
  'title' => __( 'Award-Winning​', 'themeisle-companion' ),
103
  'text' => __( 'Add some text here to describe your services to the page visitors.​', 'themeisle-companion' ),
104
+ 'icon_new' => [
105
+ 'value' => 'fas fa-trophy',
106
+ 'library' => 'solid',
107
+ ],
108
  'color' => '#333333',
109
  'type' => 'icon',
110
  ],
111
  [
112
  'title' => __( 'Professional​', 'themeisle-companion' ),
113
  'text' => __( 'Add some text here to describe your services to the page visitors.​', 'themeisle-companion' ),
114
+ 'icon_new' => [
115
+ 'value' => 'fas fa-suitcase',
116
+ 'library' => 'solid',
117
+ ],
118
  'color' => '#333333',
119
  'type' => 'icon',
120
  ],
121
  [
122
  'title' => __( 'Consulting​', 'themeisle-companion' ),
123
  'text' => __( 'Add some text here to describe your services to the page visitors.​', 'themeisle-companion' ),
124
+ 'icon_new' => [
125
+ 'value' => 'fas fa-handshake',
126
+ 'library' => 'solid',
127
+ ],
128
  'color' => '#333333',
129
  'type' => 'icon',
130
  ],
131
  ],
132
  'fields' => [
133
  [
134
+ 'type' => Controls_Manager::CHOOSE,
135
  'name' => 'type',
136
  'label_block' => true,
137
  'label' => __( 'Type', 'themeisle-companion' ),
148
  ],
149
  ],
150
  [
151
+ 'type' => Controls_Manager::TEXT,
152
  'name' => 'title',
153
  'label_block' => true,
154
  'label' => __( 'Title & Description', 'themeisle-companion' ),
155
  'default' => __( 'Service Title', 'themeisle-companion' ),
156
  ],
157
  [
158
+ 'type' => Controls_Manager::TEXTAREA,
159
  'name' => 'text',
160
  'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
161
  'default' => __( 'Feature', 'themeisle-companion' ),
162
  ],
163
  [
164
+ 'type' => Controls_Manager::ICONS,
165
+ 'name' => 'icon_new',
166
+ 'label' => __( 'Icon', 'themeisle-companion' ),
167
+ 'default' => [
168
+ 'value' => 'fas fa-gem',
169
+ 'library' => 'solid',
170
+ ],
171
+ 'fa4compatibility' => 'icon',
172
  'condition' => [
173
  'type' => 'icon',
174
  ],
175
  ],
176
  [
177
+ 'type' => Controls_Manager::COLOR,
178
  'name' => 'color',
179
  'label_block' => false,
180
  'label' => __( 'Icon Color', 'themeisle-companion' ),
184
  ],
185
  ],
186
  [
187
+ 'type' => Controls_Manager::MEDIA,
188
  'name' => 'image',
189
  'label' => __( 'Image', 'themeisle-companion' ),
190
  'condition' => [
192
  ],
193
  ],
194
  [
195
+ 'type' => Controls_Manager::URL,
196
  'name' => 'link',
197
  'label' => __( 'Link to', 'themeisle-companion' ),
198
  'separator' => 'before',
207
  'align',
208
  [
209
  'label' => '<i class="fa fa-arrows"></i> ' . __( 'Icon Position', 'themeisle-companion' ),
210
+ 'type' => Controls_Manager::CHOOSE,
211
  'options' => [
212
  'left' => [
213
  'title' => __( 'Left', 'themeisle-companion' ),
232
  $this->add_responsive_control(
233
  'grid_columns',
234
  [
235
+ 'type' => Controls_Manager::SELECT,
236
  'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
237
  'default' => 3,
238
  'tablet_default' => 2,
257
  'section_style_icon',
258
  [
259
  'label' => __( 'Icon / Image', 'themeisle-companion' ),
260
+ 'tab' => Controls_Manager::TAB_STYLE,
261
  ]
262
  );
263
  $this->add_control(
264
  'icon_space',
265
  [
266
  'label' => __( 'Spacing', 'themeisle-companion' ),
267
+ 'type' => Controls_Manager::SLIDER,
268
  'default' => [
269
  'size' => 15,
270
  ],
285
  'icon_size',
286
  [
287
  'label' => __( 'Size', 'themeisle-companion' ),
288
+ 'type' => Controls_Manager::SLIDER,
289
  'range' => [
290
  'px' => [
291
  'min' => 6,
296
  'size' => 35,
297
  ],
298
  'selectors' => [
299
+ '{{WRAPPER}} i.obfx-icon' => 'font-size: {{SIZE}}{{UNIT}};',
300
+ '{{WRAPPER}} img.obfx-icon' => 'width: {{SIZE}}{{UNIT}};',
301
  '{{WRAPPER}} .obfx-image' => 'max-width: {{SIZE}}{{UNIT}};',
302
  ],
303
  ]
307
  'section_style_content',
308
  [
309
  'label' => __( 'Content', 'themeisle-companion' ),
310
+ 'tab' => Controls_Manager::TAB_STYLE,
311
  ]
312
  );
313
 
315
  'text_align',
316
  [
317
  'label' => __( 'Alignment', 'themeisle-companion' ),
318
+ 'type' => Controls_Manager::CHOOSE,
319
  'toggle' => false,
320
  'default' => 'center',
321
  'options' => [
343
  'heading_title',
344
  [
345
  'label' => __( 'Title', 'themeisle-companion' ),
346
+ 'type' => Controls_Manager::HEADING,
347
  'separator' => 'before',
348
  ]
349
  );
352
  'title_bottom_space',
353
  [
354
  'label' => __( 'Spacing', 'themeisle-companion' ),
355
+ 'type' => Controls_Manager::SLIDER,
356
  'range' => [
357
  'px' => [
358
  'min' => 0,
369
  'title_color',
370
  [
371
  'label' => __( 'Color', 'themeisle-companion' ),
372
+ 'type' => Controls_Manager::COLOR,
373
  'default' => '',
374
  'selectors' => [
375
  '{{WRAPPER}} .obfx-service-title' => 'color: {{VALUE}};',
378
  );
379
 
380
  $this->add_group_control(
381
+ Group_Control_Typography::get_type(),
382
  [
383
  'name' => 'title_typography',
384
  'selector' => '{{WRAPPER}} .obfx-service-title',
385
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
386
  ]
387
  );
388
 
390
  'heading_description',
391
  [
392
  'label' => __( 'Description', 'themeisle-companion' ),
393
+ 'type' => Controls_Manager::HEADING,
394
  'separator' => 'before',
395
  ]
396
  );
399
  'description_color',
400
  [
401
  'label' => __( 'Color', 'themeisle-companion' ),
402
+ 'type' => Controls_Manager::COLOR,
403
  'default' => '',
404
  'selectors' => [
405
  '{{WRAPPER}} .obfx-service-text' => 'color: {{VALUE}};',
406
  ],
407
  'scheme' => [
408
+ 'type' => Scheme_Color::get_type(),
409
+ 'value' => Scheme_Color::COLOR_3,
410
  ],
411
  ]
412
  );
413
 
414
  $this->add_group_control(
415
+ Group_Control_Typography::get_type(),
416
  [
417
  'name' => 'description_typography',
418
  'selector' => '{{WRAPPER}} .obfx-service-text',
419
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_3,
420
  ]
421
  );
422
 
431
  'section_grid_style',
432
  [
433
  'label' => __( 'Grid', 'themeisle-companion' ),
434
+ 'tab' => Controls_Manager::TAB_STYLE,
435
  ]
436
  );
437
 
440
  'grid_style_columns_margin',
441
  [
442
  'label' => __( 'Columns margin', 'themeisle-companion' ),
443
+ 'type' => Controls_Manager::SLIDER,
444
  'default' => [
445
  'size' => 15,
446
  ],
462
  'grid_style_rows_margin',
463
  [
464
  'label' => __( 'Rows margin', 'themeisle-companion' ),
465
+ 'type' => Controls_Manager::SLIDER,
466
  'default' => [
467
  'size' => 30,
468
  ],
480
 
481
  // Background.
482
  $this->add_group_control(
483
+ Group_Control_Background::get_type(),
484
  [
485
  'name' => 'grid_style_background',
486
  'types' => [ 'classic', 'gradient' ],
493
  'grid_items_style_heading',
494
  [
495
  'label' => __( 'Items', 'themeisle-companion' ),
496
+ 'type' => Controls_Manager::HEADING,
497
  'separator' => 'before',
498
  ]
499
  );
503
  'grid_items_style_padding',
504
  [
505
  'label' => __( 'Padding', 'themeisle-companion' ),
506
+ 'type' => Controls_Manager::DIMENSIONS,
507
  'size_units' => [ 'px', '%' ],
508
  'selectors' => [
509
  '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
516
  'grid_items_style_border_radius',
517
  [
518
  'label' => __( 'Border Radius', 'themeisle-companion' ),
519
+ 'type' => Controls_Manager::DIMENSIONS,
520
  'size_units' => [ 'px', '%' ],
521
  'selectors' => [
522
  '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
542
  );
543
 
544
  $this->add_group_control(
545
+ Group_Control_Background::get_type(),
546
  [
547
  'name' => 'grid_items_background',
548
  'types' => [ 'classic', 'gradient' ],
551
  );
552
 
553
  $this->add_group_control(
554
+ Group_Control_Box_Shadow::get_type(),
555
  [
556
  'name' => 'grid_items_box_shadow',
557
  'selector' => '{{WRAPPER}} .obfx-service-box',
568
  );
569
 
570
  $this->add_group_control(
571
+ Group_Control_Background::get_type(),
572
  [
573
  'name' => 'grid_items_background_hover',
574
  'types' => [ 'classic', 'gradient' ],
577
  );
578
 
579
  $this->add_group_control(
580
+ Group_Control_Box_Shadow::get_type(),
581
  [
582
  'name' => 'grid_items_box_shadow_hover',
583
  'selector' => '{{WRAPPER}} .obfx-service-box:hover',
588
  'hover_transition',
589
  [
590
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
591
+ 'type' => Controls_Manager::SLIDER,
592
  'default' => [
593
  'size' => 0.3,
594
  ],
614
  protected function render() {
615
  $settings = $this->get_settings();
616
 
 
 
617
  echo '<div class="obfx-grid"><div class="obfx-grid-container' . ( ! empty( $settings['grid_columns_mobile'] ) ? ' obfx-grid-mobile-' . $settings['grid_columns_mobile'] : '' ) . ( ! empty( $settings['grid_columns_tablet'] ) ? ' obfx-grid-tablet-' . $settings['grid_columns_tablet'] : '' ) . ( ! empty( $settings['grid_columns'] ) ? ' obfx-grid-desktop-' . $settings['grid_columns'] : '' ) . '">';
618
  foreach ( $settings['services_list'] as $service ) {
 
619
 
620
  if ( ! empty( $service['link']['url'] ) ) {
621
  $this->add_render_attribute( 'link', 'href', $settings['link']['url'] );
 
622
 
623
  if ( $service['link']['is_external'] ) {
624
  $this->add_render_attribute( 'link', 'target', '_blank' );
642
  } ?>
643
  <div class="obfx-service-box obfx-grid-col">
644
  <?php
645
+ if ( $service['type'] === 'icon' ) {
646
+ if ( empty( $service['icon'] ) || isset( $service['__fa4_migrated']['icon_new'] ) ) {
647
+ if ( isset( $service['icon_new']['value']['url'] ) ) {
648
+ echo '<span class="obfx-icon-wrap"><img class="obfx-icon" src="' . esc_url( $service['icon_new']['value']['url'] ) . '" alt="' . esc_attr( get_post_meta( $service['icon_new']['value']['id'], '_wp_attachment_image_alt', true ) ) . '"/></span>';
649
+ } else {
650
+ echo '<span class="obfx-icon-wrap"><i class="obfx-icon ' . esc_attr( $service['icon_new']['value'] ) . '" aria-hidden="true" style="color:' . esc_attr( $service['color'] ) . '"></i></span>';
651
+ }
652
+ } else {
653
+ echo '<span class="obfx-icon-wrap"><i class="obfx-icon ' . esc_attr( $service['icon'] ) . '" style="color: ' . esc_attr( $service['color'] ) . '"></i></span>';
654
+ }
655
  } elseif ( $service['type'] === 'image' && ! empty( $service['image']['url'] ) ) { ?>
656
+ <span class="obfx-image-wrap"><img class="obfx-image" src="<?php echo esc_url( $service['image']['url'] ); ?>" alt="<?php echo esc_attr( get_post_meta( $service['image']['id'], '_wp_attachment_image_alt', true ) ); ?>"/></span>
657
  <?php
658
  }
659
  if ( ! empty( $service['title'] ) || ! empty( $service['text'] ) ) { ?>
665
  if ( ! empty( $service['text'] ) ) { ?>
666
  <p class="obfx-service-text"><?php echo esc_attr( $service['text'] ); ?></p>
667
  <?php } ?>
668
+ </div>
669
  <?php } ?>
670
+ </div>
671
  <?php
672
  if ( ! empty( $service['link'] ) ) {
673
  echo '</a>';
674
  } ?>
675
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
676
  <?php
 
 
677
  }
678
+ echo '</div></div>';
679
  }
680
  }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/best-products.php CHANGED
@@ -7,6 +7,8 @@
7
 
8
  class Woo_Best_Products extends EAW_WP_Widget {
9
 
 
 
10
  public function __construct() {
11
  $widget_ops = array(
12
  'classname' => 'woo_best_products',
@@ -27,27 +29,20 @@ class Woo_Best_Products extends EAW_WP_Widget {
27
  * @param array $instance
28
  */
29
  public function widget( $args, $instance ) {
30
- $cache = array();
31
  if ( ! $this->is_preview() ) {
32
- $cache = wp_cache_get( 'woo_best_products', 'widget' );
33
- }
34
-
35
- if ( ! is_array( $cache ) ) {
36
- $cache = array();
37
  }
38
 
39
  if ( ! isset( $args['widget_id'] ) ) {
40
  $args['widget_id'] = $this->id;
41
  }
42
 
43
- if ( isset( $cache[ $args['widget_id'] ] ) ) {
44
- echo $cache[ $args['widget_id'] ];
45
 
46
  return;
47
  }
48
 
49
- ob_start();
50
-
51
  $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
52
  $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
53
 
@@ -66,15 +61,25 @@ class Woo_Best_Products extends EAW_WP_Widget {
66
  }
67
 
68
  $args = apply_filters(
69
- 'elementor-addon-widgets_product_categories_args', array(
70
- 'limit' => $limit,
71
- 'columns' => $columns,
72
- 'title' => $title,
73
- 'orderby' => 'date',
74
- 'order' => 'desc',
 
 
 
 
75
  )
76
  );
77
- echo $args['before_widget'];
 
 
 
 
 
 
78
  echo '<section class="eaw-product-section woo-best-products">';
79
 
80
  do_action( 'storepage_homepage_before_best_selling_products' );
@@ -90,11 +95,14 @@ class Woo_Best_Products extends EAW_WP_Widget {
90
  do_action( 'storepage_homepage_after_best_selling_products' );
91
 
92
  echo '</section>';
93
- echo $args['after_widget'];
 
 
 
94
 
95
  if ( ! $this->is_preview() ) {
96
- $cache[ $args['widget_id'] ] = ob_get_flush();
97
- wp_cache_set( 'woo_best_products', $cache, 'widget' );
98
  } else {
99
  ob_end_flush();
100
  }
7
 
8
  class Woo_Best_Products extends EAW_WP_Widget {
9
 
10
+ private static $cache = array();
11
+
12
  public function __construct() {
13
  $widget_ops = array(
14
  'classname' => 'woo_best_products',
29
  * @param array $instance
30
  */
31
  public function widget( $args, $instance ) {
 
32
  if ( ! $this->is_preview() ) {
33
+ self::$cache = wp_cache_get( 'woo_best_products', 'widget' );
 
 
 
 
34
  }
35
 
36
  if ( ! isset( $args['widget_id'] ) ) {
37
  $args['widget_id'] = $this->id;
38
  }
39
 
40
+ if ( isset( self::$cache[ $args['widget_id'] ] ) ) {
41
+ echo self::$cache[ $args['widget_id'] ];
42
 
43
  return;
44
  }
45
 
 
 
46
  $title = ( ! empty( $instance['title'] ) ) ? $instance['title'] : '';
47
  $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
48
 
61
  }
62
 
63
  $args = apply_filters(
64
+ 'elementor-addon-widgets_product_categories_args',
65
+ array_merge(
66
+ array(
67
+ 'limit' => $limit,
68
+ 'columns' => $columns,
69
+ 'title' => $title,
70
+ 'orderby' => 'date',
71
+ 'order' => 'desc',
72
+ ),
73
+ $args
74
  )
75
  );
76
+
77
+ ob_start();
78
+
79
+ if ( isset( $args['before_widget'] ) ) {
80
+ echo $args['before_widget'];
81
+ }
82
+
83
  echo '<section class="eaw-product-section woo-best-products">';
84
 
85
  do_action( 'storepage_homepage_before_best_selling_products' );
95
  do_action( 'storepage_homepage_after_best_selling_products' );
96
 
97
  echo '</section>';
98
+
99
+ if ( isset( $args['after_widget'] ) ) {
100
+ echo $args['after_widget'];
101
+ }
102
 
103
  if ( ! $this->is_preview() ) {
104
+ self::$cache[ $args['widget_id'] ] = ob_get_flush();
105
+ wp_cache_set( 'woo_best_products', self::$cache, 'widget' );
106
  } else {
107
  ob_end_flush();
108
  }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/featured-products.php CHANGED
@@ -66,16 +66,23 @@ class Woo_Featured_Products extends EAW_WP_Widget {
66
  }
67
 
68
  $args = apply_filters(
69
- 'elementor-addon-widgets_product_categories_args', array(
70
- 'limit' => $limit,
71
- 'columns' => $columns,
72
- 'title' => $title,
73
- 'orderby' => 'date',
74
- 'order' => 'desc',
 
 
 
 
75
  )
76
  );
77
 
78
- echo $args['before_widget'];
 
 
 
79
  echo '<section class="eaw-product-section woo-featured-products">';
80
 
81
  do_action( 'storepage_homepage_before_featured_products' );
@@ -97,7 +104,9 @@ class Woo_Featured_Products extends EAW_WP_Widget {
97
 
98
  echo '</section>';
99
 
100
- echo $args['after_widget'];
 
 
101
 
102
  if ( ! $this->is_preview() ) {
103
  $cache[ $args['widget_id'] ] = ob_get_flush();
66
  }
67
 
68
  $args = apply_filters(
69
+ 'elementor-addon-widgets_product_categories_args',
70
+ array_merge(
71
+ array(
72
+ 'limit' => $limit,
73
+ 'columns' => $columns,
74
+ 'title' => $title,
75
+ 'orderby' => 'date',
76
+ 'order' => 'desc',
77
+ ),
78
+ $args
79
  )
80
  );
81
 
82
+ if ( isset( $args['before_widget'] ) ) {
83
+ echo $args['before_widget'];
84
+ }
85
+
86
  echo '<section class="eaw-product-section woo-featured-products">';
87
 
88
  do_action( 'storepage_homepage_before_featured_products' );
104
 
105
  echo '</section>';
106
 
107
+ if ( isset( $args['after_widget'] ) ) {
108
+ echo $args['after_widget'];
109
+ }
110
 
111
  if ( ! $this->is_preview() ) {
112
  $cache[ $args['widget_id'] ] = ob_get_flush();
vendor/codeinwp/elementor-extra-widgets/widgets/woo/popular-products.php CHANGED
@@ -66,16 +66,23 @@ class Woo_Popular_Products extends EAW_WP_Widget {
66
  }
67
 
68
  $args = apply_filters(
69
- 'elementor-addon-widgets_product_categories_args', array(
70
- 'limit' => $limit,
71
- 'columns' => $columns,
72
- 'title' => $title,
73
- 'orderby' => 'date',
74
- 'order' => 'desc',
 
 
 
 
75
  )
76
  );
77
 
78
- echo $args['before_widget'];
 
 
 
79
  // echo '<div class="woo-popular-products">';
80
  echo '<section class="eaw-product-section woo-popular-products">';
81
 
@@ -96,7 +103,10 @@ class Woo_Popular_Products extends EAW_WP_Widget {
96
 
97
  echo '</section>';
98
  // echo '</div>';
99
- echo $args['after_widget'];
 
 
 
100
 
101
  if ( ! $this->is_preview() ) {
102
  $cache[ $args['widget_id'] ] = ob_get_flush();
66
  }
67
 
68
  $args = apply_filters(
69
+ 'elementor-addon-widgets_product_categories_args',
70
+ array_merge(
71
+ array(
72
+ 'limit' => $limit,
73
+ 'columns' => $columns,
74
+ 'title' => $title,
75
+ 'orderby' => 'date',
76
+ 'order' => 'desc',
77
+ ),
78
+ $args
79
  )
80
  );
81
 
82
+ if ( isset( $args['before_widget'] ) ) {
83
+ echo $args['before_widget'];
84
+ }
85
+
86
  // echo '<div class="woo-popular-products">';
87
  echo '<section class="eaw-product-section woo-popular-products">';
88
 
103
 
104
  echo '</section>';
105
  // echo '</div>';
106
+
107
+ if ( isset( $args['after_widget'] ) ) {
108
+ echo $args['after_widget'];
109
+ }
110
 
111
  if ( ! $this->is_preview() ) {
112
  $cache[ $args['widget_id'] ] = ob_get_flush();
vendor/codeinwp/elementor-extra-widgets/widgets/woo/products-categories.php CHANGED
@@ -66,16 +66,23 @@ class Woo_Product_Categories extends EAW_WP_Widget {
66
  }
67
 
68
  $args = apply_filters(
69
- 'eaw_product_categories_args', array(
70
- 'limit' => $limit,
71
- 'columns' => $columns,
72
- 'child_categories' => 0,
73
- 'orderby' => 'name',
74
- 'title' => $title,
 
 
 
 
75
  )
76
  );
77
 
78
- echo $args['before_widget'];
 
 
 
79
  // echo '<div class="widget-woo-categories">';
80
  echo '<section class="eaw-product-section widget-woo-categories">';
81
 
@@ -98,7 +105,10 @@ class Woo_Product_Categories extends EAW_WP_Widget {
98
 
99
  echo '</section>';
100
  // echo '</div>';
101
- echo $args['after_widget'];
 
 
 
102
 
103
  if ( ! $this->is_preview() ) {
104
  $cache[ $args['widget_id'] ] = ob_get_flush();
66
  }
67
 
68
  $args = apply_filters(
69
+ 'eaw_product_categories_args',
70
+ array_merge(
71
+ array(
72
+ 'limit' => $limit,
73
+ 'columns' => $columns,
74
+ 'child_categories' => 0,
75
+ 'orderby' => 'name',
76
+ 'title' => $title,
77
+ ),
78
+ $args
79
  )
80
  );
81
 
82
+ if ( isset( $args['before_widget'] ) ) {
83
+ echo $args['before_widget'];
84
+ }
85
+
86
  // echo '<div class="widget-woo-categories">';
87
  echo '<section class="eaw-product-section widget-woo-categories">';
88
 
105
 
106
  echo '</section>';
107
  // echo '</div>';
108
+
109
+ if ( isset( $args['after_widget'] ) ) {
110
+ echo $args['after_widget'];
111
+ }
112
 
113
  if ( ! $this->is_preview() ) {
114
  $cache[ $args['widget_id'] ] = ob_get_flush();
vendor/codeinwp/elementor-extra-widgets/widgets/woo/recent-products.php CHANGED
@@ -66,14 +66,21 @@ class Woo_Recent_Products extends EAW_WP_Widget {
66
  }
67
 
68
  $args = apply_filters(
69
- 'elementor-addon-widgets_product_categories_args', array(
70
- 'limit' => $limit,
71
- 'columns' => $columns,
72
- 'title' => $title,
 
 
 
 
73
  )
74
  );
75
 
76
- echo $args['before_widget'];
 
 
 
77
  // echo '<div class="woo-recent-products">';
78
  echo '<section class="eaw-product-section woo-recent-products">';
79
 
@@ -94,7 +101,10 @@ class Woo_Recent_Products extends EAW_WP_Widget {
94
 
95
  echo '</section>';
96
  // echo '</div>';
97
- echo $args['after_widget'];
 
 
 
98
 
99
  if ( ! $this->is_preview() ) {
100
  $cache[ $args['widget_id'] ] = ob_get_flush();
66
  }
67
 
68
  $args = apply_filters(
69
+ 'elementor-addon-widgets_product_categories_args',
70
+ array_merge(
71
+ array(
72
+ 'limit' => $limit,
73
+ 'columns' => $columns,
74
+ 'title' => $title,
75
+ ),
76
+ $args
77
  )
78
  );
79
 
80
+ if ( isset( $args['before_widget'] ) ) {
81
+ echo $args['before_widget'];
82
+ }
83
+
84
  // echo '<div class="woo-recent-products">';
85
  echo '<section class="eaw-product-section woo-recent-products">';
86
 
101
 
102
  echo '</section>';
103
  // echo '</div>';
104
+
105
+ if ( isset( $args['after_widget'] ) ) {
106
+ echo $args['after_widget'];
107
+ }
108
 
109
  if ( ! $this->is_preview() ) {
110
  $cache[ $args['widget_id'] ] = ob_get_flush();
vendor/codeinwp/elementor-extra-widgets/widgets/woo/sale-products.php CHANGED
@@ -66,14 +66,21 @@ class Woo_Sale_Products extends EAW_WP_Widget {
66
  }
67
 
68
  $args = apply_filters(
69
- 'elementor-addon-widgets_product_categories_args', array(
70
- 'limit' => $limit,
71
- 'columns' => $columns,
72
- 'title' => $title,
 
 
 
 
73
  )
74
  );
75
 
76
- echo $args['before_widget'];
 
 
 
77
  // echo '<div class="woo-sale-products">';
78
  echo '<section class="eaw-product-section woo-sale-products">';
79
 
@@ -85,7 +92,7 @@ class Woo_Sale_Products extends EAW_WP_Widget {
85
 
86
  echo $this->do_shortcode(
87
  'sale_products', array(
88
- 'per_page' => intval( $args['limit'] ),
89
  'columns' => intval( $args['columns'] ),
90
  )
91
  );
@@ -94,7 +101,10 @@ class Woo_Sale_Products extends EAW_WP_Widget {
94
 
95
  echo '</section>';
96
  // echo '</div>';
97
- echo $args['after_widget'];
 
 
 
98
 
99
  if ( ! $this->is_preview() ) {
100
  $cache[ $args['widget_id'] ] = ob_get_flush();
66
  }
67
 
68
  $args = apply_filters(
69
+ 'elementor-addon-widgets_product_categories_args',
70
+ array_merge(
71
+ array(
72
+ 'limit' => $limit,
73
+ 'columns' => $columns,
74
+ 'title' => $title,
75
+ ),
76
+ $args
77
  )
78
  );
79
 
80
+ if ( isset( $args['before_widget'] ) ) {
81
+ echo $args['before_widget'];
82
+ }
83
+
84
  // echo '<div class="woo-sale-products">';
85
  echo '<section class="eaw-product-section woo-sale-products">';
86
 
92
 
93
  echo $this->do_shortcode(
94
  'sale_products', array(
95
+ 'limit' => intval( $args['limit'] ),
96
  'columns' => intval( $args['columns'] ),
97
  )
98
  );
101
 
102
  echo '</section>';
103
  // echo '</div>';
104
+
105
+ if ( isset( $args['after_widget'] ) ) {
106
+ echo $args['after_widget'];
107
+ }
108
 
109
  if ( ! $this->is_preview() ) {
110
  $cache[ $args['widget_id'] ] = ob_get_flush();
vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget-plus.php CHANGED
@@ -104,7 +104,9 @@ class EAW_Recent_Posts_Plus extends WP_Widget {
104
  <?php
105
  endwhile;
106
 
107
- echo $args['after_widget'];
 
 
108
 
109
  wp_reset_postdata();
110
 
104
  <?php
105
  endwhile;
106
 
107
+ if ( isset( $args['after_widget'] ) ) {
108
+ echo $args['after_widget'];
109
+ }
110
 
111
  wp_reset_postdata();
112
 
vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget.php CHANGED
@@ -101,7 +101,9 @@ class EAW_Recent_Posts extends WP_Widget {
101
  <?php
102
  endwhile;
103
 
104
- echo $args['after_widget'];
 
 
105
 
106
  wp_reset_postdata();
107
 
101
  <?php
102
  endwhile;
103
 
104
+ if ( isset( $args['after_widget'] ) ) {
105
+ echo $args['after_widget'];
106
+ }
107
 
108
  wp_reset_postdata();
109
 
vendor/codeinwp/themeisle-content-forms/assets/content-forms.css CHANGED
@@ -90,3 +90,7 @@
90
  .ti-cf-module.content-form-newsletter .elementor-column:not(.elementor-col-100) + .submit-form {
91
  display: flex; width: auto;
92
  }
 
 
 
 
90
  .ti-cf-module.content-form-newsletter .elementor-column:not(.elementor-col-100) + .submit-form {
91
  display: flex; width: auto;
92
  }
93
+
94
+ .ti-cf-module .elementor-button-icon svg{
95
+ height: initial;
96
+ }
vendor/codeinwp/themeisle-content-forms/form_manager.php CHANGED
@@ -35,7 +35,7 @@ class Form_Manager {
35
  *
36
  * @var $forms
37
  */
38
- public static $forms = [ 'contact', 'newsletter', 'registration' ];
39
 
40
  /**
41
  * Initialization function.
@@ -161,7 +161,7 @@ class Form_Manager {
161
  public static function get_user_roles() {
162
  global $wp_roles;
163
  $all_roles = $wp_roles->roles;
164
- $roles = [];
165
  foreach ( $all_roles as $role_key => $role_data ) {
166
  $roles[ $role_key ] = $role_data['name'];
167
  }
35
  *
36
  * @var $forms
37
  */
38
+ public static $forms = array( 'contact', 'newsletter', 'registration' );
39
 
40
  /**
41
  * Initialization function.
161
  public static function get_user_roles() {
162
  global $wp_roles;
163
  $all_roles = $wp_roles->roles;
164
+ $roles = array();
165
  foreach ( $all_roles as $role_key => $role_data ) {
166
  $roles[ $role_key ] = $role_data['name'];
167
  }
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/beaver/beaver_widget_manager.php CHANGED
@@ -15,7 +15,7 @@ class Beaver_Widget_Manager {
15
  *
16
  * @var $forms
17
  */
18
- public static $forms = [ 'contact', 'newsletter', 'registration' ];
19
 
20
  /*
21
  * Register beaver modules
15
  *
16
  * @var $forms
17
  */
18
+ public static $forms = array( 'contact', 'newsletter', 'registration' );
19
 
20
  /*
21
  * Register beaver modules
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/contact_admin.php CHANGED
@@ -137,29 +137,29 @@ class Contact_Admin extends Elementor_Widget_Base {
137
 
138
  $this->add_responsive_control(
139
  'align_submit',
140
- [
141
  'label' => __( 'Alignment', 'themeisle-companion' ),
142
  'type' => Controls_Manager::CHOOSE,
143
  'toggle' => false,
144
  'default' => 'left',
145
- 'options' => [
146
- 'left' => [
147
  'title' => __( 'Left', 'themeisle-companion' ),
148
  'icon' => 'fa fa-align-left',
149
- ],
150
- 'center' => [
151
  'title' => __( 'Center', 'themeisle-companion' ),
152
  'icon' => 'fa fa-align-center',
153
- ],
154
- 'right' => [
155
  'title' => __( 'Right', 'themeisle-companion' ),
156
  'icon' => 'fa fa-align-right',
157
- ],
158
- ],
159
- 'selectors' => [
160
  '{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
161
- ],
162
- ]
163
  );
164
  }
165
 
137
 
138
  $this->add_responsive_control(
139
  'align_submit',
140
+ array(
141
  'label' => __( 'Alignment', 'themeisle-companion' ),
142
  'type' => Controls_Manager::CHOOSE,
143
  'toggle' => false,
144
  'default' => 'left',
145
+ 'options' => array(
146
+ 'left' => array(
147
  'title' => __( 'Left', 'themeisle-companion' ),
148
  'icon' => 'fa fa-align-left',
149
+ ),
150
+ 'center' => array(
151
  'title' => __( 'Center', 'themeisle-companion' ),
152
  'icon' => 'fa fa-align-center',
153
+ ),
154
+ 'right' => array(
155
  'title' => __( 'Right', 'themeisle-companion' ),
156
  'icon' => 'fa fa-align-right',
157
+ ),
158
+ ),
159
+ 'selectors' => array(
160
  '{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
161
+ ),
162
+ )
163
  );
164
  }
165
 
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_base.php CHANGED
@@ -11,6 +11,7 @@ use Elementor\Controls_Manager;
11
  use Elementor\Group_Control_Border;
12
  use Elementor\Group_Control_Box_Shadow;
13
  use Elementor\Group_Control_Typography;
 
14
  use Elementor\Plugin;
15
  use Elementor\Repeater;
16
  use Elementor\Scheme_Color;
@@ -29,7 +30,7 @@ abstract class Elementor_Widget_Base extends Widget_Base {
29
  * @return array
30
  */
31
  public function get_categories() {
32
- return [ 'obfx-elementor-widgets' ];
33
  }
34
 
35
  /**
@@ -41,6 +42,15 @@ abstract class Elementor_Widget_Base extends Widget_Base {
41
  return 'eicon-text-align-left';
42
  }
43
 
 
 
 
 
 
 
 
 
 
44
  /**
45
  * Register the controls for each Elementor Widget.
46
  */
@@ -101,19 +111,19 @@ abstract class Elementor_Widget_Base extends Widget_Base {
101
 
102
  $repeater->add_responsive_control(
103
  'field_width',
104
- [
105
  'label' => __( 'Field Width', 'themeisle-companion' ),
106
  'type' => Controls_Manager::SELECT,
107
- 'options' => [
108
  '100' => '100%',
109
  '75' => '75%',
110
  '66' => '66%',
111
  '50' => '50%',
112
  '33' => '33%',
113
  '25' => '25%',
114
- ],
115
  'default' => '100',
116
- ]
117
  );
118
 
119
  $repeater->add_control(
@@ -190,399 +200,399 @@ abstract class Elementor_Widget_Base extends Widget_Base {
190
  protected function register_style_controls() {
191
  $this->start_controls_section(
192
  'section_form_style',
193
- [
194
  'label' => __( 'Form', 'themeisle-companion' ),
195
  'tab' => Controls_Manager::TAB_STYLE,
196
- ]
197
  );
198
 
199
  $this->add_control(
200
  'column_gap',
201
- [
202
  'label' => __( 'Columns Gap', 'themeisle-companion' ),
203
  'type' => Controls_Manager::SLIDER,
204
- 'default' => [
205
  'size' => 10,
206
- ],
207
- 'range' => [
208
- 'px' => [
209
  'min' => 0,
210
  'max' => 60,
211
- ],
212
- ],
213
- 'selectors' => [
214
  '{{WRAPPER}} .elementor-column' => 'padding-right: calc( {{SIZE}}{{UNIT}}/2 ); padding-left: calc( {{SIZE}}{{UNIT}}/2 );',
215
  '{{WRAPPER}} .content-form .submit-form' => 'padding-right: calc( {{SIZE}}{{UNIT}}/2 ); padding-left: calc( {{SIZE}}{{UNIT}}/2 );',
216
- ],
217
- ]
218
  );
219
 
220
  $this->add_control(
221
  'row_gap',
222
- [
223
  'label' => __( 'Rows Gap', 'themeisle-companion' ),
224
  'type' => Controls_Manager::SLIDER,
225
- 'default' => [
226
  'size' => 10,
227
- ],
228
- 'range' => [
229
- 'px' => [
230
  'min' => 0,
231
  'max' => 60,
232
- ],
233
- ],
234
- 'selectors' => [
235
  '{{WRAPPER}} .elementor-column' => 'margin-bottom: {{SIZE}}{{UNIT}};',
236
  '{{WRAPPER}} .content-form .submit-form' => 'margin-bottom: {{SIZE}}{{UNIT}};',
237
- ],
238
- ]
239
  );
240
 
241
  $this->add_control(
242
  'heading_label',
243
- [
244
  'label' => __( 'Label', 'themeisle-companion' ),
245
  'type' => Controls_Manager::HEADING,
246
  'separator' => 'before',
247
- ]
248
  );
249
 
250
  $this->add_control(
251
  'label_spacing',
252
- [
253
  'label' => __( 'Spacing', 'themeisle-companion' ),
254
  'type' => Controls_Manager::SLIDER,
255
- 'default' => [
256
  'size' => 0,
257
- ],
258
- 'range' => [
259
- 'px' => [
260
  'min' => 0,
261
  'max' => 60,
262
- ],
263
- ],
264
- 'selectors' => [
265
  'body.rtl {{WRAPPER}} fieldset > label' => 'padding-left: {{SIZE}}{{UNIT}};',
266
  // for the label position = inline option
267
  'body:not(.rtl) {{WRAPPER}} fieldset > label' => 'padding-right: {{SIZE}}{{UNIT}};',
268
  // for the label position = inline option
269
  'body {{WRAPPER}} fieldset > label' => 'padding-bottom: {{SIZE}}{{UNIT}};',
270
  // for the label position = above option
271
- ],
272
- ]
273
  );
274
 
275
  $this->add_control(
276
  'label_color',
277
- [
278
  'label' => __( 'Text Color', 'themeisle-companion' ),
279
  'type' => Controls_Manager::COLOR,
280
- 'selectors' => [
281
  '{{WRAPPER}} fieldset > label, {{WRAPPER}} .elementor-field-subgroup label' => 'color: {{VALUE}};',
282
- ],
283
- 'scheme' => [
284
  'type' => Scheme_Color::get_type(),
285
  'value' => Scheme_Color::COLOR_3,
286
- ],
287
- ]
288
  );
289
 
290
  $this->add_control(
291
  'mark_required_color',
292
- [
293
  'label' => __( 'Mark Color', 'themeisle-companion' ),
294
  'type' => Controls_Manager::COLOR,
295
  'default' => '',
296
- 'selectors' => [
297
  '{{WRAPPER}} .required-mark' => 'color: {{COLOR}};',
298
- ],
299
- ]
300
  );
301
 
302
  $this->add_group_control(
303
  Group_Control_Typography::get_type(),
304
- [
305
  'name' => 'label_typography',
306
  'selector' => '{{WRAPPER}} fieldset > label',
307
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
308
- ]
309
  );
310
  $this->end_controls_section();
311
 
312
  $this->start_controls_section(
313
  'section_field_style',
314
- [
315
  'label' => __( 'Field', 'themeisle-companion' ),
316
  'tab' => Controls_Manager::TAB_STYLE,
317
- ]
318
  );
319
 
320
  $this->add_group_control(
321
  Group_Control_Typography::get_type(),
322
- [
323
  'name' => 'field_typography',
324
  'selector' => '{{WRAPPER}} fieldset > input, {{WRAPPER}} fieldset select, {{WRAPPER}} fieldset > textarea, {{WRAPPER}} fieldset > button',
325
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
326
- ]
327
  );
328
 
329
  $this->add_responsive_control(
330
  'align_field_text',
331
- [
332
  'label' => __( 'Text alignment', 'themeisle-companion' ),
333
  'type' => Controls_Manager::CHOOSE,
334
  'toggle' => false,
335
  'default' => 'left',
336
- 'options' => [
337
- 'left' => [
338
  'title' => __( 'Left', 'themeisle-companion' ),
339
  'icon' => 'fa fa-align-left',
340
- ],
341
- 'center' => [
342
  'title' => __( 'Center', 'themeisle-companion' ),
343
  'icon' => 'fa fa-align-center',
344
- ],
345
- 'right' => [
346
  'title' => __( 'Right', 'themeisle-companion' ),
347
  'icon' => 'fa fa-align-right',
348
- ],
349
- ],
350
- 'selectors' => [
351
  '{{WRAPPER}} fieldset > input' => 'text-align: {{VALUE}}',
352
  '{{WRAPPER}} fieldset select' => 'text-align: {{VALUE}}',
353
  '{{WRAPPER}} fieldset > textarea' => 'text-align: {{VALUE}}',
354
- ],
355
- ]
356
  );
357
 
358
  $this->add_responsive_control(
359
  'field-text-padding',
360
- [
361
  'label' => __( 'Text Padding', 'themeisle-companion' ),
362
  'type' => Controls_Manager::DIMENSIONS,
363
- 'size_units' => [ 'px', 'em', '%' ],
364
- 'selectors' => [
365
  '{{WRAPPER}} fieldset > input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
366
  '{{WRAPPER}} fieldset select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
367
  '{{WRAPPER}} fieldset > textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
368
- ],
369
- ]
370
  );
371
 
372
  $this->start_controls_tabs( 'tabs_field_style' );
373
 
374
  $this->start_controls_tab(
375
  'tab_field_normal',
376
- [
377
  'label' => __( 'Normal', 'themeisle-companion' ),
378
- ]
379
  );
380
 
381
  $this->add_control(
382
  'field_text_color',
383
- [
384
  'label' => __( 'Text Color', 'themeisle-companion' ),
385
  'type' => Controls_Manager::COLOR,
386
- 'selectors' => [
387
  '{{WRAPPER}} fieldset > input' => 'color: {{VALUE}};',
388
  '{{WRAPPER}} fieldset > input::placeholder' => 'color: {{VALUE}};',
389
  '{{WRAPPER}} fieldset select' => 'color: {{VALUE}};',
390
  '{{WRAPPER}} fieldset select::placeholder' => 'color: {{VALUE}};',
391
  '{{WRAPPER}} fieldset > textarea' => 'color: {{VALUE}};',
392
  '{{WRAPPER}} fieldset > textarea::placeholder' => 'color: {{VALUE}};',
393
- ],
394
- 'scheme' => [
395
  'type' => Scheme_Color::get_type(),
396
  'value' => Scheme_Color::COLOR_3,
397
- ],
398
- ]
399
  );
400
 
401
  $this->add_control(
402
  'field_background_color',
403
- [
404
  'label' => __( 'Background Color', 'themeisle-companion' ),
405
  'type' => Controls_Manager::COLOR,
406
  'default' => '#ffffff',
407
- 'selectors' => [
408
  '{{WRAPPER}} fieldset > input' => 'background-color: {{VALUE}};',
409
  '{{WRAPPER}} fieldset select' => 'background-color: {{VALUE}};',
410
  '{{WRAPPER}} fieldset > textarea' => 'background-color: {{VALUE}};',
411
- ],
412
  'separator' => 'before',
413
- ]
414
  );
415
 
416
  $this->add_control(
417
  'field_border_color',
418
- [
419
  'label' => __( 'Border Color', 'themeisle-companion' ),
420
  'type' => Controls_Manager::COLOR,
421
- 'selectors' => [
422
  '{{WRAPPER}} fieldset > input' => 'border-color: {{VALUE}};',
423
  '{{WRAPPER}} fieldset select' => 'border-color: {{VALUE}};',
424
  '{{WRAPPER}} fieldset > textarea' => 'border-color: {{VALUE}};',
425
- ],
426
  'separator' => 'before',
427
- ]
428
  );
429
 
430
  $this->add_control(
431
  'field_border_style',
432
- [
433
  'label' => _x( 'Border Type', 'Border Control', 'themeisle-companion' ),
434
  'type' => Controls_Manager::SELECT,
435
- 'options' => [
436
  '' => __( 'None', 'themeisle-companion' ),
437
  'solid' => _x( 'Solid', 'Border Control', 'themeisle-companion' ),
438
  'double' => _x( 'Double', 'Border Control', 'themeisle-companion' ),
439
  'dotted' => _x( 'Dotted', 'Border Control', 'themeisle-companion' ),
440
  'dashed' => _x( 'Dashed', 'Border Control', 'themeisle-companion' ),
441
  'groove' => _x( 'Groove', 'Border Control', 'themeisle-companion' ),
442
- ],
443
- 'selectors' => [
444
  '{{WRAPPER}} fieldset > input' => 'border-style: {{VALUE}};',
445
  '{{WRAPPER}} fieldset select' => 'border-style: {{VALUE}};',
446
  '{{WRAPPER}} fieldset > textarea' => 'border-style: {{VALUE}};',
447
- ],
448
- ]
449
  );
450
 
451
  $this->add_control(
452
  'field_border_width',
453
- [
454
  'label' => __( 'Border Width', 'themeisle-companion' ),
455
  'type' => Controls_Manager::DIMENSIONS,
456
  'placeholder' => '',
457
- 'size_units' => [ 'px' ],
458
- 'selectors' => [
459
  '{{WRAPPER}} fieldset > input' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
460
  '{{WRAPPER}} fieldset select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
461
  '{{WRAPPER}} fieldset > textarea' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
462
- ],
463
- ]
464
  );
465
 
466
  $this->add_control(
467
  'field_border_radius',
468
- [
469
  'label' => __( 'Border Radius', 'themeisle-companion' ),
470
  'type' => Controls_Manager::DIMENSIONS,
471
- 'size_units' => [ 'px', '%' ],
472
- 'selectors' => [
473
  '{{WRAPPER}} fieldset > input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
474
  '{{WRAPPER}} fieldset select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
475
  '{{WRAPPER}} fieldset > textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
476
- ],
477
- ]
478
  );
479
 
480
  $this->end_controls_tab();
481
 
482
  $this->start_controls_tab(
483
  'tab_field_focus',
484
- [
485
  'label' => __( 'Focus', 'themeisle-companion' ),
486
- ]
487
  );
488
 
489
  $this->add_control(
490
  'field_focus_text_color',
491
- [
492
  'label' => __( 'Text Color', 'themeisle-companion' ),
493
  'type' => Controls_Manager::COLOR,
494
- 'selectors' => [
495
  '{{WRAPPER}} fieldset > input:focus' => 'color: {{VALUE}};',
496
  '{{WRAPPER}} fieldset > input::placeholder:focus' => 'color: {{VALUE}};',
497
  '{{WRAPPER}} fieldset select:focus' => 'color: {{VALUE}};',
498
  '{{WRAPPER}} fieldset select::placeholder:focus' => 'color: {{VALUE}};',
499
  '{{WRAPPER}} fieldset > textarea:focus' => 'color: {{VALUE}};',
500
  '{{WRAPPER}} fieldset > textarea::placeholder:focus' => 'color: {{VALUE}};',
501
- ],
502
- 'scheme' => [
503
  'type' => Scheme_Color::get_type(),
504
  'value' => Scheme_Color::COLOR_3,
505
- ],
506
- ]
507
  );
508
 
509
  $this->add_control(
510
  'field_focus_background_color',
511
- [
512
  'label' => __( 'Background Color', 'themeisle-companion' ),
513
  'type' => Controls_Manager::COLOR,
514
  'default' => '#ffffff',
515
- 'selectors' => [
516
  '{{WRAPPER}} fieldset > input:focus' => 'background-color: {{VALUE}};',
517
  '{{WRAPPER}} fieldset select:focus' => 'background-color: {{VALUE}};',
518
  '{{WRAPPER}} fieldset > textarea:focus' => 'background-color: {{VALUE}};',
519
- ],
520
  'separator' => 'before',
521
- ]
522
  );
523
 
524
  $this->add_control(
525
  'field_focus_border_color',
526
- [
527
  'label' => __( 'Border Color', 'themeisle-companion' ),
528
  'type' => Controls_Manager::COLOR,
529
- 'selectors' => [
530
  '{{WRAPPER}} fieldset > input:focus' => 'border-color: {{VALUE}};',
531
  '{{WRAPPER}} fieldset select:focus' => 'border-color: {{VALUE}};',
532
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-color: {{VALUE}};',
533
- ],
534
  'separator' => 'before',
535
- ]
536
  );
537
 
538
  $this->add_control(
539
  'field_focus_border_style',
540
- [
541
  'label' => _x( 'Border Type', 'Border Control', 'themeisle-companion' ),
542
  'type' => Controls_Manager::SELECT,
543
- 'options' => [
544
  '' => __( 'None', 'themeisle-companion' ),
545
  'solid' => _x( 'Solid', 'Border Control', 'themeisle-companion' ),
546
  'double' => _x( 'Double', 'Border Control', 'themeisle-companion' ),
547
  'dotted' => _x( 'Dotted', 'Border Control', 'themeisle-companion' ),
548
  'dashed' => _x( 'Dashed', 'Border Control', 'themeisle-companion' ),
549
  'groove' => _x( 'Groove', 'Border Control', 'themeisle-companion' ),
550
- ],
551
- 'selectors' => [
552
  '{{WRAPPER}} fieldset > input:focus' => 'border-style: {{VALUE}};',
553
  '{{WRAPPER}} fieldset select:focus' => 'border-style: {{VALUE}};',
554
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-style: {{VALUE}};',
555
- ],
556
- ]
557
  );
558
 
559
  $this->add_control(
560
  'field_focus_border_width',
561
- [
562
  'label' => __( 'Border Width', 'themeisle-companion' ),
563
  'type' => Controls_Manager::DIMENSIONS,
564
  'placeholder' => '',
565
- 'size_units' => [ 'px' ],
566
- 'selectors' => [
567
  '{{WRAPPER}} fieldset > input:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
568
  '{{WRAPPER}} fieldset select:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
569
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
570
- ],
571
- ]
572
  );
573
 
574
  $this->add_control(
575
  'field_focus_border_radius',
576
- [
577
  'label' => __( 'Border Radius', 'themeisle-companion' ),
578
  'type' => Controls_Manager::DIMENSIONS,
579
- 'size_units' => [ 'px', '%' ],
580
- 'selectors' => [
581
  '{{WRAPPER}} fieldset > input:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
582
  '{{WRAPPER}} fieldset select:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
583
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
584
- ],
585
- ]
586
  );
587
 
588
  $this->end_controls_tab();
@@ -593,135 +603,135 @@ abstract class Elementor_Widget_Base extends Widget_Base {
593
 
594
  $this->start_controls_section(
595
  'section_button_style',
596
- [
597
  'label' => __( 'Button', 'themeisle-companion' ),
598
  'tab' => Controls_Manager::TAB_STYLE,
599
- ]
600
  );
601
 
602
  $this->start_controls_tabs( 'tabs_button_style' );
603
 
604
  $this->start_controls_tab(
605
  'tab_button_normal',
606
- [
607
  'label' => __( 'Normal', 'themeisle-companion' ),
608
- ]
609
  );
610
 
611
  $this->add_control(
612
  'button_background_color',
613
- [
614
  'label' => __( 'Background Color', 'themeisle-companion' ),
615
  'type' => Controls_Manager::COLOR,
616
- 'scheme' => [
617
  'type' => Scheme_Color::get_type(),
618
  'value' => Scheme_Color::COLOR_4,
619
- ],
620
- 'selectors' => [
621
  '{{WRAPPER}} fieldset > button' => 'background-color: {{VALUE}};',
622
- ],
623
- ]
624
  );
625
 
626
  $this->add_control(
627
  'button_text_color',
628
- [
629
  'label' => __( 'Text Color', 'themeisle-companion' ),
630
  'type' => Controls_Manager::COLOR,
631
  'default' => '',
632
- 'selectors' => [
633
  '{{WRAPPER}} fieldset > button' => 'color: {{VALUE}};',
634
- ],
635
- ]
636
  );
637
 
638
  $this->add_group_control(
639
  Group_Control_Typography::get_type(),
640
- [
641
  'name' => 'button_typography',
642
  'scheme' => Scheme_Typography::TYPOGRAPHY_4,
643
  'selector' => '{{WRAPPER}} fieldset > button',
644
- ]
645
  );
646
 
647
  $this->add_group_control(
648
  Group_Control_Border::get_type(),
649
- [
650
  'name' => 'button_border',
651
  'placeholder' => '1px',
652
  'default' => '1px',
653
  'selector' => '{{WRAPPER}} fieldset > button',
654
  'separator' => 'before',
655
- ]
656
  );
657
 
658
  $this->add_control(
659
  'button_border_radius',
660
- [
661
  'label' => __( 'Border Radius', 'themeisle-companion' ),
662
  'type' => Controls_Manager::DIMENSIONS,
663
- 'size_units' => [ 'px', '%' ],
664
- 'selectors' => [
665
  '{{WRAPPER}} fieldset > button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
666
- ],
667
- ]
668
  );
669
 
670
  $this->add_control(
671
  'button_text_padding',
672
- [
673
  'label' => __( 'Text Padding', 'themeisle-companion' ),
674
  'type' => Controls_Manager::DIMENSIONS,
675
- 'size_units' => [ 'px', 'em', '%' ],
676
- 'selectors' => [
677
  '{{WRAPPER}} fieldset > button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
678
- ],
679
- ]
680
  );
681
 
682
  $this->end_controls_tab();
683
 
684
  $this->start_controls_tab(
685
  'tab_button_hover',
686
- [
687
  'label' => __( 'Hover', 'themeisle-companion' ),
688
- ]
689
  );
690
 
691
  $this->add_control(
692
  'button_background_hover_color',
693
- [
694
  'label' => __( 'Background Color', 'themeisle-companion' ),
695
  'type' => Controls_Manager::COLOR,
696
- 'selectors' => [
697
  '{{WRAPPER}} fieldset > button:hover' => 'background-color: {{VALUE}};',
698
- ],
699
- ]
700
  );
701
 
702
  $this->add_control(
703
  'button_hover_color',
704
- [
705
  'label' => __( 'Text Color', 'themeisle-companion' ),
706
  'type' => Controls_Manager::COLOR,
707
- 'selectors' => [
708
  '{{WRAPPER}} fieldset > button:hover' => 'color: {{VALUE}};',
709
- ],
710
- ]
711
  );
712
 
713
  $this->add_control(
714
  'button_hover_border_color',
715
- [
716
  'label' => __( 'Border Color', 'themeisle-companion' ),
717
  'type' => Controls_Manager::COLOR,
718
- 'selectors' => [
719
  '{{WRAPPER}} fieldset > button:hover' => 'border-color: {{VALUE}};',
720
- ],
721
- 'condition' => [
722
  'button_border_border!' => '',
723
- ],
724
- ]
725
  );
726
 
727
  $this->end_controls_tab();
@@ -732,177 +742,177 @@ abstract class Elementor_Widget_Base extends Widget_Base {
732
 
733
  $this->start_controls_section(
734
  'notification_style',
735
- [
736
  'label' => __( 'Notification', 'themeisle-companion' ),
737
  'tab' => Controls_Manager::TAB_STYLE,
738
- ]
739
  );
740
 
741
  $this->add_responsive_control(
742
  'notification_margin',
743
- [
744
  'label' => __( 'Margin', 'themeisle-companion' ),
745
  'type' => Controls_Manager::DIMENSIONS,
746
- 'size_units' => [ 'px', 'em', '%' ],
747
- 'selectors' => [
748
  '{{WRAPPER}} .content-form-notice' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
749
- ],
750
- ]
751
  );
752
 
753
  $this->add_responsive_control(
754
  'notification_text_padding',
755
- [
756
  'label' => __( 'Padding', 'themeisle-companion' ),
757
  'type' => Controls_Manager::DIMENSIONS,
758
- 'size_units' => [ 'px', 'em', '%' ],
759
- 'selectors' => [
760
  '{{WRAPPER}} .content-form-notice' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
761
- ],
762
- ]
763
  );
764
 
765
  $this->add_responsive_control(
766
  'notification_width',
767
- [
768
  'label' => __( 'Width', 'themeisle-companion' ),
769
  'type' => Controls_Manager::SLIDER,
770
  'unit' => '%',
771
- 'range' => [
772
- '%' => [
773
  'min' => 0,
774
  'max' => 100,
775
- ],
776
- ],
777
- 'default' => [
778
  'unit' => '%',
779
- ],
780
- 'selectors' => [
781
  '{{WRAPPER}} .content-form-notice' => 'width: {{SIZE}}{{UNIT}};',
782
- ],
783
- ]
784
  );
785
 
786
  $this->add_group_control(
787
  Group_Control_Typography::get_type(),
788
- [
789
  'name' => 'notification_typography',
790
  'selector' => '{{WRAPPER}} .content-form-notice',
791
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
792
- ]
793
  );
794
 
795
  $this->add_group_control(
796
  Group_Control_Box_Shadow::get_type(),
797
- [
798
  'name' => 'notification_box_shadow',
799
  'label' => __( 'Box Shadow', 'themeisle-companion' ),
800
  'selector' => '{{WRAPPER}} .content-form-notice',
801
- ]
802
  );
803
 
804
  $this->add_responsive_control(
805
  'notification_alignment',
806
- [
807
  'label' => __( 'Alignment', 'themeisle-companion' ),
808
  'type' => Controls_Manager::CHOOSE,
809
  'toggle' => false,
810
  'default' => 'left',
811
- 'options' => [
812
- 'left' => [
813
  'title' => __( 'Left', 'themeisle-companion' ),
814
  'icon' => 'fa fa-align-left',
815
- ],
816
- 'center' => [
817
  'title' => __( 'Center', 'themeisle-companion' ),
818
  'icon' => 'fa fa-align-center',
819
- ],
820
- 'right' => [
821
  'title' => __( 'Right', 'themeisle-companion' ),
822
  'icon' => 'fa fa-align-right',
823
- ],
824
- ],
825
- ]
826
  );
827
 
828
  $this->start_controls_tabs( 'tabs_notification_style' );
829
 
830
  $this->start_controls_tab(
831
  'tab_notification_success',
832
- [
833
  'label' => __( 'Success', 'themeisle-companion' ),
834
- ]
835
  );
836
 
837
  $this->add_control(
838
  'notification_background_color_success',
839
- [
840
  'label' => __( 'Background Color', 'themeisle-companion' ),
841
  'type' => Controls_Manager::COLOR,
842
- 'selectors' => [
843
  '{{WRAPPER}} .content-form-notice.content-form-success' => 'background-color: {{VALUE}};',
844
- ],
845
- ]
846
  );
847
 
848
  $this->add_control(
849
  'notification_text_color_success',
850
- [
851
  'label' => __( 'Text Color', 'themeisle-companion' ),
852
  'type' => Controls_Manager::COLOR,
853
- 'selectors' => [
854
  '{{WRAPPER}} .content-form-notice.content-form-success' => 'color: {{VALUE}};',
855
- ],
856
- ]
857
  );
858
 
859
  $this->add_group_control(
860
  Group_Control_Border::get_type(),
861
- [
862
  'name' => 'notification_border_success',
863
  'label' => __( 'Border', 'themeisle-companion' ),
864
  'selector' => '{{WRAPPER}} .content-form-notice.content-form-success',
865
- ]
866
  );
867
 
868
  $this->end_controls_tab();
869
 
870
  $this->start_controls_tab(
871
  'tab_notification_error',
872
- [
873
  'label' => __( 'Error', 'themeisle-companion' ),
874
- ]
875
  );
876
 
877
  $this->add_control(
878
  'notification_background_color_error',
879
- [
880
  'label' => __( 'Background Color', 'themeisle-companion' ),
881
  'type' => Controls_Manager::COLOR,
882
- 'selectors' => [
883
  '{{WRAPPER}} .content-form-notice.content-form-error' => 'background-color: {{VALUE}};',
884
- ],
885
- ]
886
  );
887
 
888
  $this->add_control(
889
  'notification_text_color_error',
890
- [
891
  'label' => __( 'Text Color', 'themeisle-companion' ),
892
  'type' => Controls_Manager::COLOR,
893
- 'selectors' => [
894
  '{{WRAPPER}} .content-form-notice.content-form-error' => 'color: {{VALUE}};',
895
- ],
896
- ]
897
  );
898
 
899
  $this->add_group_control(
900
  Group_Control_Border::get_type(),
901
- [
902
  'name' => 'notification_border_error',
903
  'label' => __( 'Border', 'themeisle-companion' ),
904
  'selector' => '{{WRAPPER}} .content-form-notice.content-form-error',
905
- ]
906
  );
907
 
908
  $this->end_controls_tab();
@@ -934,13 +944,15 @@ abstract class Elementor_Widget_Base extends Widget_Base {
934
  echo '<fieldset class="submit-form ' . esc_attr( $this->get_widget_type() ) . '">';
935
  echo '<button type="submit" name="submit" ' . $disabled . ' value="submit-' . esc_attr( $this->get_widget_type() ) . '-' . esc_attr( $form_id ) . '" class="' . $this->get_render_attribute_string( 'button' ) . '">';
936
  echo esc_html( $btn_label );
937
- if ( ! empty( $settings['button_icon'] ) ) {
 
938
  echo '<span ' . $this->get_render_attribute_string( 'content-wrapper' ) . '>';
939
  echo '<span ' . $this->get_render_attribute_string( 'icon-align' ) . '>';
940
- echo '<i class="' . esc_attr( $settings['button_icon'] ) . '"></i>';
941
  echo '</span>';
942
  echo '</span>';
943
  }
 
944
  echo '</button>';
945
  echo '</fieldset>';
946
  $this->render_form_footer();
@@ -1030,16 +1042,13 @@ abstract class Elementor_Widget_Base extends Widget_Base {
1030
  protected function maybe_load_widget_style() {
1031
  if ( Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) {
1032
  echo '<style>';
1033
- echo file_get_contents( plugin_dir_path( TI_CONTENT_FORMS_FILE ) . '/assets/content-forms.css' );
1034
  echo $this->get_notice_style();
1035
  echo '</style>';
1036
  } else {
1037
  // if `themeisle_content_forms_register_default_style` is false, the style won't be registered anyway
1038
  $style = $this->get_notice_style();
1039
-
1040
  wp_localize_script( 'content-forms', 'formStyle', array( 'formStyle' => $style ) );
1041
  wp_enqueue_script( 'content-forms' );
1042
- wp_enqueue_style( 'content-forms' );
1043
  }
1044
  }
1045
 
@@ -1125,15 +1134,15 @@ abstract class Elementor_Widget_Base extends Widget_Base {
1125
  $this->add_render_attribute( 'fieldset' . $field['_id'], 'class', 'content-form-field-' . $field['type'] );
1126
  $this->add_render_attribute( 'fieldset' . $field['_id'], 'class', 'elementor-column elementor-col-' . $field['field_width'] );
1127
  $this->add_render_attribute(
1128
- [
1129
- 'icon-align' => [
1130
- 'class' => [
1131
  empty( $instance['button_icon_align'] ) ? '' :
1132
  'elementor-align-icon-' . $instance['button_icon_align'],
1133
  'elementor-button-icon',
1134
- ],
1135
- ],
1136
- ]
1137
  );
1138
 
1139
  echo '<fieldset ' . $this->get_render_attribute_string( 'fieldset' . $field_id ) . '>';
11
  use Elementor\Group_Control_Border;
12
  use Elementor\Group_Control_Box_Shadow;
13
  use Elementor\Group_Control_Typography;
14
+ use Elementor\Icons_Manager;
15
  use Elementor\Plugin;
16
  use Elementor\Repeater;
17
  use Elementor\Scheme_Color;
30
  * @return array
31
  */
32
  public function get_categories() {
33
+ return array( 'obfx-elementor-widgets' );
34
  }
35
 
36
  /**
42
  return 'eicon-text-align-left';
43
  }
44
 
45
+ /**
46
+ * Retrieve the list of styles the content forms widgets depended on.
47
+ *
48
+ * @return array Widget scripts dependencies.
49
+ */
50
+ public function get_style_depends() {
51
+ return array( 'content-forms' );
52
+ }
53
+
54
  /**
55
  * Register the controls for each Elementor Widget.
56
  */
111
 
112
  $repeater->add_responsive_control(
113
  'field_width',
114
+ array(
115
  'label' => __( 'Field Width', 'themeisle-companion' ),
116
  'type' => Controls_Manager::SELECT,
117
+ 'options' => array(
118
  '100' => '100%',
119
  '75' => '75%',
120
  '66' => '66%',
121
  '50' => '50%',
122
  '33' => '33%',
123
  '25' => '25%',
124
+ ),
125
  'default' => '100',
126
+ )
127
  );
128
 
129
  $repeater->add_control(
200
  protected function register_style_controls() {
201
  $this->start_controls_section(
202
  'section_form_style',
203
+ array(
204
  'label' => __( 'Form', 'themeisle-companion' ),
205
  'tab' => Controls_Manager::TAB_STYLE,
206
+ )
207
  );
208
 
209
  $this->add_control(
210
  'column_gap',
211
+ array(
212
  'label' => __( 'Columns Gap', 'themeisle-companion' ),
213
  'type' => Controls_Manager::SLIDER,
214
+ 'default' => array(
215
  'size' => 10,
216
+ ),
217
+ 'range' => array(
218
+ 'px' => array(
219
  'min' => 0,
220
  'max' => 60,
221
+ ),
222
+ ),
223
+ 'selectors' => array(
224
  '{{WRAPPER}} .elementor-column' => 'padding-right: calc( {{SIZE}}{{UNIT}}/2 ); padding-left: calc( {{SIZE}}{{UNIT}}/2 );',
225
  '{{WRAPPER}} .content-form .submit-form' => 'padding-right: calc( {{SIZE}}{{UNIT}}/2 ); padding-left: calc( {{SIZE}}{{UNIT}}/2 );',
226
+ ),
227
+ )
228
  );
229
 
230
  $this->add_control(
231
  'row_gap',
232
+ array(
233
  'label' => __( 'Rows Gap', 'themeisle-companion' ),
234
  'type' => Controls_Manager::SLIDER,
235
+ 'default' => array(
236
  'size' => 10,
237
+ ),
238
+ 'range' => array(
239
+ 'px' => array(
240
  'min' => 0,
241
  'max' => 60,
242
+ ),
243
+ ),
244
+ 'selectors' => array(
245
  '{{WRAPPER}} .elementor-column' => 'margin-bottom: {{SIZE}}{{UNIT}};',
246
  '{{WRAPPER}} .content-form .submit-form' => 'margin-bottom: {{SIZE}}{{UNIT}};',
247
+ ),
248
+ )
249
  );
250
 
251
  $this->add_control(
252
  'heading_label',
253
+ array(
254
  'label' => __( 'Label', 'themeisle-companion' ),
255
  'type' => Controls_Manager::HEADING,
256
  'separator' => 'before',
257
+ )
258
  );
259
 
260
  $this->add_control(
261
  'label_spacing',
262
+ array(
263
  'label' => __( 'Spacing', 'themeisle-companion' ),
264
  'type' => Controls_Manager::SLIDER,
265
+ 'default' => array(
266
  'size' => 0,
267
+ ),
268
+ 'range' => array(
269
+ 'px' => array(
270
  'min' => 0,
271
  'max' => 60,
272
+ ),
273
+ ),
274
+ 'selectors' => array(
275
  'body.rtl {{WRAPPER}} fieldset > label' => 'padding-left: {{SIZE}}{{UNIT}};',
276
  // for the label position = inline option
277
  'body:not(.rtl) {{WRAPPER}} fieldset > label' => 'padding-right: {{SIZE}}{{UNIT}};',
278
  // for the label position = inline option
279
  'body {{WRAPPER}} fieldset > label' => 'padding-bottom: {{SIZE}}{{UNIT}};',
280
  // for the label position = above option
281
+ ),
282
+ )
283
  );
284
 
285
  $this->add_control(
286
  'label_color',
287
+ array(
288
  'label' => __( 'Text Color', 'themeisle-companion' ),
289
  'type' => Controls_Manager::COLOR,
290
+ 'selectors' => array(
291
  '{{WRAPPER}} fieldset > label, {{WRAPPER}} .elementor-field-subgroup label' => 'color: {{VALUE}};',
292
+ ),
293
+ 'scheme' => array(
294
  'type' => Scheme_Color::get_type(),
295
  'value' => Scheme_Color::COLOR_3,
296
+ ),
297
+ )
298
  );
299
 
300
  $this->add_control(
301
  'mark_required_color',
302
+ array(
303
  'label' => __( 'Mark Color', 'themeisle-companion' ),
304
  'type' => Controls_Manager::COLOR,
305
  'default' => '',
306
+ 'selectors' => array(
307
  '{{WRAPPER}} .required-mark' => 'color: {{COLOR}};',
308
+ ),
309
+ )
310
  );
311
 
312
  $this->add_group_control(
313
  Group_Control_Typography::get_type(),
314
+ array(
315
  'name' => 'label_typography',
316
  'selector' => '{{WRAPPER}} fieldset > label',
317
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
318
+ )
319
  );
320
  $this->end_controls_section();
321
 
322
  $this->start_controls_section(
323
  'section_field_style',
324
+ array(
325
  'label' => __( 'Field', 'themeisle-companion' ),
326
  'tab' => Controls_Manager::TAB_STYLE,
327
+ )
328
  );
329
 
330
  $this->add_group_control(
331
  Group_Control_Typography::get_type(),
332
+ array(
333
  'name' => 'field_typography',
334
  'selector' => '{{WRAPPER}} fieldset > input, {{WRAPPER}} fieldset select, {{WRAPPER}} fieldset > textarea, {{WRAPPER}} fieldset > button',
335
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
336
+ )
337
  );
338
 
339
  $this->add_responsive_control(
340
  'align_field_text',
341
+ array(
342
  'label' => __( 'Text alignment', 'themeisle-companion' ),
343
  'type' => Controls_Manager::CHOOSE,
344
  'toggle' => false,
345
  'default' => 'left',
346
+ 'options' => array(
347
+ 'left' => array(
348
  'title' => __( 'Left', 'themeisle-companion' ),
349
  'icon' => 'fa fa-align-left',
350
+ ),
351
+ 'center' => array(
352
  'title' => __( 'Center', 'themeisle-companion' ),
353
  'icon' => 'fa fa-align-center',
354
+ ),
355
+ 'right' => array(
356
  'title' => __( 'Right', 'themeisle-companion' ),
357
  'icon' => 'fa fa-align-right',
358
+ ),
359
+ ),
360
+ 'selectors' => array(
361
  '{{WRAPPER}} fieldset > input' => 'text-align: {{VALUE}}',
362
  '{{WRAPPER}} fieldset select' => 'text-align: {{VALUE}}',
363
  '{{WRAPPER}} fieldset > textarea' => 'text-align: {{VALUE}}',
364
+ ),
365
+ )
366
  );
367
 
368
  $this->add_responsive_control(
369
  'field-text-padding',
370
+ array(
371
  'label' => __( 'Text Padding', 'themeisle-companion' ),
372
  'type' => Controls_Manager::DIMENSIONS,
373
+ 'size_units' => array( 'px', 'em', '%' ),
374
+ 'selectors' => array(
375
  '{{WRAPPER}} fieldset > input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
376
  '{{WRAPPER}} fieldset select' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
377
  '{{WRAPPER}} fieldset > textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
378
+ ),
379
+ )
380
  );
381
 
382
  $this->start_controls_tabs( 'tabs_field_style' );
383
 
384
  $this->start_controls_tab(
385
  'tab_field_normal',
386
+ array(
387
  'label' => __( 'Normal', 'themeisle-companion' ),
388
+ )
389
  );
390
 
391
  $this->add_control(
392
  'field_text_color',
393
+ array(
394
  'label' => __( 'Text Color', 'themeisle-companion' ),
395
  'type' => Controls_Manager::COLOR,
396
+ 'selectors' => array(
397
  '{{WRAPPER}} fieldset > input' => 'color: {{VALUE}};',
398
  '{{WRAPPER}} fieldset > input::placeholder' => 'color: {{VALUE}};',
399
  '{{WRAPPER}} fieldset select' => 'color: {{VALUE}};',
400
  '{{WRAPPER}} fieldset select::placeholder' => 'color: {{VALUE}};',
401
  '{{WRAPPER}} fieldset > textarea' => 'color: {{VALUE}};',
402
  '{{WRAPPER}} fieldset > textarea::placeholder' => 'color: {{VALUE}};',
403
+ ),
404
+ 'scheme' => array(
405
  'type' => Scheme_Color::get_type(),
406
  'value' => Scheme_Color::COLOR_3,
407
+ ),
408
+ )
409
  );
410
 
411
  $this->add_control(
412
  'field_background_color',
413
+ array(
414
  'label' => __( 'Background Color', 'themeisle-companion' ),
415
  'type' => Controls_Manager::COLOR,
416
  'default' => '#ffffff',
417
+ 'selectors' => array(
418
  '{{WRAPPER}} fieldset > input' => 'background-color: {{VALUE}};',
419
  '{{WRAPPER}} fieldset select' => 'background-color: {{VALUE}};',
420
  '{{WRAPPER}} fieldset > textarea' => 'background-color: {{VALUE}};',
421
+ ),
422
  'separator' => 'before',
423
+ )
424
  );
425
 
426
  $this->add_control(
427
  'field_border_color',
428
+ array(
429
  'label' => __( 'Border Color', 'themeisle-companion' ),
430
  'type' => Controls_Manager::COLOR,
431
+ 'selectors' => array(
432
  '{{WRAPPER}} fieldset > input' => 'border-color: {{VALUE}};',
433
  '{{WRAPPER}} fieldset select' => 'border-color: {{VALUE}};',
434
  '{{WRAPPER}} fieldset > textarea' => 'border-color: {{VALUE}};',
435
+ ),
436
  'separator' => 'before',
437
+ )
438
  );
439
 
440
  $this->add_control(
441
  'field_border_style',
442
+ array(
443
  'label' => _x( 'Border Type', 'Border Control', 'themeisle-companion' ),
444
  'type' => Controls_Manager::SELECT,
445
+ 'options' => array(
446
  '' => __( 'None', 'themeisle-companion' ),
447
  'solid' => _x( 'Solid', 'Border Control', 'themeisle-companion' ),
448
  'double' => _x( 'Double', 'Border Control', 'themeisle-companion' ),
449
  'dotted' => _x( 'Dotted', 'Border Control', 'themeisle-companion' ),
450
  'dashed' => _x( 'Dashed', 'Border Control', 'themeisle-companion' ),
451
  'groove' => _x( 'Groove', 'Border Control', 'themeisle-companion' ),
452
+ ),
453
+ 'selectors' => array(
454
  '{{WRAPPER}} fieldset > input' => 'border-style: {{VALUE}};',
455
  '{{WRAPPER}} fieldset select' => 'border-style: {{VALUE}};',
456
  '{{WRAPPER}} fieldset > textarea' => 'border-style: {{VALUE}};',
457
+ ),
458
+ )
459
  );
460
 
461
  $this->add_control(
462
  'field_border_width',
463
+ array(
464
  'label' => __( 'Border Width', 'themeisle-companion' ),
465
  'type' => Controls_Manager::DIMENSIONS,
466
  'placeholder' => '',
467
+ 'size_units' => array( 'px' ),
468
+ 'selectors' => array(
469
  '{{WRAPPER}} fieldset > input' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
470
  '{{WRAPPER}} fieldset select' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
471
  '{{WRAPPER}} fieldset > textarea' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
472
+ ),
473
+ )
474
  );
475
 
476
  $this->add_control(
477
  'field_border_radius',
478
+ array(
479
  'label' => __( 'Border Radius', 'themeisle-companion' ),
480
  'type' => Controls_Manager::DIMENSIONS,
481
+ 'size_units' => array( 'px', '%' ),
482
+ 'selectors' => array(
483
  '{{WRAPPER}} fieldset > input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
484
  '{{WRAPPER}} fieldset select' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
485
  '{{WRAPPER}} fieldset > textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
486
+ ),
487
+ )
488
  );
489
 
490
  $this->end_controls_tab();
491
 
492
  $this->start_controls_tab(
493
  'tab_field_focus',
494
+ array(
495
  'label' => __( 'Focus', 'themeisle-companion' ),
496
+ )
497
  );
498
 
499
  $this->add_control(
500
  'field_focus_text_color',
501
+ array(
502
  'label' => __( 'Text Color', 'themeisle-companion' ),
503
  'type' => Controls_Manager::COLOR,
504
+ 'selectors' => array(
505
  '{{WRAPPER}} fieldset > input:focus' => 'color: {{VALUE}};',
506
  '{{WRAPPER}} fieldset > input::placeholder:focus' => 'color: {{VALUE}};',
507
  '{{WRAPPER}} fieldset select:focus' => 'color: {{VALUE}};',
508
  '{{WRAPPER}} fieldset select::placeholder:focus' => 'color: {{VALUE}};',
509
  '{{WRAPPER}} fieldset > textarea:focus' => 'color: {{VALUE}};',
510
  '{{WRAPPER}} fieldset > textarea::placeholder:focus' => 'color: {{VALUE}};',
511
+ ),
512
+ 'scheme' => array(
513
  'type' => Scheme_Color::get_type(),
514
  'value' => Scheme_Color::COLOR_3,
515
+ ),
516
+ )
517
  );
518
 
519
  $this->add_control(
520
  'field_focus_background_color',
521
+ array(
522
  'label' => __( 'Background Color', 'themeisle-companion' ),
523
  'type' => Controls_Manager::COLOR,
524
  'default' => '#ffffff',
525
+ 'selectors' => array(
526
  '{{WRAPPER}} fieldset > input:focus' => 'background-color: {{VALUE}};',
527
  '{{WRAPPER}} fieldset select:focus' => 'background-color: {{VALUE}};',
528
  '{{WRAPPER}} fieldset > textarea:focus' => 'background-color: {{VALUE}};',
529
+ ),
530
  'separator' => 'before',
531
+ )
532
  );
533
 
534
  $this->add_control(
535
  'field_focus_border_color',
536
+ array(
537
  'label' => __( 'Border Color', 'themeisle-companion' ),
538
  'type' => Controls_Manager::COLOR,
539
+ 'selectors' => array(
540
  '{{WRAPPER}} fieldset > input:focus' => 'border-color: {{VALUE}};',
541
  '{{WRAPPER}} fieldset select:focus' => 'border-color: {{VALUE}};',
542
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-color: {{VALUE}};',
543
+ ),
544
  'separator' => 'before',
545
+ )
546
  );
547
 
548
  $this->add_control(
549
  'field_focus_border_style',
550
+ array(
551
  'label' => _x( 'Border Type', 'Border Control', 'themeisle-companion' ),
552
  'type' => Controls_Manager::SELECT,
553
+ 'options' => array(
554
  '' => __( 'None', 'themeisle-companion' ),
555
  'solid' => _x( 'Solid', 'Border Control', 'themeisle-companion' ),
556
  'double' => _x( 'Double', 'Border Control', 'themeisle-companion' ),
557
  'dotted' => _x( 'Dotted', 'Border Control', 'themeisle-companion' ),
558
  'dashed' => _x( 'Dashed', 'Border Control', 'themeisle-companion' ),
559
  'groove' => _x( 'Groove', 'Border Control', 'themeisle-companion' ),
560
+ ),
561
+ 'selectors' => array(
562
  '{{WRAPPER}} fieldset > input:focus' => 'border-style: {{VALUE}};',
563
  '{{WRAPPER}} fieldset select:focus' => 'border-style: {{VALUE}};',
564
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-style: {{VALUE}};',
565
+ ),
566
+ )
567
  );
568
 
569
  $this->add_control(
570
  'field_focus_border_width',
571
+ array(
572
  'label' => __( 'Border Width', 'themeisle-companion' ),
573
  'type' => Controls_Manager::DIMENSIONS,
574
  'placeholder' => '',
575
+ 'size_units' => array( 'px' ),
576
+ 'selectors' => array(
577
  '{{WRAPPER}} fieldset > input:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
578
  '{{WRAPPER}} fieldset select:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
579
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-width: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
580
+ ),
581
+ )
582
  );
583
 
584
  $this->add_control(
585
  'field_focus_border_radius',
586
+ array(
587
  'label' => __( 'Border Radius', 'themeisle-companion' ),
588
  'type' => Controls_Manager::DIMENSIONS,
589
+ 'size_units' => array( 'px', '%' ),
590
+ 'selectors' => array(
591
  '{{WRAPPER}} fieldset > input:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
592
  '{{WRAPPER}} fieldset select:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
593
  '{{WRAPPER}} fieldset > textarea:focus' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
594
+ ),
595
+ )
596
  );
597
 
598
  $this->end_controls_tab();
603
 
604
  $this->start_controls_section(
605
  'section_button_style',
606
+ array(
607
  'label' => __( 'Button', 'themeisle-companion' ),
608
  'tab' => Controls_Manager::TAB_STYLE,
609
+ )
610
  );
611
 
612
  $this->start_controls_tabs( 'tabs_button_style' );
613
 
614
  $this->start_controls_tab(
615
  'tab_button_normal',
616
+ array(
617
  'label' => __( 'Normal', 'themeisle-companion' ),
618
+ )
619
  );
620
 
621
  $this->add_control(
622
  'button_background_color',
623
+ array(
624
  'label' => __( 'Background Color', 'themeisle-companion' ),
625
  'type' => Controls_Manager::COLOR,
626
+ 'scheme' => array(
627
  'type' => Scheme_Color::get_type(),
628
  'value' => Scheme_Color::COLOR_4,
629
+ ),
630
+ 'selectors' => array(
631
  '{{WRAPPER}} fieldset > button' => 'background-color: {{VALUE}};',
632
+ ),
633
+ )
634
  );
635
 
636
  $this->add_control(
637
  'button_text_color',
638
+ array(
639
  'label' => __( 'Text Color', 'themeisle-companion' ),
640
  'type' => Controls_Manager::COLOR,
641
  'default' => '',
642
+ 'selectors' => array(
643
  '{{WRAPPER}} fieldset > button' => 'color: {{VALUE}};',
644
+ ),
645
+ )
646
  );
647
 
648
  $this->add_group_control(
649
  Group_Control_Typography::get_type(),
650
+ array(
651
  'name' => 'button_typography',
652
  'scheme' => Scheme_Typography::TYPOGRAPHY_4,
653
  'selector' => '{{WRAPPER}} fieldset > button',
654
+ )
655
  );
656
 
657
  $this->add_group_control(
658
  Group_Control_Border::get_type(),
659
+ array(
660
  'name' => 'button_border',
661
  'placeholder' => '1px',
662
  'default' => '1px',
663
  'selector' => '{{WRAPPER}} fieldset > button',
664
  'separator' => 'before',
665
+ )
666
  );
667
 
668
  $this->add_control(
669
  'button_border_radius',
670
+ array(
671
  'label' => __( 'Border Radius', 'themeisle-companion' ),
672
  'type' => Controls_Manager::DIMENSIONS,
673
+ 'size_units' => array( 'px', '%' ),
674
+ 'selectors' => array(
675
  '{{WRAPPER}} fieldset > button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
676
+ ),
677
+ )
678
  );
679
 
680
  $this->add_control(
681
  'button_text_padding',
682
+ array(
683
  'label' => __( 'Text Padding', 'themeisle-companion' ),
684
  'type' => Controls_Manager::DIMENSIONS,
685
+ 'size_units' => array( 'px', 'em', '%' ),
686
+ 'selectors' => array(
687
  '{{WRAPPER}} fieldset > button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
688
+ ),
689
+ )
690
  );
691
 
692
  $this->end_controls_tab();
693
 
694
  $this->start_controls_tab(
695
  'tab_button_hover',
696
+ array(
697
  'label' => __( 'Hover', 'themeisle-companion' ),
698
+ )
699
  );
700
 
701
  $this->add_control(
702
  'button_background_hover_color',
703
+ array(
704
  'label' => __( 'Background Color', 'themeisle-companion' ),
705
  'type' => Controls_Manager::COLOR,
706
+ 'selectors' => array(
707
  '{{WRAPPER}} fieldset > button:hover' => 'background-color: {{VALUE}};',
708
+ ),
709
+ )
710
  );
711
 
712
  $this->add_control(
713
  'button_hover_color',
714
+ array(
715
  'label' => __( 'Text Color', 'themeisle-companion' ),
716
  'type' => Controls_Manager::COLOR,
717
+ 'selectors' => array(
718
  '{{WRAPPER}} fieldset > button:hover' => 'color: {{VALUE}};',
719
+ ),
720
+ )
721
  );
722
 
723
  $this->add_control(
724
  'button_hover_border_color',
725
+ array(
726
  'label' => __( 'Border Color', 'themeisle-companion' ),
727
  'type' => Controls_Manager::COLOR,
728
+ 'selectors' => array(
729
  '{{WRAPPER}} fieldset > button:hover' => 'border-color: {{VALUE}};',
730
+ ),
731
+ 'condition' => array(
732
  'button_border_border!' => '',
733
+ ),
734
+ )
735
  );
736
 
737
  $this->end_controls_tab();
742
 
743
  $this->start_controls_section(
744
  'notification_style',
745
+ array(
746
  'label' => __( 'Notification', 'themeisle-companion' ),
747
  'tab' => Controls_Manager::TAB_STYLE,
748
+ )
749
  );
750
 
751
  $this->add_responsive_control(
752
  'notification_margin',
753
+ array(
754
  'label' => __( 'Margin', 'themeisle-companion' ),
755
  'type' => Controls_Manager::DIMENSIONS,
756
+ 'size_units' => array( 'px', 'em', '%' ),
757
+ 'selectors' => array(
758
  '{{WRAPPER}} .content-form-notice' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
759
+ ),
760
+ )
761
  );
762
 
763
  $this->add_responsive_control(
764
  'notification_text_padding',
765
+ array(
766
  'label' => __( 'Padding', 'themeisle-companion' ),
767
  'type' => Controls_Manager::DIMENSIONS,
768
+ 'size_units' => array( 'px', 'em', '%' ),
769
+ 'selectors' => array(
770
  '{{WRAPPER}} .content-form-notice' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
771
+ ),
772
+ )
773
  );
774
 
775
  $this->add_responsive_control(
776
  'notification_width',
777
+ array(
778
  'label' => __( 'Width', 'themeisle-companion' ),
779
  'type' => Controls_Manager::SLIDER,
780
  'unit' => '%',
781
+ 'range' => array(
782
+ '%' => array(
783
  'min' => 0,
784
  'max' => 100,
785
+ ),
786
+ ),
787
+ 'default' => array(
788
  'unit' => '%',
789
+ ),
790
+ 'selectors' => array(
791
  '{{WRAPPER}} .content-form-notice' => 'width: {{SIZE}}{{UNIT}};',
792
+ ),
793
+ )
794
  );
795
 
796
  $this->add_group_control(
797
  Group_Control_Typography::get_type(),
798
+ array(
799
  'name' => 'notification_typography',
800
  'selector' => '{{WRAPPER}} .content-form-notice',
801
  'scheme' => Scheme_Typography::TYPOGRAPHY_3,
802
+ )
803
  );
804
 
805
  $this->add_group_control(
806
  Group_Control_Box_Shadow::get_type(),
807
+ array(
808
  'name' => 'notification_box_shadow',
809
  'label' => __( 'Box Shadow', 'themeisle-companion' ),
810
  'selector' => '{{WRAPPER}} .content-form-notice',
811
+ )
812
  );
813
 
814
  $this->add_responsive_control(
815
  'notification_alignment',
816
+ array(
817
  'label' => __( 'Alignment', 'themeisle-companion' ),
818
  'type' => Controls_Manager::CHOOSE,
819
  'toggle' => false,
820
  'default' => 'left',
821
+ 'options' => array(
822
+ 'left' => array(
823
  'title' => __( 'Left', 'themeisle-companion' ),
824
  'icon' => 'fa fa-align-left',
825
+ ),
826
+ 'center' => array(
827
  'title' => __( 'Center', 'themeisle-companion' ),
828
  'icon' => 'fa fa-align-center',
829
+ ),
830
+ 'right' => array(
831
  'title' => __( 'Right', 'themeisle-companion' ),
832
  'icon' => 'fa fa-align-right',
833
+ ),
834
+ ),
835
+ )
836
  );
837
 
838
  $this->start_controls_tabs( 'tabs_notification_style' );
839
 
840
  $this->start_controls_tab(
841
  'tab_notification_success',
842
+ array(
843
  'label' => __( 'Success', 'themeisle-companion' ),
844
+ )
845
  );
846
 
847
  $this->add_control(
848
  'notification_background_color_success',
849
+ array(
850
  'label' => __( 'Background Color', 'themeisle-companion' ),
851
  'type' => Controls_Manager::COLOR,
852
+ 'selectors' => array(
853
  '{{WRAPPER}} .content-form-notice.content-form-success' => 'background-color: {{VALUE}};',
854
+ ),
855
+ )
856
  );
857
 
858
  $this->add_control(
859
  'notification_text_color_success',
860
+ array(
861
  'label' => __( 'Text Color', 'themeisle-companion' ),
862
  'type' => Controls_Manager::COLOR,
863
+ 'selectors' => array(
864
  '{{WRAPPER}} .content-form-notice.content-form-success' => 'color: {{VALUE}};',
865
+ ),
866
+ )
867
  );
868
 
869
  $this->add_group_control(
870
  Group_Control_Border::get_type(),
871
+ array(
872
  'name' => 'notification_border_success',
873
  'label' => __( 'Border', 'themeisle-companion' ),
874
  'selector' => '{{WRAPPER}} .content-form-notice.content-form-success',
875
+ )
876
  );
877
 
878
  $this->end_controls_tab();
879
 
880
  $this->start_controls_tab(
881
  'tab_notification_error',
882
+ array(
883
  'label' => __( 'Error', 'themeisle-companion' ),
884
+ )
885
  );
886
 
887
  $this->add_control(
888
  'notification_background_color_error',
889
+ array(
890
  'label' => __( 'Background Color', 'themeisle-companion' ),
891
  'type' => Controls_Manager::COLOR,
892
+ 'selectors' => array(
893
  '{{WRAPPER}} .content-form-notice.content-form-error' => 'background-color: {{VALUE}};',
894
+ ),
895
+ )
896
  );
897
 
898
  $this->add_control(
899
  'notification_text_color_error',
900
+ array(
901
  'label' => __( 'Text Color', 'themeisle-companion' ),
902
  'type' => Controls_Manager::COLOR,
903
+ 'selectors' => array(
904
  '{{WRAPPER}} .content-form-notice.content-form-error' => 'color: {{VALUE}};',
905
+ ),
906
+ )
907
  );
908
 
909
  $this->add_group_control(
910
  Group_Control_Border::get_type(),
911
+ array(
912
  'name' => 'notification_border_error',
913
  'label' => __( 'Border', 'themeisle-companion' ),
914
  'selector' => '{{WRAPPER}} .content-form-notice.content-form-error',
915
+ )
916
  );
917
 
918
  $this->end_controls_tab();
944
  echo '<fieldset class="submit-form ' . esc_attr( $this->get_widget_type() ) . '">';
945
  echo '<button type="submit" name="submit" ' . $disabled . ' value="submit-' . esc_attr( $this->get_widget_type() ) . '-' . esc_attr( $form_id ) . '" class="' . $this->get_render_attribute_string( 'button' ) . '">';
946
  echo esc_html( $btn_label );
947
+
948
+ if ( isset( $settings['button_icon_new'] ) ) {
949
  echo '<span ' . $this->get_render_attribute_string( 'content-wrapper' ) . '>';
950
  echo '<span ' . $this->get_render_attribute_string( 'icon-align' ) . '>';
951
+ Icons_Manager::render_icon( $settings['button_icon_new'], array( 'aria-hidden' => 'true' ) );
952
  echo '</span>';
953
  echo '</span>';
954
  }
955
+
956
  echo '</button>';
957
  echo '</fieldset>';
958
  $this->render_form_footer();
1042
  protected function maybe_load_widget_style() {
1043
  if ( Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) {
1044
  echo '<style>';
 
1045
  echo $this->get_notice_style();
1046
  echo '</style>';
1047
  } else {
1048
  // if `themeisle_content_forms_register_default_style` is false, the style won't be registered anyway
1049
  $style = $this->get_notice_style();
 
1050
  wp_localize_script( 'content-forms', 'formStyle', array( 'formStyle' => $style ) );
1051
  wp_enqueue_script( 'content-forms' );
 
1052
  }
1053
  }
1054
 
1134
  $this->add_render_attribute( 'fieldset' . $field['_id'], 'class', 'content-form-field-' . $field['type'] );
1135
  $this->add_render_attribute( 'fieldset' . $field['_id'], 'class', 'elementor-column elementor-col-' . $field['field_width'] );
1136
  $this->add_render_attribute(
1137
+ array(
1138
+ 'icon-align' => array(
1139
+ 'class' => array(
1140
  empty( $instance['button_icon_align'] ) ? '' :
1141
  'elementor-align-icon-' . $instance['button_icon_align'],
1142
  'elementor-button-icon',
1143
+ ),
1144
+ ),
1145
+ )
1146
  );
1147
 
1148
  echo '<fieldset ' . $this->get_render_attribute_string( 'fieldset' . $field_id ) . '>';
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/elementor_widget_manager.php CHANGED
@@ -19,7 +19,7 @@ class Elementor_Widget_Manager {
19
  *
20
  * @var $forms
21
  */
22
- public static $forms = [ 'contact', 'newsletter', 'registration' ];
23
 
24
  /**
25
  * Initialization Function
@@ -41,10 +41,10 @@ class Elementor_Widget_Manager {
41
  public function add_elementor_widget_categories( $elements_manager ) {
42
  $elements_manager->add_category(
43
  'obfx-elementor-widgets',
44
- [
45
  'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
46
  'icon' => 'fa fa-plug',
47
- ]
48
  );
49
  }
50
 
19
  *
20
  * @var $forms
21
  */
22
+ public static $forms = array( 'contact', 'newsletter', 'registration' );
23
 
24
  /**
25
  * Initialization Function
41
  public function add_elementor_widget_categories( $elements_manager ) {
42
  $elements_manager->add_category(
43
  'obfx-elementor-widgets',
44
+ array(
45
  'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
46
  'icon' => 'fa fa-plug',
47
+ )
48
  );
49
  }
50
 
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/newsletter_admin.php CHANGED
@@ -47,8 +47,8 @@ class Newsletter_Admin extends Elementor_Widget_Base {
47
  * @return array
48
  */
49
  function get_default_config() {
50
- return [
51
- [
52
  'key' => 'email',
53
  'type' => 'email',
54
  'label' => esc_html__( 'Email', 'themeisle-companion' ),
@@ -56,8 +56,8 @@ class Newsletter_Admin extends Elementor_Widget_Base {
56
  'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),
57
  'field_width' => '100',
58
  'field_map' => 'email',
59
- ],
60
- ];
61
  }
62
 
63
  /**
@@ -83,17 +83,17 @@ class Newsletter_Admin extends Elementor_Widget_Base {
83
 
84
  $this->add_control(
85
  'provider',
86
- [
87
  'type' => 'select',
88
  'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
89
- 'options' => [
90
  'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
91
  'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' ),
92
  'mailerlite' => esc_html__( 'MailerLite', 'themeisle-companion' ),
93
- ],
94
  'default' => 'mailchimp',
95
  'separator' => 'after',
96
- ]
97
  );
98
 
99
  $this->add_control(
@@ -125,59 +125,78 @@ class Newsletter_Admin extends Elementor_Widget_Base {
125
  );
126
 
127
  $this->add_control(
128
- 'button_icon',
129
- [
130
- 'label' => __( 'Icon', 'elementor-pro', 'themeisle-companion' ),
131
- 'type' => Controls_Manager::ICON,
132
- 'label_block' => true,
133
- 'default' => '',
134
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  );
136
 
137
  $this->add_control(
138
  'button_icon_indent',
139
- [
140
- 'label' => __( 'Icon Spacing', 'elementor-pro', 'themeisle-companion' ),
141
  'type' => Controls_Manager::SLIDER,
142
- 'range' => [
143
- 'px' => [
144
  'max' => 100,
145
- ],
146
- ],
147
- 'condition' => [
148
  'button_icon!' => '',
149
- ],
150
- 'selectors' => [
151
  '{{WRAPPER}} .elementor-button-icon' => 'margin-left: {{SIZE}}{{UNIT}};',
152
- ],
153
- ]
154
  );
155
 
156
  $this->add_responsive_control(
157
  'align_submit',
158
- [
159
  'label' => __( 'Alignment', 'themeisle-companion' ),
160
  'type' => Controls_Manager::CHOOSE,
161
  'toggle' => false,
162
  'default' => 'left',
163
- 'options' => [
164
- 'left' => [
165
  'title' => __( 'Left', 'themeisle-companion' ),
166
  'icon' => 'fa fa-align-left',
167
- ],
168
- 'center' => [
169
  'title' => __( 'Center', 'themeisle-companion' ),
170
  'icon' => 'fa fa-align-center',
171
- ],
172
- 'right' => [
173
  'title' => __( 'Right', 'themeisle-companion' ),
174
  'icon' => 'fa fa-align-right',
175
- ],
176
- ],
177
- 'selectors' => [
178
  '{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
179
- ],
180
- ]
181
  );
182
  }
183
 
@@ -311,9 +330,9 @@ class Newsletter_Admin extends Elementor_Widget_Base {
311
  'label' => $field_data['label'],
312
  'type' => Controls_Manager::TEXT,
313
  'default' => $field_data['default'],
314
- 'condition' => [
315
  'field_map' => 'address',
316
- ],
317
  )
318
  );
319
  } else {
@@ -322,18 +341,18 @@ class Newsletter_Admin extends Elementor_Widget_Base {
322
  array(
323
  'label' => $field_data['label'],
324
  'type' => Controls_Manager::SELECT,
325
- 'options' => [
326
  '100' => '100%',
327
  '75' => '75%',
328
  '66' => '66%',
329
  '50' => '50%',
330
  '33' => '33%',
331
  '25' => '25%',
332
- ],
333
  'default' => $field_data['default'],
334
- 'condition' => [
335
  'field_map' => 'address',
336
- ],
337
  )
338
  );
339
  }
47
  * @return array
48
  */
49
  function get_default_config() {
50
+ return array(
51
+ array(
52
  'key' => 'email',
53
  'type' => 'email',
54
  'label' => esc_html__( 'Email', 'themeisle-companion' ),
56
  'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),
57
  'field_width' => '100',
58
  'field_map' => 'email',
59
+ ),
60
+ );
61
  }
62
 
63
  /**
83
 
84
  $this->add_control(
85
  'provider',
86
+ array(
87
  'type' => 'select',
88
  'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
89
+ 'options' => array(
90
  'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
91
  'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' ),
92
  'mailerlite' => esc_html__( 'MailerLite', 'themeisle-companion' ),
93
+ ),
94
  'default' => 'mailchimp',
95
  'separator' => 'after',
96
+ )
97
  );
98
 
99
  $this->add_control(
125
  );
126
 
127
  $this->add_control(
128
+ 'button_icon_new',
129
+ array(
130
+ 'label' => __( 'Icon', 'themeisle-companion' ),
131
+ 'type' => Controls_Manager::ICONS,
132
+ 'fa4compatibility' => 'button_icon',
133
+ )
134
+ );
135
+
136
+ $this->add_control(
137
+ 'button_icon_size',
138
+ array(
139
+ 'label' => __( 'Icon Size', 'themeisle-companion' ),
140
+ 'type' => Controls_Manager::SLIDER,
141
+ 'range' => array(
142
+ 'px' => array(
143
+ 'max' => 100,
144
+ ),
145
+ ),
146
+ 'condition' => array(
147
+ 'button_icon!' => '',
148
+ ),
149
+ 'selectors' => array(
150
+ '{{WRAPPER}} .elementor-button-icon svg' => 'width: {{SIZE}}{{UNIT}};',
151
+ '{{WRAPPER}} .elementor-button-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
152
+ ),
153
+ )
154
  );
155
 
156
  $this->add_control(
157
  'button_icon_indent',
158
+ array(
159
+ 'label' => __( 'Icon Spacing', 'themeisle-companion' ),
160
  'type' => Controls_Manager::SLIDER,
161
+ 'range' => array(
162
+ 'px' => array(
163
  'max' => 100,
164
+ ),
165
+ ),
166
+ 'condition' => array(
167
  'button_icon!' => '',
168
+ ),
169
+ 'selectors' => array(
170
  '{{WRAPPER}} .elementor-button-icon' => 'margin-left: {{SIZE}}{{UNIT}};',
171
+ ),
172
+ )
173
  );
174
 
175
  $this->add_responsive_control(
176
  'align_submit',
177
+ array(
178
  'label' => __( 'Alignment', 'themeisle-companion' ),
179
  'type' => Controls_Manager::CHOOSE,
180
  'toggle' => false,
181
  'default' => 'left',
182
+ 'options' => array(
183
+ 'left' => array(
184
  'title' => __( 'Left', 'themeisle-companion' ),
185
  'icon' => 'fa fa-align-left',
186
+ ),
187
+ 'center' => array(
188
  'title' => __( 'Center', 'themeisle-companion' ),
189
  'icon' => 'fa fa-align-center',
190
+ ),
191
+ 'right' => array(
192
  'title' => __( 'Right', 'themeisle-companion' ),
193
  'icon' => 'fa fa-align-right',
194
+ ),
195
+ ),
196
+ 'selectors' => array(
197
  '{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
198
+ ),
199
+ )
200
  );
201
  }
202
 
330
  'label' => $field_data['label'],
331
  'type' => Controls_Manager::TEXT,
332
  'default' => $field_data['default'],
333
+ 'condition' => array(
334
  'field_map' => 'address',
335
+ ),
336
  )
337
  );
338
  } else {
341
  array(
342
  'label' => $field_data['label'],
343
  'type' => Controls_Manager::SELECT,
344
+ 'options' => array(
345
  '100' => '100%',
346
  '75' => '75%',
347
  '66' => '66%',
348
  '50' => '50%',
349
  '33' => '33%',
350
  '25' => '25%',
351
+ ),
352
  'default' => $field_data['default'],
353
+ 'condition' => array(
354
  'field_map' => 'address',
355
+ ),
356
  )
357
  );
358
  }
vendor/codeinwp/themeisle-content-forms/includes/widgets-admin/elementor/registration_admin.php CHANGED
@@ -111,41 +111,41 @@ class Registration_Admin extends Elementor_Widget_Base {
111
 
112
  $this->add_responsive_control(
113
  'align_submit',
114
- [
115
  'label' => __( 'Alignment', 'themeisle-companion' ),
116
  'type' => Controls_Manager::CHOOSE,
117
  'toggle' => false,
118
  'default' => 'left',
119
- 'options' => [
120
- 'left' => [
121
  'title' => __( 'Left', 'themeisle-companion' ),
122
  'icon' => 'fa fa-align-left',
123
- ],
124
- 'center' => [
125
  'title' => __( 'Center', 'themeisle-companion' ),
126
  'icon' => 'fa fa-align-center',
127
- ],
128
- 'right' => [
129
  'title' => __( 'Right', 'themeisle-companion' ),
130
  'icon' => 'fa fa-align-right',
131
- ],
132
- ],
133
- 'selectors' => [
134
  '{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
135
- ],
136
- ]
137
  );
138
 
139
  $roles = Form_Manager::get_user_roles();
140
  if ( current_user_can( 'manage_options' ) ) {
141
  $this->add_control(
142
  'user_role',
143
- [
144
  'label' => __( 'Register user as:', 'themeisle-companion' ),
145
  'type' => Controls_Manager::SELECT,
146
  'options' => $roles,
147
  'default' => 'subscriber',
148
- ]
149
  );
150
  }
151
  }
111
 
112
  $this->add_responsive_control(
113
  'align_submit',
114
+ array(
115
  'label' => __( 'Alignment', 'themeisle-companion' ),
116
  'type' => Controls_Manager::CHOOSE,
117
  'toggle' => false,
118
  'default' => 'left',
119
+ 'options' => array(
120
+ 'left' => array(
121
  'title' => __( 'Left', 'themeisle-companion' ),
122
  'icon' => 'fa fa-align-left',
123
+ ),
124
+ 'center' => array(
125
  'title' => __( 'Center', 'themeisle-companion' ),
126
  'icon' => 'fa fa-align-center',
127
+ ),
128
+ 'right' => array(
129
  'title' => __( 'Right', 'themeisle-companion' ),
130
  'icon' => 'fa fa-align-right',
131
+ ),
132
+ ),
133
+ 'selectors' => array(
134
  '{{WRAPPER}} .content-form .submit-form' => 'text-align: {{VALUE}};',
135
+ ),
136
+ )
137
  );
138
 
139
  $roles = Form_Manager::get_user_roles();
140
  if ( current_user_can( 'manage_options' ) ) {
141
  $this->add_control(
142
  'user_role',
143
+ array(
144
  'label' => __( 'Register user as:', 'themeisle-companion' ),
145
  'type' => Controls_Manager::SELECT,
146
  'options' => $roles,
147
  'default' => 'subscriber',
148
+ )
149
  );
150
  }
151
  }
vendor/codeinwp/themeisle-content-forms/includes/widgets-public/contact_public.php CHANGED
@@ -56,15 +56,15 @@ class Contact_Public extends Widget_Actions_Base {
56
  return $return;
57
  }
58
 
59
- $fields = array_key_exists('form_fields', $settings ) ? $settings['form_fields'] : ( array_key_exists('fields', $settings ) ? $settings['fields'] : array() );
60
- if( empty( $fields ) ){
61
- return $return;
62
- }
63
 
64
  foreach ( $fields as $field ) {
65
- $field = (array)$field;
66
- $key = Form_Manager::get_field_key_name( $field );
67
- $required_field = array_key_exists( 'requirement', $field ) ? $field['requirement'] : ( array_key_exists('required', $field ) ? $field['required'] : '');
68
 
69
  if ( 'required' === $required_field && empty( $data[ $key ] ) ) {
70
  $return['message'] = sprintf( esc_html__( 'Missing %s', 'themeisle-companion' ), $key );
56
  return $return;
57
  }
58
 
59
+ $fields = array_key_exists( 'form_fields', $settings ) ? $settings['form_fields'] : ( array_key_exists( 'fields', $settings ) ? $settings['fields'] : array() );
60
+ if ( empty( $fields ) ) {
61
+ return $return;
62
+ }
63
 
64
  foreach ( $fields as $field ) {
65
+ $field = (array) $field;
66
+ $key = Form_Manager::get_field_key_name( $field );
67
+ $required_field = array_key_exists( 'requirement', $field ) ? $field['requirement'] : ( array_key_exists( 'required', $field ) ? $field['required'] : '' );
68
 
69
  if ( 'required' === $required_field && empty( $data[ $key ] ) ) {
70
  $return['message'] = sprintf( esc_html__( 'Missing %s', 'themeisle-companion' ), $key );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit059169ae0106262ecfb9bf0d45d6d9fa
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit059169ae0106262ecfb9bf0d45d6d9fa
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit059169ae0106262ecfb9bf0d45d6d9fa', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit059169ae0106262ecfb9bf0d45d6d9fa', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit059169ae0106262ecfb9bf0d45d6d9fa
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequire059169ae0106262ecfb9bf0d45d6d9fa($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequire059169ae0106262ecfb9bf0d45d6d9fa($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitcb0da32f0096cc6797604c220560a841
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitcb0da32f0096cc6797604c220560a841', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitcb0da32f0096cc6797604c220560a841', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequirecb0da32f0096cc6797604c220560a841($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequirecb0da32f0096cc6797604c220560a841($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/installed.json CHANGED
@@ -6,15 +6,15 @@
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/elementor-extra-widgets.git",
9
- "reference": "6e39e2bd4502b22e44fe2aba4b75f6086b12b0ce"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/Codeinwp/elementor-extra-widgets/zipball/6e39e2bd4502b22e44fe2aba4b75f6086b12b0ce",
14
- "reference": "6e39e2bd4502b22e44fe2aba4b75f6086b12b0ce",
15
  "shasum": ""
16
  },
17
- "time": "2019-11-13 11:11:38",
18
  "type": "library",
19
  "installation-source": "source",
20
  "autoload": {
@@ -749,12 +749,12 @@
749
  "source": {
750
  "type": "git",
751
  "url": "https://github.com/Codeinwp/themeisle-content-forms.git",
752
- "reference": "7ebc856a0dd987db3edfc3c4aedffabf948117cb"
753
  },
754
  "dist": {
755
  "type": "zip",
756
- "url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/7ebc856a0dd987db3edfc3c4aedffabf948117cb",
757
- "reference": "7ebc856a0dd987db3edfc3c4aedffabf948117cb",
758
  "shasum": ""
759
  },
760
  "require": {
@@ -764,7 +764,7 @@
764
  "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
765
  "wptrt/wpthemereview": "*"
766
  },
767
- "time": "2019-11-18 13:38:29",
768
  "type": "library",
769
  "installation-source": "source",
770
  "autoload": {
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/elementor-extra-widgets.git",
9
+ "reference": "f908127bd044b81a7aa74fb92d61a63ad19f5b7a"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/Codeinwp/elementor-extra-widgets/zipball/f908127bd044b81a7aa74fb92d61a63ad19f5b7a",
14
+ "reference": "f908127bd044b81a7aa74fb92d61a63ad19f5b7a",
15
  "shasum": ""
16
  },
17
+ "time": "2019-12-02 09:28:52",
18
  "type": "library",
19
  "installation-source": "source",
20
  "autoload": {
749
  "source": {
750
  "type": "git",
751
  "url": "https://github.com/Codeinwp/themeisle-content-forms.git",
752
+ "reference": "cdb970b402799248b372054685e3cea8e6cae992"
753
  },
754
  "dist": {
755
  "type": "zip",
756
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/cdb970b402799248b372054685e3cea8e6cae992",
757
+ "reference": "cdb970b402799248b372054685e3cea8e6cae992",
758
  "shasum": ""
759
  },
760
  "require": {
764
  "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
765
  "wptrt/wpthemereview": "*"
766
  },
767
+ "time": "2019-12-02 09:28:39",
768
  "type": "library",
769
  "installation-source": "source",
770
  "autoload": {