Orbit Fox by ThemeIsle - Version 2.3.4

Version Description

  • 2018-02-08
Download this release

Release Info

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

Code changes from version 2.3.3 to 2.3.4

Files changed (49) hide show
  1. CHANGELOG.md +3 -3
  2. core/assets/css/orbit-fox-admin.css +1 -1
  3. core/includes/class-orbit-fox.php +1 -1
  4. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-clients-bar-section.php +1 -1
  5. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php +1 -1
  6. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php +2 -2
  7. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php +16 -1
  8. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php +1 -1
  9. obfx_modules/elementor-widgets/init.php +11 -60
  10. readme.md +3 -3
  11. readme.txt +3 -3
  12. themeisle-companion.php +1 -1
  13. themeisle-hash.json +1 -1
  14. vendor/autoload.php +1 -1
  15. vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php +181 -0
  16. vendor/codeinwp/elementor-extra-widgets/composer.json +23 -0
  17. {obfx_modules/elementor-widgets → vendor/codeinwp/elementor-extra-widgets}/css/public.css +68 -0
  18. {obfx_modules/elementor-widgets → vendor/codeinwp/elementor-extra-widgets}/js/obfx-grid.js +3 -3
  19. vendor/codeinwp/elementor-extra-widgets/load.php +11 -0
  20. obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-posts-grid.php → vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php +476 -456
  21. obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-pricing-table.php → vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php +122 -101
  22. obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-services.php → vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php +122 -109
  23. vendor/codeinwp/elementor-extra-widgets/widgets/woo/best-products.php +153 -0
  24. vendor/codeinwp/elementor-extra-widgets/widgets/woo/featured-products.php +158 -0
  25. vendor/codeinwp/elementor-extra-widgets/widgets/woo/popular-products.php +157 -0
  26. vendor/codeinwp/elementor-extra-widgets/widgets/woo/products-categories.php +159 -0
  27. vendor/codeinwp/elementor-extra-widgets/widgets/woo/recent-products.php +155 -0
  28. vendor/codeinwp/elementor-extra-widgets/widgets/woo/sale-products.php +156 -0
  29. vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget-plus.php +194 -0
  30. vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget.php +174 -0
  31. vendor/codeinwp/full-width-page-templates/builders/class-elementor-full-width-templates.php +2 -2
  32. vendor/codeinwp/full-width-page-templates/class-full-width-templates.php +4 -4
  33. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-base.php +15 -15
  34. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-contact.php +3 -3
  35. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-newsletter.php +3 -3
  36. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-registration.php +3 -3
  37. vendor/codeinwp/themeisle-content-forms/beaver/includes/frontend.php +2 -2
  38. vendor/codeinwp/themeisle-content-forms/class-content-form-base.php +10 -3
  39. vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-contact.php +30 -30
  40. vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-elementor.php +19 -18
  41. vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-gutenberg.php +1 -1
  42. vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-newsletter.php +20 -20
  43. vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-registration.php +23 -23
  44. vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-server.php +9 -9
  45. vendor/codeinwp/themeisle-content-forms/composer.json +1 -1
  46. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php +2 -2
  47. vendor/composer/autoload_files.php +1 -0
  48. vendor/composer/autoload_real.php +5 -5
  49. vendor/composer/installed.json +41 -5
CHANGELOG.md CHANGED
@@ -1,8 +1,8 @@
1
 
2
- ### v2.3.3 - 2018-01-29
3
  **Changes:**
4
- * Allow HTML tags in Hestia customizer settings;
5
- * Add alt text for images in Hestia sections;
6
 
7
  ### v2.3.1 - 2018-01-17
8
  **Changes:**
1
 
2
+ ### v2.3.4 - 2018-02-08
3
  **Changes:**
4
+ * Enhancements for Hestia Theme
5
+ * Made structure more modular
6
 
7
  ### v2.3.1 - 2018-01-17
8
  **Changes:**
core/assets/css/orbit-fox-admin.css CHANGED
@@ -8,7 +8,7 @@
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
- Version: 2.3.3
12
  */
13
 
14
  /* Document
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
+ Version: 2.3.4
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.3.3';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
+ $this->version = '2.3.4';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-clients-bar-section.php CHANGED
@@ -46,7 +46,7 @@ if ( ! function_exists( 'hestia_clients_bar' ) ) :
46
  hestia_clients_bar_section_content_trigger();
47
  }
48
  ?>
49
- <div class="row">
50
  <?php
51
  $array_length = sizeof( $hestia_clients_bar_content_decoded );
52
  foreach ( $hestia_clients_bar_content_decoded as $client ) {
46
  hestia_clients_bar_section_content_trigger();
47
  }
48
  ?>
49
+ <div class="row" <?php echo function_exists( 'hestia_add_animationation') ? hestia_add_animationation( 'fade-up' ) : ''; ?>>
50
  <?php
51
  $array_length = sizeof( $hestia_clients_bar_content_decoded );
52
  foreach ( $hestia_clients_bar_content_decoded as $client ) {
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php CHANGED
@@ -97,7 +97,7 @@ function hestia_features_content( $hestia_features_content, $is_callback = false
97
 
98
  $hestia_features_content = json_decode( $hestia_features_content );
99
  if ( ! empty( $hestia_features_content ) ) {
100
- echo '<div class="row">';
101
  foreach ( $hestia_features_content as $features_item ) :
102
  $icon = ! empty( $features_item->icon_value ) ? apply_filters( 'hestia_translate_single_string', $features_item->icon_value, 'Features section' ) : '';
103
  $image = ! empty( $features_item->image_url ) ? apply_filters( 'hestia_translate_single_string', $features_item->image_url, 'Features section' ) : '';
97
 
98
  $hestia_features_content = json_decode( $hestia_features_content );
99
  if ( ! empty( $hestia_features_content ) ) {
100
+ echo '<div class="row" ' . ( function_exists( 'hestia_add_animationation') ? hestia_add_animationation( 'fade-up' ) : '' ) . '>';
101
  foreach ( $hestia_features_content as $features_item ) :
102
  $icon = ! empty( $features_item->icon_value ) ? apply_filters( 'hestia_translate_single_string', $features_item->icon_value, 'Features section' ) : '';
103
  $image = ! empty( $features_item->image_url ) ? apply_filters( 'hestia_translate_single_string', $features_item->image_url, 'Features section' ) : '';
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php CHANGED
@@ -47,7 +47,7 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
47
  <?php hestia_ribbon_background(); ?>
48
  <div class="container">
49
  <div class="row hestia-xs-text-center hestia-like-table">
50
- <div class="col-md-8">
51
  <?php if ( ! empty( $hestia_ribbon_text ) ) { ?>
52
  <h2 class="hestia-title" style="margin:0;">
53
  <?php echo wp_kses_post( $hestia_ribbon_text ); ?>
@@ -56,7 +56,7 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
56
  }
57
  ?>
58
  </div>
59
- <div class="col-md-4 text-center">
60
  <?php
61
 
62
  if ( ! empty( $hestia_ribbon_button_text ) && ! empty( $hestia_ribbon_button_url ) ) {
47
  <?php hestia_ribbon_background(); ?>
48
  <div class="container">
49
  <div class="row hestia-xs-text-center hestia-like-table">
50
+ <div class="col-md-8" <?php echo function_exists( 'hestia_add_animationation') ? hestia_add_animationation( 'fade-right' ) : ''; ?>>
51
  <?php if ( ! empty( $hestia_ribbon_text ) ) { ?>
52
  <h2 class="hestia-title" style="margin:0;">
53
  <?php echo wp_kses_post( $hestia_ribbon_text ); ?>
56
  }
57
  ?>
58
  </div>
59
+ <div class="col-md-4 text-center" <?php echo function_exists( 'hestia_add_animationation') ? hestia_add_animationation( 'fade-left' ) : ''; ?>>
60
  <?php
61
 
62
  if ( ! empty( $hestia_ribbon_button_text ) && ! empty( $hestia_ribbon_button_url ) ) {
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php CHANGED
@@ -114,7 +114,7 @@ function hestia_team_content( $hestia_team_content, $is_callback = false ) {
114
  $text = ! empty( $team_item->text ) ? apply_filters( 'hestia_translate_single_string', $team_item->text, 'Team section' ) : '';
115
  $link = ! empty( $team_item->link ) ? apply_filters( 'hestia_translate_single_string', $team_item->link, 'Team section' ) : '';
116
  ?>
117
- <div class="col-xs-12 col-ms-6 col-sm-6">
118
  <div class="card card-profile card-plain">
119
  <div class="col-md-5">
120
  <div class="card-image">
@@ -160,6 +160,16 @@ function hestia_team_content( $hestia_team_content, $is_callback = false ) {
160
  </div>
161
  <div class="col-md-7">
162
  <div class="content">
 
 
 
 
 
 
 
 
 
 
163
  <?php if ( ! empty( $title ) ) : ?>
164
  <h4 class="card-title"><?php echo esc_html( $title ); ?></h4>
165
  <?php endif; ?>
@@ -169,6 +179,11 @@ function hestia_team_content( $hestia_team_content, $is_callback = false ) {
169
  <?php if ( ! empty( $text ) ) : ?>
170
  <p class="card-description"><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
171
  <?php endif; ?>
 
 
 
 
 
172
  <?php
173
  if ( ! empty( $team_item->social_repeater ) ) :
174
  $icons = html_entity_decode( $team_item->social_repeater );
114
  $text = ! empty( $team_item->text ) ? apply_filters( 'hestia_translate_single_string', $team_item->text, 'Team section' ) : '';
115
  $link = ! empty( $team_item->link ) ? apply_filters( 'hestia_translate_single_string', $team_item->link, 'Team section' ) : '';
116
  ?>
117
+ <div class="col-xs-12 col-ms-6 col-sm-6" <?php echo function_exists( 'hestia_add_animationation') ? hestia_add_animationation( 'fade-right' ) : ''; ?>>
118
  <div class="card card-profile card-plain">
119
  <div class="col-md-5">
120
  <div class="card-image">
160
  </div>
161
  <div class="col-md-7">
162
  <div class="content">
163
+ <?php
164
+ if ( ! empty( $link ) ) :
165
+ $link_html = '<a href="' . esc_url( $link ) . '"';
166
+ if ( function_exists( 'hestia_is_external_url' ) ) {
167
+ $link_html .= hestia_is_external_url( $link );
168
+ }
169
+ $link_html .= '>';
170
+ echo wp_kses_post( $link_html );
171
+ endif;
172
+ ?>
173
  <?php if ( ! empty( $title ) ) : ?>
174
  <h4 class="card-title"><?php echo esc_html( $title ); ?></h4>
175
  <?php endif; ?>
179
  <?php if ( ! empty( $text ) ) : ?>
180
  <p class="card-description"><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
181
  <?php endif; ?>
182
+ <?php
183
+ if ( ! empty( $link ) ) {
184
+ echo '</a>';
185
+ }
186
+ ?>
187
  <?php
188
  if ( ! empty( $team_item->social_repeater ) ) :
189
  $icons = html_entity_decode( $team_item->social_repeater );
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php CHANGED
@@ -116,7 +116,7 @@ function hestia_testimonials_content( $hestia_testimonials_content, $is_callback
116
  $link = ! empty( $testimonial_item->link ) ? apply_filters( 'hestia_translate_single_string', $testimonial_item->link, 'Testimonials section' ) : '';
117
  ?>
118
  <div class="col-xs-12 col-ms-6 col-sm-6 <?php echo apply_filters( 'hestia_testimonials_per_row_class','col-md-4' ); ?>">
119
- <div class="card card-testimonial card-plain">
120
  <?php
121
  if ( ! empty( $image ) ) :
122
  /**
116
  $link = ! empty( $testimonial_item->link ) ? apply_filters( 'hestia_translate_single_string', $testimonial_item->link, 'Testimonials section' ) : '';
117
  ?>
118
  <div class="col-xs-12 col-ms-6 col-sm-6 <?php echo apply_filters( 'hestia_testimonials_per_row_class','col-md-4' ); ?>">
119
+ <div class="card card-testimonial card-plain" <?php echo function_exists( 'hestia_add_animationation') ? hestia_add_animationation( 'fade-right' ) : ''; ?>>
120
  <?php
121
  if ( ! empty( $image ) ) :
122
  /**
obfx_modules/elementor-widgets/init.php CHANGED
@@ -19,17 +19,6 @@ define( 'OBFX_MODULE_URL', __FILE__ );
19
  */
20
  class Elementor_Widgets_OBFX_Module extends Orbit_Fox_Module_Abstract {
21
 
22
- /**
23
- * Elementor Widgets File Names
24
- *
25
- * @var array
26
- */
27
- private $elementor_widgets = array(
28
- 'class-obfx-elementor-widget-pricing-table',
29
- 'class-obfx-elementor-widget-services',
30
- 'class-obfx-elementor-widget-posts-grid',
31
- );
32
-
33
  /**
34
  * Elementor_Widgets_OBFX_Module constructor.
35
  *
@@ -71,12 +60,8 @@ class Elementor_Widgets_OBFX_Module extends Orbit_Fox_Module_Abstract {
71
  * @return mixed | array
72
  */
73
  public function hooks() {
74
-
75
- $this->loader->add_action( 'elementor/init', $this, 'add_elementor_category' );
76
- $this->loader->add_action( 'elementor/widgets/widgets_registered', $this, 'add_elementor_widgets' );
77
- $this->loader->add_action( 'elementor/frontend/after_register_scripts', $this, 'enqueue_scripts' );
78
-
79
  $this->loader->add_action( 'init_themeisle_content_forms', $this, 'load_content_forms' );
 
80
  }
81
 
82
  /**
@@ -88,11 +73,7 @@ class Elementor_Widgets_OBFX_Module extends Orbit_Fox_Module_Abstract {
88
  * @return array
89
  */
90
  public function public_enqueue() {
91
- return array(
92
- 'css' => array(
93
- 'public' => false,
94
- ),
95
- );
96
  }
97
 
98
  /**
@@ -120,45 +101,6 @@ class Elementor_Widgets_OBFX_Module extends Orbit_Fox_Module_Abstract {
120
  return $options;
121
  }
122
 
123
- /**
124
- * Add the Category for Orbit Fox Widgets.
125
- */
126
- public function add_elementor_category() {
127
- \Elementor\Plugin::instance()->elements_manager->add_category(
128
- 'obfx-elementor-widgets',
129
- array(
130
- 'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
131
- 'icon' => 'fa fa-plug',
132
- ),
133
- 1 );
134
- }
135
-
136
- /**
137
- * Require and instantiate Elementor Widgets.
138
- *
139
- * @param $widgets_manager
140
- */
141
- public function add_elementor_widgets( $widgets_manager ) {
142
- foreach ( $this->elementor_widgets as $widget ) {
143
- require_once $this->get_dir() . '/widgets/' . $widget . '.php';
144
- }
145
-
146
- // Pricing table
147
- $widget = new Elementor\OBFX_Elementor_Widget_Pricing_Table();
148
- $widgets_manager->register_widget_type( $widget );
149
- // Services
150
- $widget = new Elementor\OBFX_Elementor_Widget_Services();
151
- $widgets_manager->register_widget_type( $widget );
152
- // Posts grid
153
- $widget = new Elementor\OBFX_Elementor_Widget_Posts_Grid();
154
- $widgets_manager->register_widget_type( $widget );
155
- }
156
-
157
- public function enqueue_scripts() {
158
- // Add custom JS for grid.
159
- wp_enqueue_script( 'obfx-grid-js', plugins_url ( 'js/obfx-grid.js', OBFX_MODULE_URL ), array(), '1.0', true );
160
- }
161
-
162
  /**
163
  * If the content-forms library is available we should make the forms available for elementor
164
  */
@@ -171,4 +113,13 @@ class Elementor_Widgets_OBFX_Module extends Orbit_Fox_Module_Abstract {
171
  }
172
  }
173
 
 
 
 
 
 
 
 
 
 
174
  }
19
  */
20
  class Elementor_Widgets_OBFX_Module extends Orbit_Fox_Module_Abstract {
21
 
 
 
 
 
 
 
 
 
 
 
 
22
  /**
23
  * Elementor_Widgets_OBFX_Module constructor.
24
  *
60
  * @return mixed | array
61
  */
62
  public function hooks() {
 
 
 
 
 
63
  $this->loader->add_action( 'init_themeisle_content_forms', $this, 'load_content_forms' );
64
+ $this->loader->add_action( 'plugins_loaded', $this, 'load_elementor_extra_widgets' );
65
  }
66
 
67
  /**
73
  * @return array
74
  */
75
  public function public_enqueue() {
76
+ return array();
 
 
 
 
77
  }
78
 
79
  /**
101
  return $options;
102
  }
103
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  /**
105
  * If the content-forms library is available we should make the forms available for elementor
106
  */
113
  }
114
  }
115
 
116
+ /**
117
+ * Call the ElementorExtraWidgets Library which will register its own actions.
118
+ */
119
+ public function load_elementor_extra_widgets() {
120
+ if ( class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
121
+ \ThemeIsle\ElementorExtraWidgets::instance();
122
+ }
123
+ }
124
+
125
  }
readme.md CHANGED
@@ -89,10 +89,10 @@ Activating the Orbit Fox Companion plugin is just like any other plugin. If you'
89
  5. Social Sharing Module
90
 
91
  ## Changelog ##
92
- ### 2.3.3 - 2018-01-29 ###
93
 
94
- * Allow HTML tags in Hestia customizer settings;
95
- * Add alt text for images in Hestia sections;
96
 
97
 
98
  ### 2.3.1 - 2018-01-17 ###
89
  5. Social Sharing Module
90
 
91
  ## Changelog ##
92
+ ### 2.3.4 - 2018-02-08 ###
93
 
94
+ * Enhancements for Hestia Theme
95
+ * Made structure more modular
96
 
97
 
98
  ### 2.3.1 - 2018-01-17 ###
readme.txt CHANGED
@@ -89,10 +89,10 @@ Activating the Orbit Fox Companion plugin is just like any other plugin. If you'
89
  5. Social Sharing Module
90
 
91
  == Changelog ==
92
- = 2.3.3 - 2018-01-29 =
93
 
94
- * Allow HTML tags in Hestia customizer settings;
95
- * Add alt text for images in Hestia sections;
96
 
97
 
98
  = 2.3.1 - 2018-01-17 =
89
  5. Social Sharing Module
90
 
91
  == Changelog ==
92
+ = 2.3.4 - 2018-02-08 =
93
 
94
+ * Enhancements for Hestia Theme
95
+ * Made structure more modular
96
 
97
 
98
  = 2.3.1 - 2018-01-17 =
themeisle-companion.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://themeisle.com/plugins/orbit-fox-companion
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
- * Version: 2.3.3
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://themeisle.com/plugins/orbit-fox-companion
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
+ * Version: 2.3.4
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
themeisle-hash.json CHANGED
@@ -1 +1 @@
1
- {"class-autoloader.php":"57e533b653d235e76cb9953720e4f5e9","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"89bc7fa9fd9fd3491d434f6ebca08844","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
1
+ {"class-autoloader.php":"57e533b653d235e76cb9953720e4f5e9","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"a2753e2016d83ea261c43376891278ab","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInita6f1fca15487c58cbbc5ffa8175e25ba::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit4035687531a206f15a6b6487aad54c2a::getLoader();
vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ThemeIsle\ElementorExtraWidgets
4
+ *
5
+ * @package ThemeIsle\ElementorExtraWidgets
6
+ * @copyright Copyright (c) 2017, Andrei Lupu
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ * @since 1.0.0
9
+ */
10
+
11
+ namespace ThemeIsle;
12
+
13
+ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
14
+
15
+ class ElementorExtraWidgets {
16
+ /**
17
+ * @var ElementorExtraWidgets
18
+ */
19
+ public static $instance = null;
20
+
21
+ /**
22
+ * The version of this library
23
+ * @var string
24
+ */
25
+ public static $version = '1.0.0';
26
+
27
+ /**
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
+ }
42
+
43
+ /**
44
+ * Add the Category for Orbit Fox Widgets.
45
+ */
46
+ public function add_elementor_category() {
47
+
48
+ $category_args = apply_filters( 'elementor_extra_widgets_category_args', array(
49
+ 'slug' => 'obfx-elementor-widgets',
50
+ 'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
51
+ 'icon' => 'fa fa-plug',
52
+ ) );
53
+
54
+ \Elementor\Plugin::instance()->elements_manager->add_category(
55
+ $category_args['slug'],
56
+ array(
57
+ 'title' => $category_args['title'],
58
+ 'icon' => $category_args['slug'],
59
+ ),
60
+ 1
61
+ );
62
+
63
+ }
64
+
65
+ public function register_assets() {
66
+ // Register custom JS for grid.
67
+ wp_register_script( 'obfx-grid-js', plugins_url( '/js/obfx-grid.js', __FILE__ ), array(), $this::$version, true );
68
+ wp_register_style( 'eaw-elementor', plugins_url( '/css/public.css', __FILE__ ), array(), $this::$version );
69
+ }
70
+
71
+ /**
72
+ * Require and instantiate Elementor Widgets.
73
+ *
74
+ * @param $widgets_manager
75
+ */
76
+ public function add_elementor_widgets( $widgets_manager ) {
77
+ $elementor_widgets = array(
78
+ 'pricing-table',
79
+ 'services',
80
+ 'posts-grid',
81
+ );
82
+
83
+ foreach ( $elementor_widgets as $widget ) {
84
+ require_once dirname( __FILE__ ) . '/widgets/elementor/' . $widget . '.php';
85
+ }
86
+
87
+ // Pricing table
88
+ $widget = new ElementorExtraWidgets\Pricing_Table();
89
+ $widgets_manager->register_widget_type( $widget );
90
+ // Services
91
+ $widget = new ElementorExtraWidgets\Services();
92
+ $widgets_manager->register_widget_type( $widget );
93
+ // Posts grid
94
+ $widget = new ElementorExtraWidgets\Posts_Grid();
95
+ $widgets_manager->register_widget_type( $widget );
96
+ }
97
+
98
+ /**
99
+ * WooCommerce Widget section
100
+ *
101
+ * @since 1.0.0
102
+ * @return void
103
+ */
104
+ public function register_woo_widgets() {
105
+ if ( ! class_exists( 'woocommerce' ) ) { // Lets not do anything unless WooCommerce is active!
106
+ return null;
107
+ }
108
+
109
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/products-categories.php' );
110
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/recent-products.php' );
111
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/featured-products.php' );
112
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/popular-products.php' );
113
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/sale-products.php' );
114
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/woo/best-products.php' );
115
+
116
+ register_widget( 'Woo_Product_Categories' );
117
+ register_widget( 'Woo_Recent_Products' );
118
+ register_widget( 'Woo_Featured_Products' );
119
+ register_widget( 'Woo_Popular_Products' );
120
+ register_widget( 'Woo_Sale_Products' );
121
+ register_widget( 'Woo_Best_Products' );
122
+ }
123
+
124
+ /**
125
+ * Posts Widget section
126
+ *
127
+ * @since 1.0.0
128
+ * @return void
129
+ */
130
+ public function register_posts_widgets() {
131
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/wp/eaw-posts-widget.php' );
132
+ register_widget( 'EAW_Recent_Posts' );
133
+
134
+ include_once( plugin_dir_path( __FILE__ ) . 'widgets/wp/eaw-posts-widget-plus.php' );
135
+ register_widget( 'EAW_Recent_Posts_Plus' );
136
+ }
137
+
138
+ /**
139
+ *
140
+ * @static
141
+ * @since 1.0.0
142
+ * @access public
143
+ * @return ElementorExtraWidgets
144
+ */
145
+ public static function instance() {
146
+ if ( is_null( self::$instance ) ) {
147
+ self::$instance = new self();
148
+ self::$instance->init();
149
+ }
150
+
151
+ return self::$instance;
152
+ }
153
+
154
+ /**
155
+ * Throw error on object clone
156
+ *
157
+ * The whole idea of the singleton design pattern is that there is a single
158
+ * object therefore, we don't want the object to be cloned.
159
+ *
160
+ * @access public
161
+ * @since 1.0.0
162
+ * @return void
163
+ */
164
+ public function __clone() {
165
+ // Cloning instances of the class is forbidden.
166
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
167
+ }
168
+
169
+ /**
170
+ * Disable unserializing of the class
171
+ *
172
+ * @access public
173
+ * @since 1.0.0
174
+ * @return void
175
+ */
176
+ public function __wakeup() {
177
+ // Unserializing instances of the class is forbidden.
178
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
179
+ }
180
+ }
181
+ }
vendor/codeinwp/elementor-extra-widgets/composer.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "codeinwp/elementor-extra-widgets",
3
+ "type": "library",
4
+ "version": "1.0.0",
5
+ "license": "GPL-3.0-or-later",
6
+ "minimum-stability": "dev",
7
+ "homepage": "https://github.com/Codeinwp/elementor-extra-widgets",
8
+ "authors": [
9
+ {
10
+ "name": "ThemeIsle team",
11
+ "email": "friends@themeisle.com",
12
+ "homepage": "https://themeisle.com"
13
+ }
14
+ ],
15
+ "autoload": {
16
+ "files": [
17
+ "load.php"
18
+ ]
19
+ },
20
+ "support": {
21
+ "issues": "https://github.com/Codeinwp/elementor-extra-widgets/issues"
22
+ }
23
+ }
{obfx_modules/elementor-widgets → vendor/codeinwp/elementor-extra-widgets}/css/public.css RENAMED
@@ -325,3 +325,71 @@
325
  .obfx-service-box .obfx-service-box-content .obfx-service-text {
326
  margin: 0;
327
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
325
  .obfx-service-box .obfx-service-box-content .obfx-service-text {
326
  margin: 0;
327
  }
328
+
329
+
330
+ /** passed from eaw.css **/
331
+
332
+ /*
333
+ * Elementor CSS support
334
+ */
335
+
336
+ .eaw-product-section .section-title {
337
+ margin-bottom: 20px;
338
+ }
339
+
340
+ .elementor-widget-wp-widget-eaw-recent-posts h5,
341
+ .elementor-widget-wp-widget-eaw-recent-posts-plus h5 {
342
+ font-size: 1.75rem;
343
+ line-height: 1.75;
344
+ text-align: center;
345
+ }
346
+
347
+ .eaw-recent-posts,
348
+ .eaw-recent-posts-plus {
349
+ width: 32.3333%;
350
+ padding: 0;
351
+ margin: 0;
352
+ margin-right: 1.3333%;
353
+ float: left;
354
+ }
355
+
356
+ .eaw-recent-posts:last-child,
357
+ .eaw-recent-posts-plus:last-child {
358
+ margin-right: 0;
359
+ }
360
+
361
+ .eaw-recent-posts img {
362
+ width: 100%;
363
+ height: 250px;
364
+ margin: 10px 0;
365
+ border-radius: 6px;
366
+ }
367
+
368
+ .eaw-recent-posts .eaw-content {
369
+ padding: 1% 2%;
370
+ }
371
+
372
+ @media screen and (max-width: 768px) {
373
+ .eaw-recent-posts {
374
+ width: 48%;
375
+ padding: 0;
376
+ margin: 0 1%;
377
+ }
378
+
379
+ .eaw-recent-posts img {
380
+ height: 300px;
381
+ margin: 0 auto;
382
+ }
383
+ }
384
+
385
+ @media screen and (max-width: 667px) {
386
+ .eaw-recent-posts {
387
+ width: 100%;
388
+ margin: 0;
389
+ }
390
+
391
+ .eaw-recent-posts img {
392
+ height: 300px;
393
+ margin: 0 auto;
394
+ }
395
+ }
{obfx_modules/elementor-widgets → vendor/codeinwp/elementor-extra-widgets}/js/obfx-grid.js RENAMED
@@ -2,13 +2,13 @@
2
  (function ($) {
3
  $( document ).ready(
4
  function () {
5
- checkImageSize();
6
  }
7
  );
8
 
9
  $( window ).resize(
10
  function () {
11
- checkImageSize();
12
  }
13
  );
14
 
@@ -39,7 +39,7 @@
39
  function checkImageSize() {
40
  $( '.obfx-grid .obfx-grid-col' ).each(
41
  function () {
42
- var container = $( this ).find( '.obfx-grid-col-image' ),
43
  containerWidth = $( this ).find( '.obfx-grid-col-image' ).width(),
44
  containerHeight = $( this ).find( '.obfx-grid-col-image' ).height(),
45
  imageWidth = $( this ).find( '.obfx-grid-col-image img' ).width(),
2
  (function ($) {
3
  $( document ).ready(
4
  function () {
5
+ checkImageSize();
6
  }
7
  );
8
 
9
  $( window ).resize(
10
  function () {
11
+ checkImageSize();
12
  }
13
  );
14
 
39
  function checkImageSize() {
40
  $( '.obfx-grid .obfx-grid-col' ).each(
41
  function () {
42
+ var container = $( this ).find( '.obfx-grid-col-image' ),
43
  containerWidth = $( this ).find( '.obfx-grid-col-image' ).width(),
44
  containerHeight = $( this ).find( '.obfx-grid-col-image' ).height(),
45
  imageWidth = $( this ).find( '.obfx-grid-col-image img' ).width(),
vendor/codeinwp/elementor-extra-widgets/load.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Loader for the ThemeIsle\ElementorExtraWidgets
4
+ *
5
+ * @package ThemeIsle\ElementorExtraWidgets
6
+ * @copyright Copyright (c) 2017, Andrei Lupu
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ * @since 1.0.0
9
+ */
10
+
11
+ require_once( dirname( __FILE__ ) . '/class-elementor-extra-widgets.php' );
obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-posts-grid.php → vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php RENAMED
@@ -1,25 +1,25 @@
1
  <?php
2
  /**
3
- * Orbit Fox Elementor Features Widget
4
  *
5
  * @link https://themeisle.com
6
  * @since 1.0.0
7
  *
8
- * @package Elementor_Widgets_OBFX_Module
9
  */
10
- namespace Elementor;
11
 
 
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  } // End if().
16
 
17
  /**
18
- * Class OBFX_Elementor_Widget_Features
19
  *
20
- * @package Elementor_Widgets_OBFX_Module
21
  */
22
- class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
23
 
24
  /**
25
  * Widget title.
@@ -54,7 +54,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
54
  * @return array
55
  */
56
  public function get_categories() {
57
- return [ 'obfx-elementor-widgets' ];
 
 
58
  }
59
 
60
  /**
@@ -120,6 +122,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
120
  }
121
  }
122
  }
 
123
  return $options;
124
  }
125
 
@@ -158,7 +161,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
158
  $this->add_control(
159
  'grid_post_type',
160
  [
161
- 'type' => Controls_Manager::SELECT,
162
  'label' => '<i class="fa fa-tag"></i> ' . __( 'Post Type', 'themeisle-companion' ),
163
  'default' => 'post',
164
  'options' => $this->grid_get_all_post_types(),
@@ -169,9 +172,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
169
  $this->add_control(
170
  'grid_post_categories',
171
  [
172
- 'type' => Controls_Manager::SELECT,
173
- 'label' => '<i class="fa fa-folder"></i> ' . __( 'Category', 'themeisle-companion' ),
174
- 'options' => $this->grid_get_all_post_type_categories( 'post' ),
175
  'condition' => [
176
  'grid_post_type' => 'post',
177
  ],
@@ -182,9 +185,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
182
  $this->add_control(
183
  'grid_product_categories',
184
  [
185
- 'type' => Controls_Manager::SELECT,
186
- 'label' => '<i class="fa fa-tag"></i> ' . __( 'Category', 'themeisle-companion' ),
187
- 'options' => $this->grid_get_all_post_type_categories( 'product' ),
188
  'condition' => [
189
  'grid_post_type' => 'product',
190
  ],
@@ -195,11 +198,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
195
  $this->add_control(
196
  'grid_style',
197
  [
198
- 'type' => Controls_Manager::SELECT,
199
  'label' => '<i class="fa fa-paint-brush"></i> ' . __( 'Style', 'themeisle-companion' ),
200
  'default' => 'grid',
201
  'options' => [
202
- 'grid' => __( 'Grid', 'themeisle-companion' ),
203
  'list' => __( 'List', 'themeisle-companion' ),
204
  ],
205
  ]
@@ -209,7 +212,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
209
  $this->add_control(
210
  'grid_items',
211
  [
212
- 'type' => Controls_Manager::NUMBER,
213
  'label' => '<i class="fa fa-th-large"></i> ' . __( 'Items', 'themeisle-companion' ),
214
  'placeholder' => __( 'How many items?', 'themeisle-companion' ),
215
  'default' => 6,
@@ -220,12 +223,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
220
  $this->add_responsive_control(
221
  'grid_columns',
222
  [
223
- 'type' => Controls_Manager::SELECT,
224
- 'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
225
- 'default' => 3,
226
  'tablet_default' => 2,
227
  'mobile_default' => 1,
228
- 'options' => [
229
  1 => 1,
230
  2 => 2,
231
  3 => 3,
@@ -239,7 +242,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
239
  $this->add_control(
240
  'grid_order_by',
241
  [
242
- 'type' => Controls_Manager::SELECT,
243
  'label' => '<i class="fa fa-sort"></i> ' . __( 'Order by', 'themeisle-companion' ),
244
  'default' => 'date',
245
  'options' => [
@@ -256,8 +259,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
256
  $this->add_control(
257
  'grid_pagination',
258
  [
259
- 'label' => '<i class="fa fa-arrow-circle-right"></i> ' . __( 'Pagination', 'themeisle-companion' ),
260
- 'type' => Controls_Manager::SWITCHER,
261
  'default' => '',
262
  ]
263
  );
@@ -280,8 +283,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
280
  $this->add_control(
281
  'grid_image_hide',
282
  [
283
- 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
284
- 'type' => Controls_Manager::SWITCHER,
285
  'default' => '',
286
  ]
287
  );
@@ -290,15 +293,15 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
290
  $this->add_control(
291
  'grid_image_height',
292
  [
293
- 'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Image height', 'themeisle-companion' ),
294
- 'type' => Controls_Manager::SLIDER,
295
- 'default' => [
296
  'size' => 220,
297
  ],
298
- 'range' => [
299
  'px' => [
300
- 'min' => 1,
301
- 'max' => 1000,
302
  'step' => 1,
303
  ],
304
  ],
@@ -312,8 +315,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
312
  $this->add_control(
313
  'grid_image_link',
314
  [
315
- 'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'themeisle-companion' ),
316
- 'type' => Controls_Manager::SWITCHER,
317
  'default' => 'yes',
318
  ]
319
  );
@@ -328,7 +331,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
328
  $this->start_controls_section(
329
  'section_grid_title',
330
  [
331
- 'label' => __( 'Title', 'themeisle-companion' ),
332
  ]
333
  );
334
 
@@ -336,8 +339,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
336
  $this->add_control(
337
  'grid_title_hide',
338
  [
339
- 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
340
- 'type' => Controls_Manager::SWITCHER,
341
  'default' => '',
342
  ]
343
  );
@@ -346,19 +349,19 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
346
  $this->add_control(
347
  'grid_title_tag',
348
  [
349
- 'type' => Controls_Manager::SELECT,
350
  'label' => '<i class="fa fa-code"></i> ' . __( 'Tag', 'themeisle-companion' ),
351
  'default' => 'h2',
352
  'options' => [
353
- 'h1' => 'H1',
354
- 'h2' => 'H2',
355
- 'h3' => 'H3',
356
- 'h4' => 'H4',
357
- 'h5' => 'H5',
358
- 'h6' => 'H6',
359
  'span' => 'span',
360
- 'p' => 'p',
361
- 'div' => 'div',
362
  ],
363
  ]
364
  );
@@ -367,8 +370,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
367
  $this->add_control(
368
  'grid_title_link',
369
  [
370
- 'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'themeisle-companion' ),
371
- 'type' => Controls_Manager::SWITCHER,
372
  'default' => 'yes',
373
  ]
374
  );
@@ -383,7 +386,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
383
  $this->start_controls_section(
384
  'section_grid_meta',
385
  [
386
- 'label' => __( 'Meta', 'themeisle-companion' ),
387
  ]
388
  );
389
 
@@ -391,8 +394,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
391
  $this->add_control(
392
  'grid_meta_hide',
393
  [
394
- 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
395
- 'type' => Controls_Manager::SWITCHER,
396
  'default' => '',
397
  ]
398
  );
@@ -401,16 +404,16 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
401
  $this->add_control(
402
  'grid_meta_display',
403
  [
404
- 'label' => '<i class="fa fa-info-circle"></i> ' . __( 'Display', 'themeisle-companion' ),
405
  'label_block' => true,
406
- 'type' => Controls_Manager::SELECT2,
407
- 'default' => [ 'author', 'date' ],
408
- 'multiple' => true,
409
- 'options' => [
410
- 'author' => __( 'Author', 'themeisle-companion' ),
411
- 'date' => __( 'Date', 'themeisle-companion' ),
412
  'category' => __( 'Category', 'themeisle-companion' ),
413
- 'tags' => __( 'Tags', 'themeisle-companion' ),
414
  'comments' => __( 'Comments', 'themeisle-companion' ),
415
  ],
416
  ]
@@ -420,11 +423,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
420
  $this->add_control(
421
  'grid_meta_categories_max',
422
  [
423
- 'type' => Controls_Manager::NUMBER,
424
  'label' => __( 'No. of Categories', 'themeisle-companion' ),
425
  'placeholder' => __( 'How many categories to display?', 'themeisle-companion' ),
426
  'default' => __( '1', 'themeisle-companion' ),
427
- 'condition' => [
428
  'grid_meta_display' => 'category',
429
  ],
430
  ]
@@ -434,10 +437,10 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
434
  $this->add_control(
435
  'grid_meta_tags_max',
436
  [
437
- 'type' => Controls_Manager::NUMBER,
438
  'label' => __( 'No. of Tags', 'themeisle-companion' ),
439
  'placeholder' => __( 'How many tags to display?', 'themeisle-companion' ),
440
- 'condition' => [
441
  'grid_meta_display' => 'tags',
442
  ],
443
  ]
@@ -447,8 +450,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
447
  $this->add_control(
448
  'grid_meta_remove_icons',
449
  [
450
- 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Remove icons', 'themeisle-companion' ),
451
- 'type' => Controls_Manager::SWITCHER,
452
  'default' => '',
453
  ]
454
  );
@@ -463,7 +466,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
463
  $this->start_controls_section(
464
  'section_grid_content',
465
  [
466
- 'label' => __( 'Content', 'themeisle-companion' ),
467
  ]
468
  );
469
 
@@ -471,8 +474,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
471
  $this->add_control(
472
  'grid_content_hide',
473
  [
474
- 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
475
- 'type' => Controls_Manager::SWITCHER,
476
  'default' => '',
477
  ]
478
  );
@@ -481,7 +484,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
481
  $this->add_control(
482
  'grid_content_length',
483
  [
484
- 'type' => Controls_Manager::NUMBER,
485
  'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Length (words)', 'themeisle-companion' ),
486
  'placeholder' => __( 'Length of content (words)', 'themeisle-companion' ),
487
  'default' => 30,
@@ -492,9 +495,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
492
  $this->add_control(
493
  'grid_content_price',
494
  [
495
- 'label' => '<i class="fa fa-usd"></i> ' . __( 'Price', 'themeisle-companion' ),
496
- 'type' => Controls_Manager::SWITCHER,
497
- 'default' => 'yes',
498
  'condition' => [
499
  'section_grid.grid_post_type' => 'product',
500
  ],
@@ -505,9 +508,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
505
  $this->add_control(
506
  'grid_content_default_btn',
507
  [
508
- 'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'themeisle-companion' ),
509
- 'type' => Controls_Manager::SWITCHER,
510
- 'default' => 'yes',
511
  'condition' => [
512
  'section_grid.grid_post_type!' => 'product',
513
  ],
@@ -518,12 +521,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
518
  $this->add_control(
519
  'grid_content_default_btn_text',
520
  [
521
- 'type' => Controls_Manager::TEXT,
522
  'label' => __( 'Button text', 'themeisle-companion' ),
523
  'placeholder' => __( 'Read more', 'themeisle-companion' ),
524
  'default' => __( 'Read more', 'themeisle-companion' ),
525
- 'condition' => [
526
- 'grid_content_default_btn!' => '',
527
  'section_grid.grid_post_type!' => 'product',
528
  ],
529
  ]
@@ -533,9 +536,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
533
  $this->add_control(
534
  'grid_content_product_btn',
535
  [
536
- 'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'themeisle-companion' ),
537
- 'type' => Controls_Manager::SWITCHER,
538
- 'default' => 'yes',
539
  'condition' => [
540
  'section_grid.grid_post_type' => 'product',
541
  ],
@@ -546,9 +549,9 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
546
  $this->add_responsive_control(
547
  'grid_content_btn_alignment',
548
  [
549
- 'label' => __( 'Button alignment', 'themeisle-companion' ),
550
- 'type' => Controls_Manager::CHOOSE,
551
- 'options' => [
552
  'left' => [
553
  'title' => __( 'Left', 'themeisle-companion' ),
554
  'icon' => 'fa fa-align-left',
@@ -566,13 +569,13 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
566
  'icon' => 'fa fa-align-justify',
567
  ],
568
  ],
569
- 'default' => 'left',
570
- 'tablet_default' => 'left',
571
- 'mobile_default' => 'center',
572
- 'selectors' => [
573
  '{{WRAPPER}} .obfx-grid-footer' => 'text-align: {{VALUE}};',
574
  ],
575
- 'condition' => [
576
  'grid_content_btn!' => '',
577
  ],
578
  ]
@@ -582,26 +585,26 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
582
  $this->add_responsive_control(
583
  'grid_content_alignment',
584
  [
585
- 'label' => '<i class="fa fa-align-right"></i> ' . __( 'Alignment', 'themeisle-companion' ),
586
- 'type' => Controls_Manager::CHOOSE,
587
- 'options' => [
588
- 'left' => [
589
  'title' => __( 'Left', 'themeisle-companion' ),
590
  'icon' => 'fa fa-align-left',
591
  ],
592
- 'center' => [
593
  'title' => __( 'Center', 'themeisle-companion' ),
594
  'icon' => 'fa fa-align-center',
595
  ],
596
- 'right' => [
597
  'title' => __( 'Right', 'themeisle-companion' ),
598
  'icon' => 'fa fa-align-right',
599
  ],
600
  ],
601
- 'default' => 'left',
602
- 'tablet_default' => 'left',
603
- 'mobile_default' => 'center',
604
- 'selectors' => [
605
  '{{WRAPPER}} .obfx-grid-col-content' => 'text-align: {{VALUE}};',
606
  ],
607
  ]
@@ -628,26 +631,26 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
628
  $this->add_responsive_control(
629
  'grid_pagination_alignment',
630
  [
631
- 'label' => __( 'Alignment', 'themeisle-companion' ),
632
- 'type' => Controls_Manager::CHOOSE,
633
- 'options' => [
634
- 'left' => [
635
  'title' => __( 'Left', 'themeisle-companion' ),
636
  'icon' => 'fa fa-align-left',
637
  ],
638
- 'center' => [
639
  'title' => __( 'Center', 'themeisle-companion' ),
640
  'icon' => 'fa fa-align-center',
641
  ],
642
- 'right' => [
643
  'title' => __( 'Right', 'themeisle-companion' ),
644
  'icon' => 'fa fa-align-right',
645
  ],
646
  ],
647
- 'default' => 'center',
648
- 'tablet_default' => 'center',
649
- 'mobile_default' => 'center',
650
- 'selectors' => [
651
  '{{WRAPPER}} .obfx-grid-pagination .pagination' => 'text-align: {{VALUE}};',
652
  ],
653
  ]
@@ -665,7 +668,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
665
  'section_grid_style',
666
  [
667
  'label' => __( 'Grid Options', 'themeisle-companion' ),
668
- 'tab' => Controls_Manager::TAB_STYLE,
669
  ]
670
  );
671
 
@@ -674,7 +677,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
674
  'grid_style_columns_margin',
675
  [
676
  'label' => __( 'Columns margin', 'themeisle-companion' ),
677
- 'type' => Controls_Manager::SLIDER,
678
  'default' => [
679
  'size' => 15,
680
  ],
@@ -685,7 +688,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
685
  ],
686
  ],
687
  'selectors' => [
688
- '{{WRAPPER}} .obfx-grid-wrapper' => 'padding-right: calc( {{SIZE}}{{UNIT}} ); padding-left: calc( {{SIZE}}{{UNIT}} );',
689
  '{{WRAPPER}} .obfx-grid-container' => 'margin-left: calc( -{{SIZE}}{{UNIT}} ); margin-right: calc( -{{SIZE}}{{UNIT}} );',
690
  ],
691
  ]
@@ -696,7 +699,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
696
  'grid_style_rows_margin',
697
  [
698
  'label' => __( 'Rows margin', 'themeisle-companion' ),
699
- 'type' => Controls_Manager::SLIDER,
700
  'default' => [
701
  'size' => 30,
702
  ],
@@ -714,7 +717,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
714
 
715
  // Background.
716
  $this->add_group_control(
717
- Group_Control_Background::get_type(),
718
  [
719
  'name' => 'grid_style_background',
720
  'types' => [ 'classic', 'gradient' ],
@@ -726,8 +729,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
726
  $this->add_control(
727
  'grid_items_style_heading',
728
  [
729
- 'label' => __( 'Items', 'themeisle-companion' ),
730
- 'type' => Controls_Manager::HEADING,
731
  'separator' => 'before',
732
  ]
733
  );
@@ -737,7 +740,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
737
  'grid_items_style_padding',
738
  [
739
  'label' => __( 'Padding', 'themeisle-companion' ),
740
- 'type' => Controls_Manager::DIMENSIONS,
741
  'size_units' => [ 'px', '%' ],
742
  'selectors' => [
743
  '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -750,7 +753,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
750
  'grid_items_style_border_radius',
751
  [
752
  'label' => __( 'Border Radius', 'themeisle-companion' ),
753
- 'type' => Controls_Manager::DIMENSIONS,
754
  'size_units' => [ 'px', '%' ],
755
  'selectors' => [
756
  '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -760,7 +763,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
760
 
761
  // Items box shadow.
762
  $this->add_group_control(
763
- Group_Control_Box_Shadow::get_type(),
764
  [
765
  'name' => 'grid_items_style_box_shadow',
766
  'selector' => '{{WRAPPER}} .obfx-grid-col',
@@ -770,7 +773,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
770
 
771
  // Background for items options.
772
  $this->add_group_control(
773
- Group_Control_Background::get_type(),
774
  [
775
  'name' => 'grid_items_style_background',
776
  'types' => [ 'classic', 'gradient' ],
@@ -789,8 +792,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
789
  $this->start_controls_section(
790
  'section_grid_image_style',
791
  [
792
- 'label' => __( 'Image', 'themeisle-companion' ),
793
- 'tab' => Controls_Manager::TAB_STYLE,
794
  'condition' => [
795
  'section_grid_image.grid_image_hide' => '',
796
  ],
@@ -802,12 +805,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
802
  'grid_image_style_border_radius',
803
  [
804
  'label' => __( 'Border Radius', 'themeisle-companion' ),
805
- 'type' => Controls_Manager::DIMENSIONS,
806
  'size_units' => [ 'px', '%' ],
807
  'selectors' => [
808
  '{{WRAPPER}} .obfx-grid-col-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
809
  ],
810
- 'condition' => [
811
  'section_grid_image.grid_image_hide' => '',
812
  ],
813
  ]
@@ -815,7 +818,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
815
 
816
  // Image box shadow.
817
  $this->add_group_control(
818
- Group_Control_Box_Shadow::get_type(),
819
  [
820
  'name' => 'grid_image_style_box_shadow',
821
  'selector' => '{{WRAPPER}} .obfx-grid-col-image',
@@ -831,12 +834,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
831
  'grid_image_style_margin',
832
  [
833
  'label' => __( 'Margin', 'themeisle-companion' ),
834
- 'type' => Controls_Manager::DIMENSIONS,
835
  'size_units' => [ 'px' ],
836
  'selectors' => [
837
  '{{WRAPPER}} .obfx-grid-col-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
838
  ],
839
- 'condition' => [
840
  'section_grid_image.grid_image_hide' => '',
841
  ],
842
  ]
@@ -853,8 +856,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
853
  $this->start_controls_section(
854
  'section_grid_title_style',
855
  [
856
- 'label' => __( 'Title', 'themeisle-companion' ),
857
- 'tab' => Controls_Manager::TAB_STYLE,
858
  'condition' => [
859
  'section_grid_title.grid_title_hide' => '',
860
  ],
@@ -863,10 +866,10 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
863
 
864
  // Title typography.
865
  $this->add_group_control(
866
- Group_Control_Typography::get_type(),
867
  [
868
  'name' => 'grid_title_style_typography',
869
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
870
  'selector' => '{{WRAPPER}} .obfx-grid-title',
871
  ]
872
  );
@@ -875,14 +878,14 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
875
  $this->add_control(
876
  'grid_title_style_color',
877
  [
878
- 'type' => Controls_Manager::COLOR,
879
  'label' => __( 'Color', 'themeisle-companion' ),
880
  'scheme' => [
881
- 'type' => Scheme_Color::get_type(),
882
- 'value' => Scheme_Color::COLOR_1,
883
  ],
884
  'selectors' => [
885
- '{{WRAPPER}} .obfx-grid-title' => 'color: {{VALUE}};',
886
  '{{WRAPPER}} .obfx-grid-title a' => 'color: {{VALUE}};',
887
  ],
888
  ]
@@ -893,7 +896,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
893
  'grid_title_style_margin',
894
  [
895
  'label' => __( 'Margin', 'themeisle-companion' ),
896
- 'type' => Controls_Manager::DIMENSIONS,
897
  'size_units' => [ 'px' ],
898
  'selectors' => [
899
  '{{WRAPPER}} .obfx-grid-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -912,8 +915,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
912
  $this->start_controls_section(
913
  'section_grid_meta_style',
914
  [
915
- 'label' => __( 'Meta', 'themeisle-companion' ),
916
- 'tab' => Controls_Manager::TAB_STYLE,
917
  'condition' => [
918
  'section_grid_meta.grid_meta_hide' => '',
919
  ],
@@ -922,10 +925,10 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
922
 
923
  // Meta typography.
924
  $this->add_group_control(
925
- Group_Control_Typography::get_type(),
926
  [
927
  'name' => 'grid_meta_style_typography',
928
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
929
  'selector' => '{{WRAPPER}} .obfx-grid-meta',
930
  ]
931
  );
@@ -934,16 +937,16 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
934
  $this->add_control(
935
  'grid_meta_style_color',
936
  [
937
- 'type' => Controls_Manager::COLOR,
938
  'label' => __( 'Color', 'themeisle-companion' ),
939
  'scheme' => [
940
- 'type' => Scheme_Color::get_type(),
941
- 'value' => Scheme_Color::COLOR_1,
942
  ],
943
  'selectors' => [
944
- '{{WRAPPER}} .obfx-grid-meta' => 'color: {{VALUE}};',
945
  '{{WRAPPER}} .obfx-grid-meta span' => 'color: {{VALUE}};',
946
- '{{WRAPPER}} .obfx-grid-meta a' => 'color: {{VALUE}};',
947
  ],
948
  ]
949
  );
@@ -953,7 +956,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
953
  'grid_meta_style_margin',
954
  [
955
  'label' => __( 'Margin', 'themeisle-companion' ),
956
- 'type' => Controls_Manager::DIMENSIONS,
957
  'size_units' => [ 'px' ],
958
  'selectors' => [
959
  '{{WRAPPER}} .obfx-grid-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -973,17 +976,17 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
973
  'section_grid_content_style',
974
  [
975
  'label' => __( 'Content', 'themeisle-companion' ),
976
- 'tab' => Controls_Manager::TAB_STYLE,
977
  ]
978
  );
979
 
980
  // Content typography.
981
  $this->add_group_control(
982
- Group_Control_Typography::get_type(),
983
  [
984
- 'name' => 'grid_content_style_typography',
985
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
986
- 'selector' => '{{WRAPPER}} .obfx-grid-content',
987
  'condition' => [
988
  'section_grid_content.grid_content_hide' => '',
989
  ],
@@ -994,11 +997,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
994
  $this->add_control(
995
  'grid_content_style_color',
996
  [
997
- 'type' => Controls_Manager::COLOR,
998
  'label' => __( 'Color', 'themeisle-companion' ),
999
  'scheme' => [
1000
- 'type' => Scheme_Color::get_type(),
1001
- 'value' => Scheme_Color::COLOR_1,
1002
  ],
1003
  'selectors' => [
1004
  '{{WRAPPER}} .obfx-grid-content' => 'color: {{VALUE}};',
@@ -1014,12 +1017,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1014
  'grid_content_style_margin',
1015
  [
1016
  'label' => __( 'Margin', 'themeisle-companion' ),
1017
- 'type' => Controls_Manager::DIMENSIONS,
1018
  'size_units' => [ 'px' ],
1019
  'selectors' => [
1020
  '{{WRAPPER}} .obfx-grid-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1021
  ],
1022
- 'condition' => [
1023
  'section_grid_content.grid_content_hide' => '',
1024
  ],
1025
  ]
@@ -1029,26 +1032,26 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1029
  $this->add_control(
1030
  'grid_content_price_style_heading',
1031
  [
1032
- 'label' => __( 'Price', 'themeisle-companion' ),
1033
- 'type' => Controls_Manager::HEADING,
1034
  'separator' => 'before',
1035
  'condition' => [
1036
  'section_grid_content.grid_content_price' => 'yes',
1037
- 'section_grid.grid_post_type' => 'product',
1038
  ],
1039
  ]
1040
  );
1041
 
1042
  // Price typography.
1043
  $this->add_group_control(
1044
- Group_Control_Typography::get_type(),
1045
  [
1046
- 'name' => 'grid_content_price_style_typography',
1047
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1048
- 'selector' => '{{WRAPPER}} .obfx-grid-price',
1049
  'condition' => [
1050
  'section_grid_content.grid_content_price' => 'yes',
1051
- 'section_grid.grid_post_type' => 'product',
1052
  ],
1053
  ]
1054
  );
@@ -1057,18 +1060,18 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1057
  $this->add_control(
1058
  'grid_content_price_style_color',
1059
  [
1060
- 'type' => Controls_Manager::COLOR,
1061
  'label' => __( 'Color', 'themeisle-companion' ),
1062
  'scheme' => [
1063
- 'type' => Scheme_Color::get_type(),
1064
- 'value' => Scheme_Color::COLOR_1,
1065
  ],
1066
  'selectors' => [
1067
  '{{WRAPPER}} .obfx-grid-price' => 'color: {{VALUE}};',
1068
  ],
1069
  'condition' => [
1070
  'section_grid_content.grid_content_price' => 'yes',
1071
- 'section_grid.grid_post_type' => 'product',
1072
  ],
1073
  ]
1074
  );
@@ -1078,14 +1081,14 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1078
  'grid_content_price_style_margin',
1079
  [
1080
  'label' => __( 'Margin', 'themeisle-companion' ),
1081
- 'type' => Controls_Manager::DIMENSIONS,
1082
  'size_units' => [ 'px' ],
1083
  'selectors' => [
1084
  '{{WRAPPER}} .obfx-grid-price' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1085
  ],
1086
- 'condition' => [
1087
  'section_grid_content.grid_content_price' => 'yes',
1088
- 'section_grid.grid_post_type' => 'product',
1089
  ],
1090
  ]
1091
  );
@@ -1104,8 +1107,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1104
  $this->add_control(
1105
  'grid_button_style_heading',
1106
  [
1107
- 'label' => __( 'Button', 'themeisle-companion' ),
1108
- 'type' => Controls_Manager::HEADING,
1109
  'separator' => 'before',
1110
  'condition' => [
1111
  'section_grid_content.grid_content_default_btn!' => '',
@@ -1116,11 +1119,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1116
 
1117
  // Content typography.
1118
  $this->add_group_control(
1119
- Group_Control_Typography::get_type(),
1120
  [
1121
- 'name' => 'grid_button_style_typography',
1122
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1123
- 'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1124
  'condition' => [
1125
  'section_grid_content.grid_content_default_btn!' => '',
1126
  'section_grid_content.grid_content_product_btn!' => '',
@@ -1134,7 +1137,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1134
  $this->start_controls_tab(
1135
  'grid_button_style_normal',
1136
  [
1137
- 'label' => __( 'Normal', 'themeisle-companion' ),
1138
  'condition' => [
1139
  'section_grid_content.grid_content_default_btn!' => '',
1140
  'section_grid_content.grid_content_product_btn!' => '',
@@ -1146,11 +1149,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1146
  $this->add_control(
1147
  'grid_button_style_normal_text_color',
1148
  [
1149
- 'type' => Controls_Manager::COLOR,
1150
  'label' => __( 'Text Color', 'themeisle-companion' ),
1151
  'scheme' => [
1152
- 'type' => Scheme_Color::get_type(),
1153
- 'value' => Scheme_Color::COLOR_1,
1154
  ],
1155
  'separator' => '',
1156
  'selectors' => [
@@ -1167,11 +1170,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1167
  $this->add_control(
1168
  'grid_button_style_normal_bg_color',
1169
  [
1170
- 'type' => Controls_Manager::COLOR,
1171
  'label' => __( 'Background Color', 'themeisle-companion' ),
1172
  'scheme' => [
1173
- 'type' => Scheme_Color::get_type(),
1174
- 'value' => Scheme_Color::COLOR_1,
1175
  ],
1176
  'separator' => '',
1177
  'selectors' => [
@@ -1186,7 +1189,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1186
 
1187
  // Normal box shadow.
1188
  $this->add_group_control(
1189
- Group_Control_Box_Shadow::get_type(),
1190
  [
1191
  'name' => 'grid_button_style_normal_box_shadow',
1192
  'selector' => '{{WRAPPER}} .obfx-grid-footer a',
@@ -1204,7 +1207,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1204
  $this->start_controls_tab(
1205
  'grid_button_style_hover',
1206
  [
1207
- 'label' => __( 'Hover', 'themeisle-companion' ),
1208
  'condition' => [
1209
  'section_grid_content.grid_content_default_btn!' => '',
1210
  'section_grid_content.grid_content_product_btn!' => '',
@@ -1216,11 +1219,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1216
  $this->add_control(
1217
  'grid_button_style_hover_text_color',
1218
  [
1219
- 'type' => Controls_Manager::COLOR,
1220
  'label' => __( 'Text Color', 'themeisle-companion' ),
1221
  'scheme' => [
1222
- 'type' => Scheme_Color::get_type(),
1223
- 'value' => Scheme_Color::COLOR_1,
1224
  ],
1225
  'separator' => '',
1226
  'selectors' => [
@@ -1237,11 +1240,11 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1237
  $this->add_control(
1238
  'grid_button_style_hover_bg_color',
1239
  [
1240
- 'type' => Controls_Manager::COLOR,
1241
  'label' => __( 'Background Color', 'themeisle-companion' ),
1242
  'scheme' => [
1243
- 'type' => Scheme_Color::get_type(),
1244
- 'value' => Scheme_Color::COLOR_1,
1245
  ],
1246
  'separator' => '',
1247
  'selectors' => [
@@ -1256,7 +1259,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1256
 
1257
  // Hover box shadow.
1258
  $this->add_group_control(
1259
- Group_Control_Box_Shadow::get_type(),
1260
  [
1261
  'name' => 'grid_button_style_hover_box_shadow',
1262
  'selector' => '{{WRAPPER}} .obfx-grid-footer a:hover',
@@ -1277,12 +1280,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1277
  'grid_button_style_padding',
1278
  [
1279
  'label' => __( 'Button padding', 'themeisle-companion' ),
1280
- 'type' => Controls_Manager::DIMENSIONS,
1281
  'size_units' => [ 'px' ],
1282
  'selectors' => [
1283
  '{{WRAPPER}} .obfx-grid-footer a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1284
  ],
1285
- 'condition' => [
1286
  'section_grid_content.grid_content_default_btn!' => '',
1287
  'section_grid_content.grid_content_product_btn!' => '',
1288
  ],
@@ -1294,12 +1297,12 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1294
  'grid_button_style_border_radius',
1295
  [
1296
  'label' => __( 'Button border radius', 'themeisle-companion' ),
1297
- 'type' => Controls_Manager::DIMENSIONS,
1298
  'size_units' => [ 'px', '%' ],
1299
  'selectors' => [
1300
  '{{WRAPPER}} .obfx-grid-footer a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1301
  ],
1302
- 'condition' => [
1303
  'section_grid_content.grid_content_default_btn!' => '',
1304
  'section_grid_content.grid_content_product_btn!' => '',
1305
  ],
@@ -1315,8 +1318,8 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1315
  $this->start_controls_section(
1316
  'section_grid_pagination_style',
1317
  [
1318
- 'label' => __( 'Pagination', 'themeisle-companion' ),
1319
- 'tab' => Controls_Manager::TAB_STYLE,
1320
  'condition' => [
1321
  'section_grid.grid_pagination' => 'yes',
1322
  ],
@@ -1328,7 +1331,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1328
  'grid_pagination_style_margin',
1329
  [
1330
  'label' => __( 'Margin', 'themeisle-companion' ),
1331
- 'type' => Controls_Manager::DIMENSIONS,
1332
  'size_units' => [ 'px' ],
1333
  'selectors' => [
1334
  '{{WRAPPER}} .obfx-grid-pagination .pagination' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -1340,62 +1343,141 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1340
  }
1341
 
1342
  /**
1343
- * Display categories in meta section.
1344
  */
1345
- protected function metaGridCategories() {
 
1346
  $settings = $this->get_settings();
1347
- $post_type_category = get_the_category();
1348
- $maxCategories = $settings['grid_meta_categories_max'] ? $settings['grid_meta_categories_max'] : '-1';
1349
- $i = 0; // counter
1350
 
1351
- if ( $post_type_category ) { ?>
1352
- <span class="obfx-grid-categories">
1353
- <?php
1354
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-bookmark"></i>' : '';
1355
 
1356
- foreach ( $post_type_category as $category ) {
1357
- if ( $i == $maxCategories ) {
1358
- break;
1359
- }
1360
- ?>
1361
- <span class="obfx-grid-categories-item"><a href="<?php echo get_category_link( $category->term_id ); ?>" title="<?php echo $category->name; ?>"><?php echo $category->name; ?></a></span>
1362
- <?php
1363
- $i++;
1364
- }
1365
- ?>
1366
- </span>
1367
- <?php
 
 
 
 
1368
  }
1369
- }
1370
 
1371
- /**
1372
- * Display tags in meta section.
1373
- */
1374
- protected function metaGridTags() {
1375
- $settings = $this->get_settings();
1376
- $post_type_tags = get_the_tags();
1377
- $maxTags = $settings['grid_meta_tags_max'] ? $settings['grid_meta_tags_max'] : '-1';
1378
- $i = 0; // counter
1379
 
1380
- if ( $post_type_tags ) {
1381
- ?>
1382
- <span class="obfx-grid-tags">
1383
- <?php
1384
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-tags"></i>' : '';
 
 
 
 
 
 
1385
 
1386
- foreach ( $post_type_tags as $tag ) {
1387
- if ( $i == $maxTags ) {
1388
- break;
1389
- }
1390
- ?>
1391
- <span class="obfx-grid-tags-item"><a href="<?php echo get_tag_link( $tag->term_id ); ?>" title="<?php echo $tag->name; ?>"><?php echo $tag->name; ?></a></span>
1392
- <?php
1393
- $i++;
1394
- }
1395
- ?>
1396
- </span>
1397
- <?php
1398
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1399
  }
1400
 
1401
  /**
@@ -1410,7 +1492,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1410
  if ( has_post_thumbnail() ) {
1411
 
1412
  if ( $settings['grid_image_link'] == 'yes' ) {
1413
- ?>
1414
  <div class="obfx-grid-col-image">
1415
  <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
1416
  <?php
@@ -1419,8 +1501,7 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1419
  'class' => 'img-responsive',
1420
  'alt' => get_the_title( get_post_thumbnail_id() ),
1421
  )
1422
- );
1423
- ?>
1424
  </a>
1425
  </div>
1426
  <?php } else { ?>
@@ -1431,11 +1512,10 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1431
  'class' => 'img-responsive',
1432
  'alt' => get_the_title( get_post_thumbnail_id() ),
1433
  )
1434
- );
1435
- ?>
1436
  </div>
1437
- <?php
1438
- }
1439
  }
1440
  }
1441
  }
@@ -1446,22 +1526,18 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1446
  protected function renderTitle() {
1447
  $settings = $this->get_settings();
1448
 
1449
- if ( $settings['grid_title_hide'] !== 'yes' ) {
1450
- ?>
1451
  <<?php echo $settings['grid_title_tag']; ?> class="entry-title obfx-grid-title">
1452
  <?php if ( $settings['grid_title_link'] == 'yes' ) { ?>
1453
  <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
1454
- <?php
1455
- the_title();
1456
- ?>
1457
- </a>
1458
- <?php
1459
- } else {
1460
- the_title();
1461
- }
1462
- ?>
1463
  </<?php echo $settings['grid_title_tag']; ?>>
1464
- <?php
1465
  }
1466
  }
1467
 
@@ -1472,66 +1548,61 @@ class OBFX_Elementor_Widget_Posts_Grid extends Widget_Base {
1472
  $settings = $this->get_settings();
1473
 
1474
  if ( $settings['grid_meta_hide'] !== 'yes' ) {
1475
- if ( ! empty( $settings['grid_meta_display'] ) ) {
1476
- ?>
1477
  <div class="entry-meta obfx-grid-meta">
1478
 
1479
- <?php
1480
- foreach ( $settings['grid_meta_display'] as $meta ) {
1481
 
1482
- switch ( $meta ) :
1483
- // Author
1484
- case 'author':
1485
- ?>
1486
- <span class="obfx-grid-author">
1487
- <?php
1488
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-user"></i>' : '';
1489
 
1490
- echo get_the_author();
1491
- ?>
1492
- </span>
1493
- <?php
1494
- // Date
1495
- break; case 'date':
1496
- ?>
1497
- <span class="obfx-grid-date">
1498
  <?php
1499
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-calendar"></i>' : '';
1500
-
1501
- echo get_the_date();
1502
- ?>
1503
- </span>
1504
- <?php
1505
- // Category
1506
- break; case 'category':
1507
- $this->metaGridCategories();
 
 
 
 
1508
 
1509
  // Tags
1510
- break; case 'tags':
1511
- $this->metaGridTags();
 
1512
 
1513
  // Comments/Reviews
1514
- break; case 'comments':
1515
- ?>
1516
- <span class="obfx-grid-comments">
 
 
 
 
 
 
 
 
 
1517
  <?php
1518
- echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-comment"></i>' : '';
1519
-
1520
- if ( $settings['grid_post_type'] == 'product' ) {
1521
- echo comments_number( __( 'No reviews', 'themeisle-companion' ), __( '1 review', 'themeisle-companion' ), __( '% reviews', 'themeisle-companion' ) );
1522
- } else {
1523
- echo comments_number( __( 'No comments', 'themeisle-companion' ), __( '1 comment', 'themeisle-companion' ), __( '% comments', 'themeisle-companion' ) );
1524
- }
1525
- ?>
1526
- </span>
1527
- <?php
1528
- break;
1529
- endswitch;
1530
- } // End foreach().
1531
- ?>
1532
 
1533
  </div>
1534
- <?php
1535
  }// End if().
1536
  }// End if().
1537
  }
@@ -1540,27 +1611,30 @@ endswitch;
1540
  * Display price if post type is product.
1541
  */
1542
  protected function renderPrice() {
 
 
 
 
 
1543
  $settings = $this->get_settings();
1544
- $product = wc_get_product( get_the_ID() );
1545
 
1546
- if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_price'] == 'yes' ) {
1547
- ?>
1548
  <div class="obfx-grid-price">
1549
  <?php
1550
- $price = $product->get_price_html();
1551
  if ( ! empty( $price ) ) {
1552
  echo wp_kses(
1553
  $price, array(
1554
  'span' => array(
1555
  'class' => array(),
1556
  ),
1557
- 'del' => array(),
1558
  )
1559
  );
1560
- }
1561
- ?>
1562
  </div>
1563
- <?php
1564
  }
1565
  }
1566
 
@@ -1568,6 +1642,11 @@ endswitch;
1568
  * Display Add to Cart button.
1569
  */
1570
  protected function renderAddToCart() {
 
 
 
 
 
1571
  $product = wc_get_product( get_the_ID() );
1572
 
1573
  echo apply_filters(
@@ -1587,18 +1666,16 @@ endswitch;
1587
  protected function renderContent() {
1588
  $settings = $this->get_settings();
1589
 
1590
- if ( $settings['grid_content_hide'] !== 'yes' ) {
1591
- ?>
1592
  <div class="entry-content obfx-grid-content">
1593
  <?php
1594
  if ( empty( $settings['grid_content_length'] ) ) {
1595
  the_excerpt();
1596
  } else {
1597
  echo wp_trim_words( get_the_excerpt(), $settings['grid_content_length'] );
1598
- }
1599
- ?>
1600
  </div>
1601
- <?php
1602
  }
1603
  }
1604
 
@@ -1608,154 +1685,97 @@ endswitch;
1608
  protected function renderButton() {
1609
  $settings = $this->get_settings();
1610
 
1611
- if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_product_btn'] == 'yes' ) {
1612
- ?>
1613
  <div class="obfx-grid-footer">
1614
  <?php $this->renderAddToCart(); ?>
1615
  </div>
1616
  <?php } elseif ( $settings['grid_content_default_btn'] == 'yes' && ! empty( $settings['grid_content_default_btn_text'] ) ) { ?>
1617
  <div class="obfx-grid-footer">
1618
- <a href="<?php echo get_the_permalink(); ?>" title="<?php echo $settings['grid_content_default_btn_text']; ?>"><?php echo $settings['grid_content_default_btn_text']; ?></a>
 
1619
  </div>
1620
- <?php
1621
- }
1622
  }
1623
 
1624
  /**
1625
- * Render function to output the post type grid.
1626
  */
1627
- protected function render() {
1628
- // Get settings.
1629
- $settings = $this->get_settings();
1630
-
1631
- // Output.
1632
- echo '<div class="obfx-grid">';
1633
- echo '<div class="obfx-grid-container' . ( ! empty( $settings['grid_style'] ) && $settings['grid_style'] == 'list' ? ' obfx-grid-style-' . $settings['grid_style'] : '' ) . ( ! 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'] : '' ) . '">';
1634
-
1635
- // Arguments for query.
1636
- $args = array();
1637
-
1638
- // Display only published posts.
1639
- $args['post_status'] = 'publish';
1640
-
1641
- // Ignore sticky posts.
1642
- $args['ignore_sticky_posts'] = 1;
1643
-
1644
- // Check if post type exists.
1645
- if ( ! empty( $settings['grid_post_type'] ) && post_type_exists( $settings['grid_post_type'] ) ) {
1646
- $args['post_type'] = $settings['grid_post_type'];
1647
- }
1648
 
1649
- // Display posts in category.
1650
- if ( ! empty( $settings['grid_post_categories'] ) && $settings['grid_post_type'] == 'post' ) {
1651
- $args['category_name'] = $settings['grid_post_categories'];
1652
- }
1653
 
1654
- // Display products in category.
1655
- if ( ! empty( $settings['grid_product_categories'] ) && $settings['grid_post_type'] == 'product' ) {
1656
- $args['tax_query'] = array(
1657
- 'relation' => 'AND',
1658
- array(
1659
- 'taxonomy' => 'product_cat',
1660
- 'field' => 'slug',
1661
- 'terms' => $settings['grid_product_categories'],
1662
- ),
1663
- );
 
 
 
 
1664
  }
 
1665
 
1666
- // Items to display.
1667
- if ( ! empty( $settings['grid_items'] ) && intval( $settings['grid_items'] ) == $settings['grid_items'] ) {
1668
- $args['posts_per_page'] = $settings['grid_items'];
1669
- }
 
 
 
 
1670
 
1671
- // Order by.
1672
- if ( ! empty( $settings['grid_order_by'] ) ) {
1673
- $args['orderby'] = $settings['grid_order_by'];
1674
- }
1675
 
1676
- // Pagination.
1677
- if ( ! empty( $settings['grid_pagination'] ) ) {
1678
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
1679
- $args['paged'] = $paged;
 
 
 
 
 
 
 
 
 
 
1680
  }
 
1681
 
1682
- // Query.
1683
- $query = new \WP_Query( $args );
1684
-
1685
- // Query results.
1686
- if ( $query->have_posts() ) {
1687
- while ( $query->have_posts() ) {
1688
- $query->the_post();
1689
-
1690
- echo '<div class="obfx-grid-wrapper">';
1691
- echo '<article class="obfx-grid-col' . ( $settings['grid_image_hide'] == 'yes' || ! has_post_thumbnail() ? ' obfx-no-image' : '' ) . '">';
1692
-
1693
- // Image.
1694
- $this->renderImage();
1695
-
1696
- echo '<div class="obfx-grid-col-content">';
1697
- // Title.
1698
- $this->renderTitle();
1699
-
1700
- // Meta.
1701
- $this->renderMeta();
1702
-
1703
- // Content.
1704
- $this->renderContent();
1705
-
1706
- // Price.
1707
- if ( class_exists( 'WooCommerce' ) ) {
1708
- $this->renderPrice();
1709
- }
1710
-
1711
- // Button.
1712
- $this->renderButton();
1713
-
1714
- echo '</div><!-- .obfx-grid-col-content -->';
1715
- echo '</article>';
1716
- echo '</div>';
1717
-
1718
- } // End while().
1719
-
1720
- // Pagination.
1721
- if ( ! empty( $settings['grid_pagination'] ) ) {
1722
- ?>
1723
- <div class="obfx-grid-pagination">
1724
- <?php
1725
- $big = 999999999;
1726
- $totalpages = $query->max_num_pages;
1727
- $current = max( 1, $paged );
1728
- $paginate_args = array(
1729
- 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
1730
- 'format' => '?paged=%#%',
1731
- 'current' => $current,
1732
- 'total' => $totalpages,
1733
- 'show_all' => false,
1734
- 'end_size' => 1,
1735
- 'mid_size' => 3,
1736
- 'prev_next' => true,
1737
- 'prev_text' => esc_html__( 'Previous', 'themeisle-companion' ),
1738
- 'next_text' => esc_html__( 'Next', 'themeisle-companion' ),
1739
- 'type' => 'plain',
1740
- 'add_args' => false,
1741
- );
1742
-
1743
- $pagination = paginate_links( $paginate_args );
1744
- ?>
1745
- <nav class="pagination">
1746
- <?php echo $pagination; ?>
1747
- </nav>
1748
- </div>
1749
  <?php
1750
- }
1751
- } // End if().
1752
-
1753
- // Restore original data.
1754
- wp_reset_postdata();
1755
-
1756
- echo '</div><!-- .obfx-grid-container -->';
1757
-
1758
- echo '</div><!-- .obfx-grid -->';
1759
  }
1760
  }
1761
 
1
  <?php
2
  /**
3
+ * Post Grid widget for Elementor builder
4
  *
5
  * @link https://themeisle.com
6
  * @since 1.0.0
7
  *
8
+ * @package ThemeIsle\ElementorExtraWidgets
9
  */
 
10
 
11
+ namespace ThemeIsle\ElementorExtraWidgets;
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  } // End if().
16
 
17
  /**
18
+ * Class Posts_Grid
19
  *
20
+ * @package ThemeIsle\ElementorExtraWidgets
21
  */
22
+ class Posts_Grid extends \Elementor\Widget_Base {
23
 
24
  /**
25
  * Widget title.
54
  * @return array
55
  */
56
  public function get_categories() {
57
+ $category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
58
+ $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
59
+ return [ $slug ];
60
  }
61
 
62
  /**
122
  }
123
  }
124
  }
125
+
126
  return $options;
127
  }
128
 
161
  $this->add_control(
162
  'grid_post_type',
163
  [
164
+ 'type' => \Elementor\Controls_Manager::SELECT,
165
  'label' => '<i class="fa fa-tag"></i> ' . __( 'Post Type', 'themeisle-companion' ),
166
  'default' => 'post',
167
  'options' => $this->grid_get_all_post_types(),
172
  $this->add_control(
173
  'grid_post_categories',
174
  [
175
+ 'type' => \Elementor\Controls_Manager::SELECT,
176
+ 'label' => '<i class="fa fa-folder"></i> ' . __( 'Category', 'themeisle-companion' ),
177
+ 'options' => $this->grid_get_all_post_type_categories( 'post' ),
178
  'condition' => [
179
  'grid_post_type' => 'post',
180
  ],
185
  $this->add_control(
186
  'grid_product_categories',
187
  [
188
+ 'type' => \Elementor\Controls_Manager::SELECT,
189
+ 'label' => '<i class="fa fa-tag"></i> ' . __( 'Category', 'themeisle-companion' ),
190
+ 'options' => $this->grid_get_all_post_type_categories( 'product' ),
191
  'condition' => [
192
  'grid_post_type' => 'product',
193
  ],
198
  $this->add_control(
199
  'grid_style',
200
  [
201
+ 'type' => \Elementor\Controls_Manager::SELECT,
202
  'label' => '<i class="fa fa-paint-brush"></i> ' . __( 'Style', 'themeisle-companion' ),
203
  'default' => 'grid',
204
  'options' => [
205
+ 'grid' => __( 'Grid', 'themeisle-companion' ),
206
  'list' => __( 'List', 'themeisle-companion' ),
207
  ],
208
  ]
212
  $this->add_control(
213
  'grid_items',
214
  [
215
+ 'type' => \Elementor\Controls_Manager::NUMBER,
216
  'label' => '<i class="fa fa-th-large"></i> ' . __( 'Items', 'themeisle-companion' ),
217
  'placeholder' => __( 'How many items?', 'themeisle-companion' ),
218
  'default' => 6,
223
  $this->add_responsive_control(
224
  'grid_columns',
225
  [
226
+ 'type' => \Elementor\Controls_Manager::SELECT,
227
+ 'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
228
+ 'default' => 3,
229
  'tablet_default' => 2,
230
  'mobile_default' => 1,
231
+ 'options' => [
232
  1 => 1,
233
  2 => 2,
234
  3 => 3,
242
  $this->add_control(
243
  'grid_order_by',
244
  [
245
+ 'type' => \Elementor\Controls_Manager::SELECT,
246
  'label' => '<i class="fa fa-sort"></i> ' . __( 'Order by', 'themeisle-companion' ),
247
  'default' => 'date',
248
  'options' => [
259
  $this->add_control(
260
  'grid_pagination',
261
  [
262
+ 'label' => '<i class="fa fa-arrow-circle-right"></i> ' . __( 'Pagination', 'themeisle-companion' ),
263
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
264
  'default' => '',
265
  ]
266
  );
283
  $this->add_control(
284
  'grid_image_hide',
285
  [
286
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
287
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
288
  'default' => '',
289
  ]
290
  );
293
  $this->add_control(
294
  'grid_image_height',
295
  [
296
+ 'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Image height', 'themeisle-companion' ),
297
+ 'type' => \Elementor\Controls_Manager::SLIDER,
298
+ 'default' => [
299
  'size' => 220,
300
  ],
301
+ 'range' => [
302
  'px' => [
303
+ 'min' => 1,
304
+ 'max' => 1000,
305
  'step' => 1,
306
  ],
307
  ],
315
  $this->add_control(
316
  'grid_image_link',
317
  [
318
+ 'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'themeisle-companion' ),
319
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
320
  'default' => 'yes',
321
  ]
322
  );
331
  $this->start_controls_section(
332
  'section_grid_title',
333
  [
334
+ 'label' => __( 'Title', 'themeisle-companion' ),
335
  ]
336
  );
337
 
339
  $this->add_control(
340
  'grid_title_hide',
341
  [
342
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
343
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
344
  'default' => '',
345
  ]
346
  );
349
  $this->add_control(
350
  'grid_title_tag',
351
  [
352
+ 'type' => \Elementor\Controls_Manager::SELECT,
353
  'label' => '<i class="fa fa-code"></i> ' . __( 'Tag', 'themeisle-companion' ),
354
  'default' => 'h2',
355
  'options' => [
356
+ 'h1' => 'H1',
357
+ 'h2' => 'H2',
358
+ 'h3' => 'H3',
359
+ 'h4' => 'H4',
360
+ 'h5' => 'H5',
361
+ 'h6' => 'H6',
362
  'span' => 'span',
363
+ 'p' => 'p',
364
+ 'div' => 'div',
365
  ],
366
  ]
367
  );
370
  $this->add_control(
371
  'grid_title_link',
372
  [
373
+ 'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'themeisle-companion' ),
374
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
375
  'default' => 'yes',
376
  ]
377
  );
386
  $this->start_controls_section(
387
  'section_grid_meta',
388
  [
389
+ 'label' => __( 'Meta', 'themeisle-companion' ),
390
  ]
391
  );
392
 
394
  $this->add_control(
395
  'grid_meta_hide',
396
  [
397
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
398
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
399
  'default' => '',
400
  ]
401
  );
404
  $this->add_control(
405
  'grid_meta_display',
406
  [
407
+ 'label' => '<i class="fa fa-info-circle"></i> ' . __( 'Display', 'themeisle-companion' ),
408
  'label_block' => true,
409
+ 'type' => \Elementor\Controls_Manager::SELECT2,
410
+ 'default' => [ 'author', 'date' ],
411
+ 'multiple' => true,
412
+ 'options' => [
413
+ 'author' => __( 'Author', 'themeisle-companion' ),
414
+ 'date' => __( 'Date', 'themeisle-companion' ),
415
  'category' => __( 'Category', 'themeisle-companion' ),
416
+ 'tags' => __( 'Tags', 'themeisle-companion' ),
417
  'comments' => __( 'Comments', 'themeisle-companion' ),
418
  ],
419
  ]
423
  $this->add_control(
424
  'grid_meta_categories_max',
425
  [
426
+ 'type' => \Elementor\Controls_Manager::NUMBER,
427
  'label' => __( 'No. of Categories', 'themeisle-companion' ),
428
  'placeholder' => __( 'How many categories to display?', 'themeisle-companion' ),
429
  'default' => __( '1', 'themeisle-companion' ),
430
+ 'condition' => [
431
  'grid_meta_display' => 'category',
432
  ],
433
  ]
437
  $this->add_control(
438
  'grid_meta_tags_max',
439
  [
440
+ 'type' => \Elementor\Controls_Manager::NUMBER,
441
  'label' => __( 'No. of Tags', 'themeisle-companion' ),
442
  'placeholder' => __( 'How many tags to display?', 'themeisle-companion' ),
443
+ 'condition' => [
444
  'grid_meta_display' => 'tags',
445
  ],
446
  ]
450
  $this->add_control(
451
  'grid_meta_remove_icons',
452
  [
453
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Remove icons', 'themeisle-companion' ),
454
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
455
  'default' => '',
456
  ]
457
  );
466
  $this->start_controls_section(
467
  'section_grid_content',
468
  [
469
+ 'label' => __( 'Content', 'themeisle-companion' ),
470
  ]
471
  );
472
 
474
  $this->add_control(
475
  'grid_content_hide',
476
  [
477
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
478
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
479
  'default' => '',
480
  ]
481
  );
484
  $this->add_control(
485
  'grid_content_length',
486
  [
487
+ 'type' => \Elementor\Controls_Manager::NUMBER,
488
  'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Length (words)', 'themeisle-companion' ),
489
  'placeholder' => __( 'Length of content (words)', 'themeisle-companion' ),
490
  'default' => 30,
495
  $this->add_control(
496
  'grid_content_price',
497
  [
498
+ 'label' => '<i class="fa fa-usd"></i> ' . __( 'Price', 'themeisle-companion' ),
499
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
500
+ 'default' => 'yes',
501
  'condition' => [
502
  'section_grid.grid_post_type' => 'product',
503
  ],
508
  $this->add_control(
509
  'grid_content_default_btn',
510
  [
511
+ 'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'themeisle-companion' ),
512
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
513
+ 'default' => 'yes',
514
  'condition' => [
515
  'section_grid.grid_post_type!' => 'product',
516
  ],
521
  $this->add_control(
522
  'grid_content_default_btn_text',
523
  [
524
+ 'type' => \Elementor\Controls_Manager::TEXT,
525
  'label' => __( 'Button text', 'themeisle-companion' ),
526
  'placeholder' => __( 'Read more', 'themeisle-companion' ),
527
  'default' => __( 'Read more', 'themeisle-companion' ),
528
+ 'condition' => [
529
+ 'grid_content_default_btn!' => '',
530
  'section_grid.grid_post_type!' => 'product',
531
  ],
532
  ]
536
  $this->add_control(
537
  'grid_content_product_btn',
538
  [
539
+ 'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'themeisle-companion' ),
540
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
541
+ 'default' => 'yes',
542
  'condition' => [
543
  'section_grid.grid_post_type' => 'product',
544
  ],
549
  $this->add_responsive_control(
550
  'grid_content_btn_alignment',
551
  [
552
+ 'label' => __( 'Button alignment', 'themeisle-companion' ),
553
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
554
+ 'options' => [
555
  'left' => [
556
  'title' => __( 'Left', 'themeisle-companion' ),
557
  'icon' => 'fa fa-align-left',
569
  'icon' => 'fa fa-align-justify',
570
  ],
571
  ],
572
+ 'default' => 'left',
573
+ 'tablet_default' => 'left',
574
+ 'mobile_default' => 'center',
575
+ 'selectors' => [
576
  '{{WRAPPER}} .obfx-grid-footer' => 'text-align: {{VALUE}};',
577
  ],
578
+ 'condition' => [
579
  'grid_content_btn!' => '',
580
  ],
581
  ]
585
  $this->add_responsive_control(
586
  'grid_content_alignment',
587
  [
588
+ 'label' => '<i class="fa fa-align-right"></i> ' . __( 'Alignment', 'themeisle-companion' ),
589
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
590
+ 'options' => [
591
+ 'left' => [
592
  'title' => __( 'Left', 'themeisle-companion' ),
593
  'icon' => 'fa fa-align-left',
594
  ],
595
+ 'center' => [
596
  'title' => __( 'Center', 'themeisle-companion' ),
597
  'icon' => 'fa fa-align-center',
598
  ],
599
+ 'right' => [
600
  'title' => __( 'Right', 'themeisle-companion' ),
601
  'icon' => 'fa fa-align-right',
602
  ],
603
  ],
604
+ 'default' => 'left',
605
+ 'tablet_default' => 'left',
606
+ 'mobile_default' => 'center',
607
+ 'selectors' => [
608
  '{{WRAPPER}} .obfx-grid-col-content' => 'text-align: {{VALUE}};',
609
  ],
610
  ]
631
  $this->add_responsive_control(
632
  'grid_pagination_alignment',
633
  [
634
+ 'label' => __( 'Alignment', 'themeisle-companion' ),
635
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
636
+ 'options' => [
637
+ 'left' => [
638
  'title' => __( 'Left', 'themeisle-companion' ),
639
  'icon' => 'fa fa-align-left',
640
  ],
641
+ 'center' => [
642
  'title' => __( 'Center', 'themeisle-companion' ),
643
  'icon' => 'fa fa-align-center',
644
  ],
645
+ 'right' => [
646
  'title' => __( 'Right', 'themeisle-companion' ),
647
  'icon' => 'fa fa-align-right',
648
  ],
649
  ],
650
+ 'default' => 'center',
651
+ 'tablet_default' => 'center',
652
+ 'mobile_default' => 'center',
653
+ 'selectors' => [
654
  '{{WRAPPER}} .obfx-grid-pagination .pagination' => 'text-align: {{VALUE}};',
655
  ],
656
  ]
668
  'section_grid_style',
669
  [
670
  'label' => __( 'Grid Options', 'themeisle-companion' ),
671
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
672
  ]
673
  );
674
 
677
  'grid_style_columns_margin',
678
  [
679
  'label' => __( 'Columns margin', 'themeisle-companion' ),
680
+ 'type' => \Elementor\Controls_Manager::SLIDER,
681
  'default' => [
682
  'size' => 15,
683
  ],
688
  ],
689
  ],
690
  'selectors' => [
691
+ '{{WRAPPER}} .obfx-grid-wrapper' => 'padding-right: calc( {{SIZE}}{{UNIT}} ); padding-left: calc( {{SIZE}}{{UNIT}} );',
692
  '{{WRAPPER}} .obfx-grid-container' => 'margin-left: calc( -{{SIZE}}{{UNIT}} ); margin-right: calc( -{{SIZE}}{{UNIT}} );',
693
  ],
694
  ]
699
  'grid_style_rows_margin',
700
  [
701
  'label' => __( 'Rows margin', 'themeisle-companion' ),
702
+ 'type' => \Elementor\Controls_Manager::SLIDER,
703
  'default' => [
704
  'size' => 30,
705
  ],
717
 
718
  // Background.
719
  $this->add_group_control(
720
+ \Elementor\Group_Control_Background::get_type(),
721
  [
722
  'name' => 'grid_style_background',
723
  'types' => [ 'classic', 'gradient' ],
729
  $this->add_control(
730
  'grid_items_style_heading',
731
  [
732
+ 'label' => __( 'Items', 'themeisle-companion' ),
733
+ 'type' => \Elementor\Controls_Manager::HEADING,
734
  'separator' => 'before',
735
  ]
736
  );
740
  'grid_items_style_padding',
741
  [
742
  'label' => __( 'Padding', 'themeisle-companion' ),
743
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
744
  'size_units' => [ 'px', '%' ],
745
  'selectors' => [
746
  '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
753
  'grid_items_style_border_radius',
754
  [
755
  'label' => __( 'Border Radius', 'themeisle-companion' ),
756
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
757
  'size_units' => [ 'px', '%' ],
758
  'selectors' => [
759
  '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
763
 
764
  // Items box shadow.
765
  $this->add_group_control(
766
+ \Elementor\Group_Control_Box_Shadow::get_type(),
767
  [
768
  'name' => 'grid_items_style_box_shadow',
769
  'selector' => '{{WRAPPER}} .obfx-grid-col',
773
 
774
  // Background for items options.
775
  $this->add_group_control(
776
+ \Elementor\Group_Control_Background::get_type(),
777
  [
778
  'name' => 'grid_items_style_background',
779
  'types' => [ 'classic', 'gradient' ],
792
  $this->start_controls_section(
793
  'section_grid_image_style',
794
  [
795
+ 'label' => __( 'Image', 'themeisle-companion' ),
796
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
797
  'condition' => [
798
  'section_grid_image.grid_image_hide' => '',
799
  ],
805
  'grid_image_style_border_radius',
806
  [
807
  'label' => __( 'Border Radius', 'themeisle-companion' ),
808
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
809
  'size_units' => [ 'px', '%' ],
810
  'selectors' => [
811
  '{{WRAPPER}} .obfx-grid-col-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
812
  ],
813
+ 'condition' => [
814
  'section_grid_image.grid_image_hide' => '',
815
  ],
816
  ]
818
 
819
  // Image box shadow.
820
  $this->add_group_control(
821
+ \Elementor\Group_Control_Box_Shadow::get_type(),
822
  [
823
  'name' => 'grid_image_style_box_shadow',
824
  'selector' => '{{WRAPPER}} .obfx-grid-col-image',
834
  'grid_image_style_margin',
835
  [
836
  'label' => __( 'Margin', 'themeisle-companion' ),
837
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
838
  'size_units' => [ 'px' ],
839
  'selectors' => [
840
  '{{WRAPPER}} .obfx-grid-col-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
841
  ],
842
+ 'condition' => [
843
  'section_grid_image.grid_image_hide' => '',
844
  ],
845
  ]
856
  $this->start_controls_section(
857
  'section_grid_title_style',
858
  [
859
+ 'label' => __( 'Title', 'themeisle-companion' ),
860
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
861
  'condition' => [
862
  'section_grid_title.grid_title_hide' => '',
863
  ],
866
 
867
  // Title typography.
868
  $this->add_group_control(
869
+ \Elementor\Group_Control_Typography::get_type(),
870
  [
871
  'name' => 'grid_title_style_typography',
872
+ 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
873
  'selector' => '{{WRAPPER}} .obfx-grid-title',
874
  ]
875
  );
878
  $this->add_control(
879
  'grid_title_style_color',
880
  [
881
+ 'type' => \Elementor\Controls_Manager::COLOR,
882
  'label' => __( 'Color', 'themeisle-companion' ),
883
  'scheme' => [
884
+ 'type' => \Elementor\Scheme_Color::get_type(),
885
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
886
  ],
887
  'selectors' => [
888
+ '{{WRAPPER}} .obfx-grid-title' => 'color: {{VALUE}};',
889
  '{{WRAPPER}} .obfx-grid-title a' => 'color: {{VALUE}};',
890
  ],
891
  ]
896
  'grid_title_style_margin',
897
  [
898
  'label' => __( 'Margin', 'themeisle-companion' ),
899
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
900
  'size_units' => [ 'px' ],
901
  'selectors' => [
902
  '{{WRAPPER}} .obfx-grid-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
915
  $this->start_controls_section(
916
  'section_grid_meta_style',
917
  [
918
+ 'label' => __( 'Meta', 'themeisle-companion' ),
919
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
920
  'condition' => [
921
  'section_grid_meta.grid_meta_hide' => '',
922
  ],
925
 
926
  // Meta typography.
927
  $this->add_group_control(
928
+ \Elementor\Group_Control_Typography::get_type(),
929
  [
930
  'name' => 'grid_meta_style_typography',
931
+ 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
932
  'selector' => '{{WRAPPER}} .obfx-grid-meta',
933
  ]
934
  );
937
  $this->add_control(
938
  'grid_meta_style_color',
939
  [
940
+ 'type' => \Elementor\Controls_Manager::COLOR,
941
  'label' => __( 'Color', 'themeisle-companion' ),
942
  'scheme' => [
943
+ 'type' => \Elementor\Scheme_Color::get_type(),
944
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
945
  ],
946
  'selectors' => [
947
+ '{{WRAPPER}} .obfx-grid-meta' => 'color: {{VALUE}};',
948
  '{{WRAPPER}} .obfx-grid-meta span' => 'color: {{VALUE}};',
949
+ '{{WRAPPER}} .obfx-grid-meta a' => 'color: {{VALUE}};',
950
  ],
951
  ]
952
  );
956
  'grid_meta_style_margin',
957
  [
958
  'label' => __( 'Margin', 'themeisle-companion' ),
959
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
960
  'size_units' => [ 'px' ],
961
  'selectors' => [
962
  '{{WRAPPER}} .obfx-grid-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
976
  'section_grid_content_style',
977
  [
978
  'label' => __( 'Content', 'themeisle-companion' ),
979
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
980
  ]
981
  );
982
 
983
  // Content typography.
984
  $this->add_group_control(
985
+ \Elementor\Group_Control_Typography::get_type(),
986
  [
987
+ 'name' => 'grid_content_style_typography',
988
+ 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
989
+ 'selector' => '{{WRAPPER}} .obfx-grid-content',
990
  'condition' => [
991
  'section_grid_content.grid_content_hide' => '',
992
  ],
997
  $this->add_control(
998
  'grid_content_style_color',
999
  [
1000
+ 'type' => \Elementor\Controls_Manager::COLOR,
1001
  'label' => __( 'Color', 'themeisle-companion' ),
1002
  'scheme' => [
1003
+ 'type' => \Elementor\Scheme_Color::get_type(),
1004
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
1005
  ],
1006
  'selectors' => [
1007
  '{{WRAPPER}} .obfx-grid-content' => 'color: {{VALUE}};',
1017
  'grid_content_style_margin',
1018
  [
1019
  'label' => __( 'Margin', 'themeisle-companion' ),
1020
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1021
  'size_units' => [ 'px' ],
1022
  'selectors' => [
1023
  '{{WRAPPER}} .obfx-grid-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1024
  ],
1025
+ 'condition' => [
1026
  'section_grid_content.grid_content_hide' => '',
1027
  ],
1028
  ]
1032
  $this->add_control(
1033
  'grid_content_price_style_heading',
1034
  [
1035
+ 'label' => __( 'Price', 'themeisle-companion' ),
1036
+ 'type' => \Elementor\Controls_Manager::HEADING,
1037
  'separator' => 'before',
1038
  'condition' => [
1039
  'section_grid_content.grid_content_price' => 'yes',
1040
+ 'section_grid.grid_post_type' => 'product',
1041
  ],
1042
  ]
1043
  );
1044
 
1045
  // Price typography.
1046
  $this->add_group_control(
1047
+ \Elementor\Group_Control_Typography::get_type(),
1048
  [
1049
+ 'name' => 'grid_content_price_style_typography',
1050
+ 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
1051
+ 'selector' => '{{WRAPPER}} .obfx-grid-price',
1052
  'condition' => [
1053
  'section_grid_content.grid_content_price' => 'yes',
1054
+ 'section_grid.grid_post_type' => 'product',
1055
  ],
1056
  ]
1057
  );
1060
  $this->add_control(
1061
  'grid_content_price_style_color',
1062
  [
1063
+ 'type' => \Elementor\Controls_Manager::COLOR,
1064
  'label' => __( 'Color', 'themeisle-companion' ),
1065
  'scheme' => [
1066
+ 'type' => \Elementor\Scheme_Color::get_type(),
1067
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
1068
  ],
1069
  'selectors' => [
1070
  '{{WRAPPER}} .obfx-grid-price' => 'color: {{VALUE}};',
1071
  ],
1072
  'condition' => [
1073
  'section_grid_content.grid_content_price' => 'yes',
1074
+ 'section_grid.grid_post_type' => 'product',
1075
  ],
1076
  ]
1077
  );
1081
  'grid_content_price_style_margin',
1082
  [
1083
  'label' => __( 'Margin', 'themeisle-companion' ),
1084
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1085
  'size_units' => [ 'px' ],
1086
  'selectors' => [
1087
  '{{WRAPPER}} .obfx-grid-price' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1088
  ],
1089
+ 'condition' => [
1090
  'section_grid_content.grid_content_price' => 'yes',
1091
+ 'section_grid.grid_post_type' => 'product',
1092
  ],
1093
  ]
1094
  );
1107
  $this->add_control(
1108
  'grid_button_style_heading',
1109
  [
1110
+ 'label' => __( 'Button', 'themeisle-companion' ),
1111
+ 'type' => \Elementor\Controls_Manager::HEADING,
1112
  'separator' => 'before',
1113
  'condition' => [
1114
  'section_grid_content.grid_content_default_btn!' => '',
1119
 
1120
  // Content typography.
1121
  $this->add_group_control(
1122
+ \Elementor\Group_Control_Typography::get_type(),
1123
  [
1124
+ 'name' => 'grid_button_style_typography',
1125
+ 'scheme' => \Elementor\Scheme_Typography::TYPOGRAPHY_1,
1126
+ 'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1127
  'condition' => [
1128
  'section_grid_content.grid_content_default_btn!' => '',
1129
  'section_grid_content.grid_content_product_btn!' => '',
1137
  $this->start_controls_tab(
1138
  'grid_button_style_normal',
1139
  [
1140
+ 'label' => __( 'Normal', 'themeisle-companion' ),
1141
  'condition' => [
1142
  'section_grid_content.grid_content_default_btn!' => '',
1143
  'section_grid_content.grid_content_product_btn!' => '',
1149
  $this->add_control(
1150
  'grid_button_style_normal_text_color',
1151
  [
1152
+ 'type' => \Elementor\Controls_Manager::COLOR,
1153
  'label' => __( 'Text Color', 'themeisle-companion' ),
1154
  'scheme' => [
1155
+ 'type' => \Elementor\Scheme_Color::get_type(),
1156
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
1157
  ],
1158
  'separator' => '',
1159
  'selectors' => [
1170
  $this->add_control(
1171
  'grid_button_style_normal_bg_color',
1172
  [
1173
+ 'type' => \Elementor\Controls_Manager::COLOR,
1174
  'label' => __( 'Background Color', 'themeisle-companion' ),
1175
  'scheme' => [
1176
+ 'type' => \Elementor\Scheme_Color::get_type(),
1177
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
1178
  ],
1179
  'separator' => '',
1180
  'selectors' => [
1189
 
1190
  // Normal box shadow.
1191
  $this->add_group_control(
1192
+ \Elementor\Group_Control_Box_Shadow::get_type(),
1193
  [
1194
  'name' => 'grid_button_style_normal_box_shadow',
1195
  'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1207
  $this->start_controls_tab(
1208
  'grid_button_style_hover',
1209
  [
1210
+ 'label' => __( 'Hover', 'themeisle-companion' ),
1211
  'condition' => [
1212
  'section_grid_content.grid_content_default_btn!' => '',
1213
  'section_grid_content.grid_content_product_btn!' => '',
1219
  $this->add_control(
1220
  'grid_button_style_hover_text_color',
1221
  [
1222
+ 'type' => \Elementor\Controls_Manager::COLOR,
1223
  'label' => __( 'Text Color', 'themeisle-companion' ),
1224
  'scheme' => [
1225
+ 'type' => \Elementor\Scheme_Color::get_type(),
1226
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
1227
  ],
1228
  'separator' => '',
1229
  'selectors' => [
1240
  $this->add_control(
1241
  'grid_button_style_hover_bg_color',
1242
  [
1243
+ 'type' => \Elementor\Controls_Manager::COLOR,
1244
  'label' => __( 'Background Color', 'themeisle-companion' ),
1245
  'scheme' => [
1246
+ 'type' => \Elementor\Scheme_Color::get_type(),
1247
+ 'value' => \Elementor\Scheme_Color::COLOR_1,
1248
  ],
1249
  'separator' => '',
1250
  'selectors' => [
1259
 
1260
  // Hover box shadow.
1261
  $this->add_group_control(
1262
+ \Elementor\Group_Control_Box_Shadow::get_type(),
1263
  [
1264
  'name' => 'grid_button_style_hover_box_shadow',
1265
  'selector' => '{{WRAPPER}} .obfx-grid-footer a:hover',
1280
  'grid_button_style_padding',
1281
  [
1282
  'label' => __( 'Button padding', 'themeisle-companion' ),
1283
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1284
  'size_units' => [ 'px' ],
1285
  'selectors' => [
1286
  '{{WRAPPER}} .obfx-grid-footer a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1287
  ],
1288
+ 'condition' => [
1289
  'section_grid_content.grid_content_default_btn!' => '',
1290
  'section_grid_content.grid_content_product_btn!' => '',
1291
  ],
1297
  'grid_button_style_border_radius',
1298
  [
1299
  'label' => __( 'Button border radius', 'themeisle-companion' ),
1300
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1301
  'size_units' => [ 'px', '%' ],
1302
  'selectors' => [
1303
  '{{WRAPPER}} .obfx-grid-footer a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1304
  ],
1305
+ 'condition' => [
1306
  'section_grid_content.grid_content_default_btn!' => '',
1307
  'section_grid_content.grid_content_product_btn!' => '',
1308
  ],
1318
  $this->start_controls_section(
1319
  'section_grid_pagination_style',
1320
  [
1321
+ 'label' => __( 'Pagination', 'themeisle-companion' ),
1322
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
1323
  'condition' => [
1324
  'section_grid.grid_pagination' => 'yes',
1325
  ],
1331
  'grid_pagination_style_margin',
1332
  [
1333
  'label' => __( 'Margin', 'themeisle-companion' ),
1334
+ 'type' => \Elementor\Controls_Manager::DIMENSIONS,
1335
  'size_units' => [ 'px' ],
1336
  'selectors' => [
1337
  '{{WRAPPER}} .obfx-grid-pagination .pagination' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1343
  }
1344
 
1345
  /**
1346
+ * Render function to output the post type grid.
1347
  */
1348
+ protected function render() {
1349
+ // Get settings.
1350
  $settings = $this->get_settings();
1351
+ $this->maybe_load_widget_style();
1352
+ // ensure the needed scripts
 
1353
 
 
 
 
 
1354
 
1355
+ // Output.
1356
+ echo '<div class="obfx-grid">';
1357
+ echo '<div class="obfx-grid-container' . ( ! empty( $settings['grid_style'] ) && $settings['grid_style'] == 'list' ? ' obfx-grid-style-' . $settings['grid_style'] : '' ) . ( ! 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'] : '' ) . '">';
1358
+
1359
+ // Arguments for query.
1360
+ $args = array();
1361
+
1362
+ // Display only published posts.
1363
+ $args['post_status'] = 'publish';
1364
+
1365
+ // Ignore sticky posts.
1366
+ $args['ignore_sticky_posts'] = 1;
1367
+
1368
+ // Check if post type exists.
1369
+ if ( ! empty( $settings['grid_post_type'] ) && post_type_exists( $settings['grid_post_type'] ) ) {
1370
+ $args['post_type'] = $settings['grid_post_type'];
1371
  }
 
1372
 
1373
+ // Display posts in category.
1374
+ if ( ! empty( $settings['grid_post_categories'] ) && $settings['grid_post_type'] == 'post' ) {
1375
+ $args['category_name'] = $settings['grid_post_categories'];
1376
+ }
 
 
 
 
1377
 
1378
+ // Display products in category.
1379
+ if ( ! empty( $settings['grid_product_categories'] ) && $settings['grid_post_type'] == 'product' ) {
1380
+ $args['tax_query'] = array(
1381
+ 'relation' => 'AND',
1382
+ array(
1383
+ 'taxonomy' => 'product_cat',
1384
+ 'field' => 'slug',
1385
+ 'terms' => $settings['grid_product_categories'],
1386
+ ),
1387
+ );
1388
+ }
1389
 
1390
+ // Items to display.
1391
+ if ( ! empty( $settings['grid_items'] ) && intval( $settings['grid_items'] ) == $settings['grid_items'] ) {
1392
+ $args['posts_per_page'] = $settings['grid_items'];
 
 
 
 
 
 
 
 
 
1393
  }
1394
+
1395
+ // Order by.
1396
+ if ( ! empty( $settings['grid_order_by'] ) ) {
1397
+ $args['orderby'] = $settings['grid_order_by'];
1398
+ }
1399
+
1400
+ // Pagination.
1401
+ if ( ! empty( $settings['grid_pagination'] ) ) {
1402
+ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
1403
+ $args['paged'] = $paged;
1404
+ }
1405
+
1406
+ // Query.
1407
+ $query = new \WP_Query( $args );
1408
+
1409
+ // Query results.
1410
+ if ( $query->have_posts() ) {
1411
+ while ( $query->have_posts() ) {
1412
+ $query->the_post();
1413
+
1414
+ echo '<div class="obfx-grid-wrapper">';
1415
+ echo '<article class="obfx-grid-col' . ( $settings['grid_image_hide'] == 'yes' || ! has_post_thumbnail() ? ' obfx-no-image' : '' ) . '">';
1416
+
1417
+ // Image.
1418
+ $this->renderImage();
1419
+
1420
+ echo '<div class="obfx-grid-col-content">';
1421
+ // Title.
1422
+ $this->renderTitle();
1423
+
1424
+ // Meta.
1425
+ $this->renderMeta();
1426
+
1427
+ // Content.
1428
+ $this->renderContent();
1429
+
1430
+ // Price.
1431
+ if ( class_exists( 'WooCommerce' ) ) {
1432
+ $this->renderPrice();
1433
+ }
1434
+
1435
+ // Button.
1436
+ $this->renderButton();
1437
+
1438
+ echo '</div><!-- .obfx-grid-col-content -->';
1439
+ echo '</article>';
1440
+ echo '</div>';
1441
+
1442
+ } // End while().
1443
+
1444
+ // Pagination.
1445
+ if ( ! empty( $settings['grid_pagination'] ) ) { ?>
1446
+ <div class="obfx-grid-pagination">
1447
+ <?php
1448
+ $big = 999999999;
1449
+ $totalpages = $query->max_num_pages;
1450
+ $current = max( 1, $paged );
1451
+ $paginate_args = array(
1452
+ 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
1453
+ 'format' => '?paged=%#%',
1454
+ 'current' => $current,
1455
+ 'total' => $totalpages,
1456
+ 'show_all' => false,
1457
+ 'end_size' => 1,
1458
+ 'mid_size' => 3,
1459
+ 'prev_next' => true,
1460
+ 'prev_text' => esc_html__( 'Previous', 'themeisle-companion' ),
1461
+ 'next_text' => esc_html__( 'Next', 'themeisle-companion' ),
1462
+ 'type' => 'plain',
1463
+ 'add_args' => false,
1464
+ );
1465
+
1466
+ $pagination = paginate_links( $paginate_args ); ?>
1467
+ <nav class="pagination">
1468
+ <?php echo $pagination; ?>
1469
+ </nav>
1470
+ </div>
1471
+ <?php
1472
+ }
1473
+ } // End if().
1474
+
1475
+ // Restore original data.
1476
+ wp_reset_postdata();
1477
+
1478
+ echo '</div><!-- .obfx-grid-container -->';
1479
+
1480
+ echo '</div><!-- .obfx-grid -->';
1481
  }
1482
 
1483
  /**
1492
  if ( has_post_thumbnail() ) {
1493
 
1494
  if ( $settings['grid_image_link'] == 'yes' ) {
1495
+ ?>
1496
  <div class="obfx-grid-col-image">
1497
  <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
1498
  <?php
1501
  'class' => 'img-responsive',
1502
  'alt' => get_the_title( get_post_thumbnail_id() ),
1503
  )
1504
+ ); ?>
 
1505
  </a>
1506
  </div>
1507
  <?php } else { ?>
1512
  'class' => 'img-responsive',
1513
  'alt' => get_the_title( get_post_thumbnail_id() ),
1514
  )
1515
+ ); ?>
 
1516
  </div>
1517
+ <?php
1518
+ }
1519
  }
1520
  }
1521
  }
1526
  protected function renderTitle() {
1527
  $settings = $this->get_settings();
1528
 
1529
+ if ( $settings['grid_title_hide'] !== 'yes' ) { ?>
 
1530
  <<?php echo $settings['grid_title_tag']; ?> class="entry-title obfx-grid-title">
1531
  <?php if ( $settings['grid_title_link'] == 'yes' ) { ?>
1532
  <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
1533
+ <?php the_title(); ?>
1534
+ </a>
1535
+ <?php
1536
+ } else {
1537
+ the_title();
1538
+ } ?>
 
 
 
1539
  </<?php echo $settings['grid_title_tag']; ?>>
1540
+ <?php
1541
  }
1542
  }
1543
 
1548
  $settings = $this->get_settings();
1549
 
1550
  if ( $settings['grid_meta_hide'] !== 'yes' ) {
1551
+ if ( ! empty( $settings['grid_meta_display'] ) ) { ?>
 
1552
  <div class="entry-meta obfx-grid-meta">
1553
 
1554
+ <?php
1555
+ foreach ( $settings['grid_meta_display'] as $meta ) {
1556
 
1557
+ switch ( $meta ) :
1558
+ // Author
1559
+ case 'author': ?>
1560
+ <span class="obfx-grid-author">
1561
+ <?php
1562
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-user"></i>' : '';
 
1563
 
1564
+ echo get_the_author(); ?>
1565
+ </span>
 
 
 
 
 
 
1566
  <?php
1567
+ // Date
1568
+ break;
1569
+ case 'date': ?>
1570
+ <span class="obfx-grid-date">
1571
+ <?php
1572
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-calendar"></i>' : '';
1573
+ echo get_the_date(); ?>
1574
+ </span>
1575
+ <?php
1576
+ // Category
1577
+ break;
1578
+ case 'category':
1579
+ $this->renderMetaGridCategories();
1580
 
1581
  // Tags
1582
+ break;
1583
+ case 'tags':
1584
+ $this->renderMetaGridTags();
1585
 
1586
  // Comments/Reviews
1587
+ break;
1588
+ case 'comments': ?>
1589
+ <span class="obfx-grid-comments">
1590
+ <?php
1591
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-comment"></i>' : '';
1592
+
1593
+ if ( $settings['grid_post_type'] == 'product' ) {
1594
+ echo comments_number( __( 'No reviews', 'themeisle-companion' ), __( '1 review', 'themeisle-companion' ), __( '% reviews', 'themeisle-companion' ) );
1595
+ } else {
1596
+ echo comments_number( __( 'No comments', 'themeisle-companion' ), __( '1 comment', 'themeisle-companion' ), __( '% comments', 'themeisle-companion' ) );
1597
+ } ?>
1598
+ </span>
1599
  <?php
1600
+ break;
1601
+ endswitch;
1602
+ } // End foreach().?>
 
 
 
 
 
 
 
 
 
 
 
1603
 
1604
  </div>
1605
+ <?php
1606
  }// End if().
1607
  }// End if().
1608
  }
1611
  * Display price if post type is product.
1612
  */
1613
  protected function renderPrice() {
1614
+
1615
+ if ( ! function_exists( 'wc_get_product' ) ) {
1616
+ return null;
1617
+ }
1618
+
1619
  $settings = $this->get_settings();
1620
+ $product = wc_get_product( get_the_ID() );
1621
 
1622
+ if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_price'] == 'yes' ) { ?>
 
1623
  <div class="obfx-grid-price">
1624
  <?php
1625
+ $price = $product->get_price_html();
1626
  if ( ! empty( $price ) ) {
1627
  echo wp_kses(
1628
  $price, array(
1629
  'span' => array(
1630
  'class' => array(),
1631
  ),
1632
+ 'del' => array(),
1633
  )
1634
  );
1635
+ } ?>
 
1636
  </div>
1637
+ <?php
1638
  }
1639
  }
1640
 
1642
  * Display Add to Cart button.
1643
  */
1644
  protected function renderAddToCart() {
1645
+
1646
+ if ( ! function_exists( 'wc_get_product' ) ) {
1647
+ return null;
1648
+ }
1649
+
1650
  $product = wc_get_product( get_the_ID() );
1651
 
1652
  echo apply_filters(
1666
  protected function renderContent() {
1667
  $settings = $this->get_settings();
1668
 
1669
+ if ( $settings['grid_content_hide'] !== 'yes' ) { ?>
 
1670
  <div class="entry-content obfx-grid-content">
1671
  <?php
1672
  if ( empty( $settings['grid_content_length'] ) ) {
1673
  the_excerpt();
1674
  } else {
1675
  echo wp_trim_words( get_the_excerpt(), $settings['grid_content_length'] );
1676
+ } ?>
 
1677
  </div>
1678
+ <?php
1679
  }
1680
  }
1681
 
1685
  protected function renderButton() {
1686
  $settings = $this->get_settings();
1687
 
1688
+ if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_product_btn'] == 'yes' ) { ?>
 
1689
  <div class="obfx-grid-footer">
1690
  <?php $this->renderAddToCart(); ?>
1691
  </div>
1692
  <?php } elseif ( $settings['grid_content_default_btn'] == 'yes' && ! empty( $settings['grid_content_default_btn_text'] ) ) { ?>
1693
  <div class="obfx-grid-footer">
1694
+ <a href="<?php echo get_the_permalink(); ?>"
1695
+ title="<?php echo $settings['grid_content_default_btn_text']; ?>"><?php echo $settings['grid_content_default_btn_text']; ?></a>
1696
  </div>
1697
+ <?php
1698
+ }
1699
  }
1700
 
1701
  /**
1702
+ * Display categories in meta section.
1703
  */
1704
+ protected function renderMetaGridCategories() {
1705
+ $settings = $this->get_settings();
1706
+ $post_type_category = get_the_category();
1707
+ $maxCategories = $settings['grid_meta_categories_max'] ? $settings['grid_meta_categories_max'] : '-1';
1708
+ $i = 0; // counter
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1709
 
1710
+ if ( $post_type_category ) { ?>
1711
+ <span class="obfx-grid-categories">
1712
+ <?php
1713
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-bookmark"></i>' : '';
1714
 
1715
+ foreach ( $post_type_category as $category ) {
1716
+ if ( $i == $maxCategories ) {
1717
+ break;
1718
+ } ?>
1719
+ <span class="obfx-grid-categories-item">
1720
+ <a href="<?php echo get_category_link( $category->term_id ); ?>" title="<?php echo $category->name; ?>">
1721
+ <?php echo $category->name; ?>
1722
+ </a>
1723
+ </span>
1724
+ <?php
1725
+ $i ++;
1726
+ } ?>
1727
+ </span>
1728
+ <?php
1729
  }
1730
+ }
1731
 
1732
+ /**
1733
+ * Display tags in meta section.
1734
+ */
1735
+ protected function renderMetaGridTags() {
1736
+ $settings = $this->get_settings();
1737
+ $post_type_tags = get_the_tags();
1738
+ $maxTags = $settings['grid_meta_tags_max'] ? $settings['grid_meta_tags_max'] : '-1';
1739
+ $i = 0; // counter
1740
 
1741
+ if ( $post_type_tags ) { ?>
1742
+ <span class="obfx-grid-tags">
1743
+ <?php
1744
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-tags"></i>' : '';
1745
 
1746
+ foreach ( $post_type_tags as $tag ) {
1747
+ if ( $i == $maxTags ) {
1748
+ break;
1749
+ } ?>
1750
+ <span class="obfx-grid-tags-item">
1751
+ <a href="<?php echo get_tag_link( $tag->term_id ); ?>" title="<?php echo $tag->name; ?>">
1752
+ <?php echo $tag->name; ?>
1753
+ </a>
1754
+ </span>
1755
+ <?php
1756
+ $i ++;
1757
+ } ?>
1758
+ </span>
1759
+ <?php
1760
  }
1761
+ }
1762
 
1763
+ /**
1764
+ * Load the widget style dynamically if it is a widget preview
1765
+ * or enqueue style and scripts if not
1766
+ *
1767
+ * This way we are sure that the assets files are loaded only when this block is present in page.
1768
+ */
1769
+ protected function maybe_load_widget_style() {
1770
+ if ( \Elementor\Plugin::$instance->editor->is_edit_mode() === true && apply_filters( 'themeisle_content_forms_register_default_style', true ) ) { ?>
1771
+ <style>
1772
+ <?php echo file_get_contents( plugin_dir_path( dirname( dirname(__FILE__ ) ) ) . 'css/public.css' ) ?>
1773
+ </style>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1774
  <?php
1775
+ } else {
1776
+ wp_enqueue_script( 'obfx-grid-js' );
1777
+ wp_enqueue_style( 'eaw-elementor' );
1778
+ }
 
 
 
 
 
1779
  }
1780
  }
1781
 
obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-pricing-table.php → vendor/codeinwp/elementor-extra-widgets/widgets/elementor/pricing-table.php RENAMED
@@ -1,25 +1,24 @@
1
  <?php
2
  /**
3
- * Orbit Fox Elementor Pricing Table Widget
4
  *
5
  * @link https://themeisle.com
6
  * @since 1.0.0
7
  *
8
- * @package Elementor_Widgets_OBFX_Module
9
  */
10
-
11
- namespace Elementor;
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  } // End if().
16
 
17
  /**
18
- * Class OBFX_Elementor_Widget_Pricing_Table
19
  *
20
- * @package Elementor_Widgets_OBFX_Module
21
  */
22
- class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
23
 
24
  /**
25
  * Widget title.
@@ -54,7 +53,9 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
54
  * @return array
55
  */
56
  public function get_categories() {
57
- return [ 'obfx-elementor-widgets' ];
 
 
58
  }
59
 
60
  /**
@@ -92,7 +93,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
92
  $this->add_control(
93
  'title',
94
  [
95
- 'type' => Controls_Manager::TEXT,
96
  'label' => __( 'Title', 'themeisle-companion' ),
97
  'placeholder' => __( 'Title', 'themeisle-companion' ),
98
  'default' => __( 'Pricing Plan', 'themeisle-companion' ),
@@ -102,7 +103,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
102
  $this->add_control(
103
  'title_tag',
104
  [
105
- 'type' => Controls_Manager::SELECT,
106
  'label' => __( 'Title HTML tag', 'themeisle-companion' ),
107
  'default' => 'h3',
108
  'options' => [
@@ -120,7 +121,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
120
  $this->add_control(
121
  'subtitle',
122
  [
123
- 'type' => Controls_Manager::TEXT,
124
  'label' => __( 'Subtitle', 'themeisle-companion' ),
125
  'placeholder' => __( 'Subtitle', 'themeisle-companion' ),
126
  'default' => __( 'Description', 'themeisle-companion' ),
@@ -130,7 +131,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
130
  $this->add_control(
131
  'subtitle_tag',
132
  [
133
- 'type' => Controls_Manager::SELECT,
134
  'label' => __( 'Subtitle HTML Tag', 'themeisle-companion' ),
135
  'default' => 'p',
136
  'options' => [
@@ -161,7 +162,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
161
  $this->add_control(
162
  'price_tag_text',
163
  [
164
- 'type' => Controls_Manager::TEXT,
165
  'label' => __( 'Price', 'themeisle-companion' ),
166
  'placeholder' => __( 'Price', 'themeisle-companion' ),
167
  'default' => __( '50', 'themeisle-companion' ),
@@ -172,7 +173,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
172
  $this->add_control(
173
  'price_tag_currency',
174
  [
175
- 'type' => Controls_Manager::TEXT,
176
  'label' => __( 'Currency', 'themeisle-companion' ),
177
  'placeholder' => __( 'Currency', 'themeisle-companion' ),
178
  'default' => __( '$', 'themeisle-companion' ),
@@ -182,7 +183,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
182
  $this->add_control(
183
  'price_tag_currency_position',
184
  [
185
- 'type' => Controls_Manager::SELECT,
186
  'label' => __( 'Currency Position', 'themeisle-companion' ),
187
  'default' => 'left',
188
  'options' => [
@@ -195,7 +196,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
195
  $this->add_control(
196
  'price_tag_period',
197
  [
198
- 'type' => Controls_Manager::TEXT,
199
  'label' => __( 'Period', 'themeisle-companion' ),
200
  'placeholder' => __( '/month', 'themeisle-companion' ),
201
  'default' => __( '/month', 'themeisle-companion' ),
@@ -220,7 +221,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
220
  'feature_list',
221
  [
222
  'label' => __( 'Plan Features', 'themeisle-companion' ),
223
- 'type' => Controls_Manager::REPEATER,
224
  'default' => [
225
  [
226
  'accent' => __( 'First', 'themeisle-companion' ),
@@ -237,7 +238,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
237
  ],
238
  'fields' => [
239
  [
240
- 'type' => Controls_Manager::TEXT,
241
  'name' => 'accent',
242
  'label' => __( 'Accented Text', 'themeisle-companion' ),
243
  'description' => __( 'Appears before feature text', 'themeisle-companion' ),
@@ -245,7 +246,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
245
  'default' => __( 'Accent', 'themeisle-companion' ),
246
  ],
247
  [
248
- 'type' => Controls_Manager::TEXT,
249
  'name' => 'text',
250
  'label' => __( 'Text', 'themeisle-companion' ),
251
  'label_block' => true,
@@ -253,7 +254,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
253
  'default' => __( 'Feature', 'themeisle-companion' ),
254
  ],
255
  [
256
- 'type' => Controls_Manager::ICON,
257
  'name' => 'feature_icon',
258
  'label' => __( 'Icon', 'themeisle-companion' ),
259
  'label_block' => true,
@@ -268,7 +269,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
268
  'features_align',
269
  [
270
  'label' => __( 'Alignment', 'themeisle-companion' ),
271
- 'type' => Controls_Manager::CHOOSE,
272
  'options' => [
273
  'left' => [
274
  'title' => __( 'Left', 'themeisle-companion' ),
@@ -311,7 +312,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
311
  $this->add_control(
312
  'button_text',
313
  [
314
- 'type' => Controls_Manager::TEXT,
315
  'label' => __( 'Text', 'themeisle-companion' ),
316
  'placeholder' => __( 'Buy Now', 'themeisle-companion' ),
317
  'default' => __( 'Buy Now', 'themeisle-companion' ),
@@ -321,7 +322,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
321
  $this->add_control(
322
  'button_link',
323
  [
324
- 'type' => Controls_Manager::URL,
325
  'label' => __( 'Link', 'themeisle-companion' ),
326
  'placeholder' => __( 'https://example.com', 'themeisle-companion' ),
327
  ]
@@ -330,7 +331,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
330
  $this->add_control(
331
  'button_icon',
332
  [
333
- 'type' => Controls_Manager::ICON,
334
  'label' => __( 'Icon', 'themeisle-companion' ),
335
  'label_block' => true,
336
  'default' => '',
@@ -340,7 +341,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
340
  $this->add_control(
341
  'button_icon_align',
342
  [
343
- 'type' => Controls_Manager::SELECT,
344
  'label' => __( 'Icon Position', 'themeisle-companion' ),
345
  'default' => 'left',
346
  'options' => [
@@ -356,7 +357,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
356
  $this->add_control(
357
  'button_icon_indent',
358
  [
359
- 'type' => Controls_Manager::SLIDER,
360
  'label' => __( 'Icon Spacing', 'themeisle-companion' ),
361
  'range' => [
362
  'px' => [
@@ -383,7 +384,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
383
  'section_header_style',
384
  [
385
  'label' => __( 'Header', 'themeisle-companion' ),
386
- 'tab' => Controls_Manager::TAB_STYLE,
387
  ]
388
  );
389
 
@@ -391,7 +392,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
391
  'header_padding',
392
  [
393
  'label' => __( 'Header Padding', 'themeisle-companion' ),
394
- 'type' => Controls_Manager::DIMENSIONS,
395
  'size_units' => [ 'px', 'em', '%' ],
396
  'selectors' => [
397
  '{{WRAPPER}} .obfx-title-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -402,11 +403,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
402
  $this->add_control(
403
  'plan_title_color',
404
  [
405
- 'type' => Controls_Manager::COLOR,
406
  'label' => __( 'Title Color', 'themeisle-companion' ),
407
  'scheme' => [
408
- 'type' => Scheme_Color::get_type(),
409
- 'value' => Scheme_Color::COLOR_1,
410
  ],
411
  'default' => '#464959',
412
  'selectors' => [
@@ -416,10 +417,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
416
  );
417
 
418
  $this->add_group_control(
419
- Group_Control_Typography::get_type(),
420
  [
421
  'name' => 'plan_title_typography',
422
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
423
  'selector' => '{{WRAPPER}} .obfx-pricing-table-title',
424
  ]
425
  );
@@ -427,11 +428,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
427
  $this->add_control(
428
  'plan_subtitle_color',
429
  [
430
- 'type' => Controls_Manager::COLOR,
431
  'label' => __( 'Subtitle Color', 'themeisle-companion' ),
432
  'scheme' => [
433
- 'type' => Scheme_Color::get_type(),
434
- 'value' => Scheme_Color::COLOR_1,
435
  ],
436
  'default' => '#60647d',
437
  'selectors' => [
@@ -441,16 +442,16 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
441
  );
442
 
443
  $this->add_group_control(
444
- Group_Control_Typography::get_type(),
445
  [
446
  'name' => 'plan_subtitle_typography',
447
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
448
  'selector' => '{{WRAPPER}} .obfx-pricing-table-subtitle',
449
  ]
450
  );
451
 
452
  $this->add_group_control(
453
- Group_Control_Background::get_type(),
454
  [
455
  'name' => 'heading_section_bg',
456
  'label' => __( 'Section Background', 'themeisle-companion' ),
@@ -469,14 +470,14 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
469
  'section_price_box',
470
  [
471
  'label' => __( 'Price Tag', 'themeisle-companion' ),
472
- 'tab' => Controls_Manager::TAB_STYLE,
473
  ]
474
  );
475
 
476
  $this->add_responsive_control(
477
  'price_box_padding',
478
  [
479
- 'type' => Controls_Manager::DIMENSIONS,
480
  'label' => __( 'Price Box Padding', 'themeisle-companion' ),
481
  'size_units' => [ 'px', 'em', '%' ],
482
  'selectors' => [
@@ -486,7 +487,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
486
  );
487
 
488
  $this->add_group_control(
489
- Group_Control_Background::get_type(),
490
  [
491
  'name' => 'pricing_section_bg',
492
  'label' => __( 'Section Background', 'themeisle-companion' ),
@@ -499,7 +500,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
499
  'price_tag_heading_currency',
500
  [
501
  'label' => __( 'Currency', 'themeisle-companion' ),
502
- 'type' => Controls_Manager::HEADING,
503
  'separator' => 'before',
504
  ]
505
  );
@@ -508,10 +509,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
508
  'currency_color',
509
  [
510
  'label' => __( 'Currency Color', 'themeisle-companion' ),
511
- 'type' => Controls_Manager::COLOR,
512
  'scheme' => [
513
- 'type' => Scheme_Color::get_type(),
514
- 'value' => Scheme_Color::COLOR_1,
515
  ],
516
  'default' => '#60647d',
517
  'selectors' => [
@@ -521,10 +522,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
521
  );
522
 
523
  $this->add_group_control(
524
- Group_Control_Typography::get_type(),
525
  [
526
  'name' => 'currency_typography',
527
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
528
  'selector' => '{{WRAPPER}} .obfx-price-currency',
529
  ]
530
  );
@@ -533,7 +534,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
533
  'price_tag_heading_price',
534
  [
535
  'label' => __( 'Price', 'themeisle-companion' ),
536
- 'type' => Controls_Manager::HEADING,
537
  'separator' => 'before',
538
  ]
539
  );
@@ -542,10 +543,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
542
  'price_text_color',
543
  [
544
  'label' => __( 'Price Color', 'themeisle-companion' ),
545
- 'type' => Controls_Manager::COLOR,
546
  'scheme' => [
547
- 'type' => Scheme_Color::get_type(),
548
- 'value' => Scheme_Color::COLOR_1,
549
  ],
550
  'default' => '#60647d',
551
  'selectors' => [
@@ -555,10 +556,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
555
  );
556
 
557
  $this->add_group_control(
558
- Group_Control_Typography::get_type(),
559
  [
560
  'name' => 'price_typography',
561
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
562
  'selector' => '{{WRAPPER}} .obfx-price',
563
  ]
564
  );
@@ -567,7 +568,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
567
  'price_tag_heading_period',
568
  [
569
  'label' => __( 'Period', 'themeisle-companion' ),
570
- 'type' => Controls_Manager::HEADING,
571
  'separator' => 'before',
572
  ]
573
  );
@@ -576,10 +577,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
576
  'period_color',
577
  [
578
  'label' => __( 'Period Color', 'themeisle-companion' ),
579
- 'type' => Controls_Manager::COLOR,
580
  'scheme' => [
581
- 'type' => Scheme_Color::get_type(),
582
- 'value' => Scheme_Color::COLOR_1,
583
  ],
584
  'default' => '#60647d',
585
  'selectors' => [
@@ -589,10 +590,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
589
  );
590
 
591
  $this->add_group_control(
592
- Group_Control_Typography::get_type(),
593
  [
594
  'name' => 'price_sub_text_typography',
595
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
596
  'selector' => '{{WRAPPER}} .obfx-pricing-period',
597
  ]
598
  );
@@ -607,12 +608,12 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
607
  'section_features_style',
608
  [
609
  'label' => __( 'Features', 'themeisle-companion' ),
610
- 'tab' => Controls_Manager::TAB_STYLE,
611
  ]
612
  );
613
 
614
  $this->add_group_control(
615
- Group_Control_Background::get_type(),
616
  [
617
  'name' => 'features_section_bg',
618
  'label' => __( 'Section Background', 'themeisle-companion' ),
@@ -624,7 +625,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
624
  $this->add_responsive_control(
625
  'features_box_padding',
626
  [
627
- 'type' => Controls_Manager::DIMENSIONS,
628
  'label' => __( 'Features List Padding', 'themeisle-companion' ),
629
  'size_units' => [ 'px', 'em', '%' ],
630
  'selectors' => [
@@ -637,7 +638,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
637
  'features_accented_heading',
638
  [
639
  'label' => __( 'Accented', 'themeisle-companion' ),
640
- 'type' => Controls_Manager::HEADING,
641
  'separator' => 'before',
642
  ]
643
  );
@@ -645,11 +646,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
645
  $this->add_control(
646
  'features_accented_text_color',
647
  [
648
- 'type' => Controls_Manager::COLOR,
649
  'label' => __( 'Accented Color', 'themeisle-companion' ),
650
  'scheme' => [
651
- 'type' => Scheme_Color::get_type(),
652
- 'value' => Scheme_Color::COLOR_1,
653
  ],
654
  'default' => '#60647d',
655
  'selectors' => [
@@ -659,10 +660,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
659
  );
660
 
661
  $this->add_group_control(
662
- Group_Control_Typography::get_type(),
663
  [
664
  'name' => 'features_accented_typography',
665
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
666
  'selector' => '{{WRAPPER}} .obfx-pricing-table-accented',
667
  ]
668
  );
@@ -671,7 +672,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
671
  'features_features_heading',
672
  [
673
  'label' => __( 'Features', 'themeisle-companion' ),
674
- 'type' => Controls_Manager::HEADING,
675
  'separator' => 'before',
676
  ]
677
  );
@@ -680,10 +681,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
680
  'features_text_color',
681
  [
682
  'label' => __( 'Features Color', 'themeisle-companion' ),
683
- 'type' => Controls_Manager::COLOR,
684
  'scheme' => [
685
- 'type' => Scheme_Color::get_type(),
686
- 'value' => Scheme_Color::COLOR_1,
687
  ],
688
  'default' => '#b1b3c0',
689
  'selectors' => [
@@ -693,10 +694,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
693
  );
694
 
695
  $this->add_group_control(
696
- Group_Control_Typography::get_type(),
697
  [
698
  'name' => 'features_features_typography',
699
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
700
  'selector' => '{{WRAPPER}} .obfx-pricing-table-feature',
701
  ]
702
  );
@@ -705,7 +706,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
705
  'features_icons_heading',
706
  [
707
  'label' => __( 'Icons', 'themeisle-companion' ),
708
- 'type' => Controls_Manager::HEADING,
709
  'separator' => 'before',
710
  ]
711
  );
@@ -714,10 +715,10 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
714
  'features_icon_color',
715
  [
716
  'label' => __( 'Icon Color', 'themeisle-companion' ),
717
- 'type' => Controls_Manager::COLOR,
718
  'scheme' => [
719
- 'type' => Scheme_Color::get_type(),
720
- 'value' => Scheme_Color::COLOR_1,
721
  ],
722
  'default' => '#b1b3c0',
723
  'selectors' => [
@@ -729,7 +730,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
729
  $this->add_control(
730
  'features_icon_indent',
731
  [
732
- 'type' => Controls_Manager::SLIDER,
733
  'label' => __( 'Icon Spacing', 'themeisle-companion' ),
734
  'default' => [
735
  'size' => 5,
@@ -756,12 +757,12 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
756
  'section_button_style',
757
  [
758
  'label' => __( 'Button', 'themeisle-companion' ),
759
- 'tab' => Controls_Manager::TAB_STYLE,
760
  ]
761
  );
762
 
763
  $this->add_group_control(
764
- Group_Control_Background::get_type(), [
765
  'name' => 'button_section_bg',
766
  'label' => __( 'Section Background', 'themeisle-companion' ),
767
  'types' => [ 'classic', 'gradient' ],
@@ -770,11 +771,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
770
  );
771
 
772
  $this->add_group_control(
773
- Group_Control_Typography::get_type(),
774
  [
775
  'name' => 'typography',
776
  'label' => __( 'Typography', 'themeisle-companion' ),
777
- 'scheme' => Scheme_Typography::TYPOGRAPHY_4,
778
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button-wrapper',
779
  ]
780
  );
@@ -783,7 +784,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
783
  'border_radius',
784
  [
785
  'label' => __( 'Border Radius', 'themeisle-companion' ),
786
- 'type' => Controls_Manager::DIMENSIONS,
787
  'size_units' => [ 'px', '%' ],
788
  'selectors' => [
789
  '{{WRAPPER}} .obfx-pricing-table-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -795,7 +796,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
795
  'text_padding',
796
  [
797
  'label' => __( 'Padding', 'themeisle-companion' ),
798
- 'type' => Controls_Manager::DIMENSIONS,
799
  'size_units' => [ 'px', 'em', '%' ],
800
  'selectors' => [
801
  '{{WRAPPER}} .obfx-pricing-table-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -825,11 +826,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
825
  $this->add_control(
826
  'button_text_color',
827
  [
828
- 'type' => Controls_Manager::COLOR,
829
  'label' => __( 'Text Color', 'themeisle-companion' ),
830
  'scheme' => [
831
- 'type' => Scheme_Color::get_type(),
832
- 'value' => Scheme_Color::COLOR_1,
833
  ],
834
  'default' => '#fff',
835
  'selectors' => [
@@ -840,11 +841,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
840
  $this->add_control(
841
  'button_bg_color',
842
  [
843
- 'type' => Controls_Manager::COLOR,
844
  'label' => __( 'Background Color', 'themeisle-companion' ),
845
  'scheme' => [
846
- 'type' => Scheme_Color::get_type(),
847
- 'value' => Scheme_Color::COLOR_1,
848
  ],
849
  'default' => '#93c64f',
850
  'selectors' => [
@@ -854,7 +855,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
854
  );
855
 
856
  $this->add_group_control(
857
- Group_Control_Box_Shadow::get_type(),
858
  [
859
  'name' => 'button_box_shadow',
860
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button',
@@ -874,11 +875,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
874
  $this->add_control(
875
  'button_hover_text_color',
876
  [
877
- 'type' => Controls_Manager::COLOR,
878
  'label' => __( 'Text Color', 'themeisle-companion' ),
879
  'scheme' => [
880
- 'type' => Scheme_Color::get_type(),
881
- 'value' => Scheme_Color::COLOR_1,
882
  ],
883
  'default' => '#fff',
884
  'selectors' => [
@@ -889,11 +890,11 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
889
  $this->add_control(
890
  'button_hover_bg_color',
891
  [
892
- 'type' => Controls_Manager::COLOR,
893
  'label' => __( 'Background Color', 'themeisle-companion' ),
894
  'scheme' => [
895
- 'type' => Scheme_Color::get_type(),
896
- 'value' => Scheme_Color::COLOR_1,
897
  ],
898
  'default' => '#74c600',
899
  'selectors' => [
@@ -903,7 +904,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
903
  );
904
 
905
  $this->add_group_control(
906
- Group_Control_Box_Shadow::get_type(),
907
  [
908
  'name' => 'button_hover_box_shadow',
909
  'selector' => '{{WRAPPER}} .obfx-pricing-table-button:hover',
@@ -915,7 +916,7 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
915
  'background_hover_transition',
916
  [
917
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
918
- 'type' => Controls_Manager::SLIDER,
919
  'default' => [
920
  'size' => 0.3,
921
  ],
@@ -942,6 +943,9 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
942
  */
943
  protected function render() {
944
  $settings = $this->get_settings();
 
 
 
945
  $this->add_render_attribute( 'title', 'class', 'obfx-pricing-table-title' );
946
  $this->add_render_attribute( 'subtitle', 'class', 'obfx-pricing-table-subtitle' );
947
  $this->add_render_attribute( 'button', 'class', 'obfx-pricing-table-button' );
@@ -1055,5 +1059,22 @@ class OBFX_Elementor_Widget_Pricing_Table extends Widget_Base {
1055
 
1056
  echo $output;
1057
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1058
  }
1059
 
1
  <?php
2
  /**
3
+ * Pricing Table widget for Elementor builder
4
  *
5
  * @link https://themeisle.com
6
  * @since 1.0.0
7
  *
8
+ * @package ThemeIsle\ElementorExtraWidgets
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.
53
  * @return array
54
  */
55
  public function get_categories() {
56
+ $category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
57
+ $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
58
+ return [ $slug ];
59
  }
60
 
61
  /**
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
  $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
  $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
  $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
  $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
  $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
  $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
  $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
  'feature_list',
222
  [
223
  'label' => __( 'Plan Features', 'themeisle-companion' ),
224
+ 'type' => \Elementor\Controls_Manager::REPEATER,
225
  'default' => [
226
  [
227
  'accent' => __( 'First', 'themeisle-companion' ),
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
  'default' => __( 'Accent', 'themeisle-companion' ),
247
  ],
248
  [
249
+ 'type' => \Elementor\Controls_Manager::TEXT,
250
  'name' => 'text',
251
  'label' => __( 'Text', 'themeisle-companion' ),
252
  'label_block' => true,
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,
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
  $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
  $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
  ]
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' => '',
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
  $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
  'section_header_style',
385
  [
386
  'label' => __( 'Header', 'themeisle-companion' ),
387
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
388
  ]
389
  );
390
 
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
  $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
  );
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
  $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
  );
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
  '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
  );
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
  'price_tag_heading_currency',
501
  [
502
  'label' => __( 'Currency', 'themeisle-companion' ),
503
+ 'type' => \Elementor\Controls_Manager::HEADING,
504
  'separator' => 'before',
505
  ]
506
  );
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
  );
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
  'price_tag_heading_price',
535
  [
536
  'label' => __( 'Price', 'themeisle-companion' ),
537
+ 'type' => \Elementor\Controls_Manager::HEADING,
538
  'separator' => 'before',
539
  ]
540
  );
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
  );
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
  'price_tag_heading_period',
569
  [
570
  'label' => __( 'Period', 'themeisle-companion' ),
571
+ 'type' => \Elementor\Controls_Manager::HEADING,
572
  'separator' => 'before',
573
  ]
574
  );
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
  );
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
  '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
  $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
  'features_accented_heading',
639
  [
640
  'label' => __( 'Accented', 'themeisle-companion' ),
641
+ 'type' => \Elementor\Controls_Manager::HEADING,
642
  'separator' => 'before',
643
  ]
644
  );
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
  );
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
  'features_features_heading',
673
  [
674
  'label' => __( 'Features', 'themeisle-companion' ),
675
+ 'type' => \Elementor\Controls_Manager::HEADING,
676
  'separator' => 'before',
677
  ]
678
  );
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
  );
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
  'features_icons_heading',
707
  [
708
  'label' => __( 'Icons', 'themeisle-companion' ),
709
+ 'type' => \Elementor\Controls_Manager::HEADING,
710
  'separator' => 'before',
711
  ]
712
  );
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' => [
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
  '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
  );
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
  '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
  '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}};',
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
  $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
  );
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
  $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
  $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
  );
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
  'background_hover_transition',
917
  [
918
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
919
+ 'type' => \Elementor\Controls_Manager::SLIDER,
920
  'default' => [
921
  'size' => 0.3,
922
  ],
943
  */
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' );
1059
 
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
 
obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-services.php → vendor/codeinwp/elementor-extra-widgets/widgets/elementor/services.php RENAMED
@@ -1,25 +1,24 @@
1
  <?php
2
  /**
3
- * Orbit Fox Elementor Services Widget
4
  *
5
  * @link https://themeisle.com
6
  * @since 1.0.0
7
  *
8
- * @package Elementor_Widgets_OBFX_Module
9
  */
10
-
11
- namespace Elementor;
12
 
13
  if ( ! defined( 'ABSPATH' ) ) {
14
  exit;
15
  } // End if().
16
 
17
  /**
18
- * Class OBFX_Elementor_Widget_Services
19
  *
20
- * @package Elementor_Widgets_OBFX_Module
21
  */
22
- class OBFX_Elementor_Widget_Services extends Widget_Base {
23
 
24
  /**
25
  * Widget name.
@@ -55,7 +54,9 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
55
  * @return array
56
  */
57
  public function get_categories() {
58
- return [ 'obfx-elementor-widgets' ];
 
 
59
  }
60
 
61
  /**
@@ -82,7 +83,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
82
  'services_list',
83
  [
84
  'label' => __( 'Services', 'themeisle-companion' ),
85
- 'type' => Controls_Manager::REPEATER,
86
  'default' => [
87
  [
88
  'title' => __( 'Award-Winning​', 'themeisle-companion' ),
@@ -108,7 +109,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
108
  ],
109
  'fields' => [
110
  [
111
- 'type' => Controls_Manager::CHOOSE,
112
  'name' => 'type',
113
  'label_block' => true,
114
  'label' => __( 'Type', 'themeisle-companion' ),
@@ -125,20 +126,20 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
125
  ],
126
  ],
127
  [
128
- 'type' => Controls_Manager::TEXT,
129
  'name' => 'title',
130
  'label_block' => true,
131
  'label' => __( 'Title & Description', 'themeisle-companion' ),
132
  'default' => __( 'Service Title', 'themeisle-companion' ),
133
  ],
134
  [
135
- 'type' => Controls_Manager::TEXTAREA,
136
  'name' => 'text',
137
  'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
138
  'default' => __( 'Feature', 'themeisle-companion' ),
139
  ],
140
  [
141
- 'type' => Controls_Manager::ICON,
142
  'name' => 'icon',
143
  'label' => __( 'Icon', 'themeisle-companion' ),
144
  'default' => 'fa fa-diamond',
@@ -147,7 +148,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
147
  ],
148
  ],
149
  [
150
- 'type' => Controls_Manager::COLOR,
151
  'name' => 'color',
152
  'label_block' => false,
153
  'label' => __( 'Icon Color', 'themeisle-companion' ),
@@ -157,7 +158,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
157
  ],
158
  ],
159
  [
160
- 'type' => Controls_Manager::MEDIA,
161
  'name' => 'image',
162
  'label' => __( 'Image', 'themeisle-companion' ),
163
  'condition' => [
@@ -165,7 +166,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
165
  ],
166
  ],
167
  [
168
- 'type' => Controls_Manager::URL,
169
  'name' => 'link',
170
  'label' => __( 'Link to', 'themeisle-companion' ),
171
  'separator' => 'before',
@@ -180,7 +181,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
180
  'align',
181
  [
182
  'label' => '<i class="fa fa-arrows"></i> ' . __( 'Icon Position', 'themeisle-companion' ),
183
- 'type' => Controls_Manager::CHOOSE,
184
  'options' => [
185
  'left' => [
186
  'title' => __( 'Left', 'themeisle-companion' ),
@@ -205,7 +206,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
205
  $this->add_responsive_control(
206
  'grid_columns',
207
  [
208
- 'type' => Controls_Manager::SELECT,
209
  'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
210
  'default' => 3,
211
  'tablet_default' => 2,
@@ -230,14 +231,14 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
230
  'section_style_icon',
231
  [
232
  'label' => __( 'Icon / Image', 'themeisle-companion' ),
233
- 'tab' => Controls_Manager::TAB_STYLE,
234
  ]
235
  );
236
  $this->add_control(
237
  'icon_space',
238
  [
239
  'label' => __( 'Spacing', 'themeisle-companion' ),
240
- 'type' => Controls_Manager::SLIDER,
241
  'default' => [
242
  'size' => 15,
243
  ],
@@ -258,7 +259,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
258
  'icon_size',
259
  [
260
  'label' => __( 'Size', 'themeisle-companion' ),
261
- 'type' => Controls_Manager::SLIDER,
262
  'range' => [
263
  'px' => [
264
  'min' => 6,
@@ -279,7 +280,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
279
  'section_style_content',
280
  [
281
  'label' => __( 'Content', 'themeisle-companion' ),
282
- 'tab' => Controls_Manager::TAB_STYLE,
283
  ]
284
  );
285
 
@@ -287,7 +288,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
287
  'text_align',
288
  [
289
  'label' => __( 'Alignment', 'themeisle-companion' ),
290
- 'type' => Controls_Manager::CHOOSE,
291
  'toggle' => false,
292
  'default' => 'center',
293
  'options' => [
@@ -315,7 +316,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
315
  'heading_title',
316
  [
317
  'label' => __( 'Title', 'themeisle-companion' ),
318
- 'type' => Controls_Manager::HEADING,
319
  'separator' => 'before',
320
  ]
321
  );
@@ -324,7 +325,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
324
  'title_bottom_space',
325
  [
326
  'label' => __( 'Spacing', 'themeisle-companion' ),
327
- 'type' => Controls_Manager::SLIDER,
328
  'range' => [
329
  'px' => [
330
  'min' => 0,
@@ -341,7 +342,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
341
  'title_color',
342
  [
343
  'label' => __( 'Color', 'themeisle-companion' ),
344
- 'type' => Controls_Manager::COLOR,
345
  'default' => '',
346
  'selectors' => [
347
  '{{WRAPPER}} .obfx-service-title' => 'color: {{VALUE}};',
@@ -350,11 +351,11 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
350
  );
351
 
352
  $this->add_group_control(
353
- Group_Control_Typography::get_type(),
354
  [
355
  'name' => 'title_typography',
356
  'selector' => '{{WRAPPER}} .obfx-service-title',
357
- 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
358
  ]
359
  );
360
 
@@ -362,7 +363,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
362
  'heading_description',
363
  [
364
  'label' => __( 'Description', 'themeisle-companion' ),
365
- 'type' => Controls_Manager::HEADING,
366
  'separator' => 'before',
367
  ]
368
  );
@@ -371,24 +372,24 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
371
  'description_color',
372
  [
373
  'label' => __( 'Color', 'themeisle-companion' ),
374
- 'type' => Controls_Manager::COLOR,
375
  'default' => '',
376
  'selectors' => [
377
  '{{WRAPPER}} .obfx-service-text' => 'color: {{VALUE}};',
378
  ],
379
  'scheme' => [
380
- 'type' => Scheme_Color::get_type(),
381
- 'value' => Scheme_Color::COLOR_3,
382
  ],
383
  ]
384
  );
385
 
386
  $this->add_group_control(
387
- Group_Control_Typography::get_type(),
388
  [
389
  'name' => 'description_typography',
390
  'selector' => '{{WRAPPER}} .obfx-service-text',
391
- 'scheme' => Scheme_Typography::TYPOGRAPHY_3,
392
  ]
393
  );
394
 
@@ -403,7 +404,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
403
  'section_grid_style',
404
  [
405
  'label' => __( 'Grid', 'themeisle-companion' ),
406
- 'tab' => Controls_Manager::TAB_STYLE,
407
  ]
408
  );
409
 
@@ -412,7 +413,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
412
  'grid_style_columns_margin',
413
  [
414
  'label' => __( 'Columns margin', 'themeisle-companion' ),
415
- 'type' => Controls_Manager::SLIDER,
416
  'default' => [
417
  'size' => 15,
418
  ],
@@ -434,7 +435,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
434
  'grid_style_rows_margin',
435
  [
436
  'label' => __( 'Rows margin', 'themeisle-companion' ),
437
- 'type' => Controls_Manager::SLIDER,
438
  'default' => [
439
  'size' => 30,
440
  ],
@@ -452,7 +453,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
452
 
453
  // Background.
454
  $this->add_group_control(
455
- Group_Control_Background::get_type(),
456
  [
457
  'name' => 'grid_style_background',
458
  'types' => [ 'classic', 'gradient' ],
@@ -465,7 +466,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
465
  'grid_items_style_heading',
466
  [
467
  'label' => __( 'Items', 'themeisle-companion' ),
468
- 'type' => Controls_Manager::HEADING,
469
  'separator' => 'before',
470
  ]
471
  );
@@ -475,7 +476,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
475
  'grid_items_style_padding',
476
  [
477
  'label' => __( 'Padding', 'themeisle-companion' ),
478
- 'type' => Controls_Manager::DIMENSIONS,
479
  'size_units' => [ 'px', '%' ],
480
  'selectors' => [
481
  '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -488,7 +489,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
488
  'grid_items_style_border_radius',
489
  [
490
  'label' => __( 'Border Radius', 'themeisle-companion' ),
491
- 'type' => Controls_Manager::DIMENSIONS,
492
  'size_units' => [ 'px', '%' ],
493
  'selectors' => [
494
  '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
@@ -504,43 +505,43 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
504
  * Items Style Controls
505
  */
506
  private function items_style_tabs() {
507
- $this->start_controls_tabs( 'tabs_background' );
508
-
509
- $this->start_controls_tab(
510
- 'tab_background_normal',
511
- [
512
- 'label' => __( 'Normal', 'themeisle-companion' ),
513
- ]
514
- );
515
-
516
- $this->add_group_control(
517
- Group_Control_Background::get_type(),
518
- [
519
- 'name' => 'grid_items_background',
520
- 'types' => [ 'classic', 'gradient' ],
521
- 'selector' => '{{WRAPPER}} .obfx-service-box',
522
- ]
523
- );
524
-
525
- $this->add_group_control(
526
- Group_Control_Box_Shadow::get_type(),
527
- [
528
- 'name' => 'grid_items_box_shadow',
529
- 'selector' => '{{WRAPPER}} .obfx-service-box',
530
- ]
531
- );
532
-
533
- $this->end_controls_tab();
534
-
535
- $this->start_controls_tab(
536
- 'tab_background_hover',
537
- [
538
- 'label' => __( 'Hover', 'themeisle-companion' ),
539
- ]
540
- );
541
 
542
  $this->add_group_control(
543
- Group_Control_Background::get_type(),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
544
  [
545
  'name' => 'grid_items_background_hover',
546
  'types' => [ 'classic', 'gradient' ],
@@ -549,7 +550,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
549
  );
550
 
551
  $this->add_group_control(
552
- Group_Control_Box_Shadow::get_type(),
553
  [
554
  'name' => 'grid_items_box_shadow_hover',
555
  'selector' => '{{WRAPPER}} .obfx-service-box:hover',
@@ -560,7 +561,7 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
560
  'hover_transition',
561
  [
562
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
563
- 'type' => Controls_Manager::SLIDER,
564
  'default' => [
565
  'size' => 0.3,
566
  ],
@@ -575,9 +576,9 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
575
  ],
576
  ]
577
  );
578
- $this->end_controls_tab();
579
 
580
- $this->end_controls_tabs();
581
  }
582
 
583
  /**
@@ -586,6 +587,8 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
586
  protected function render() {
587
  $settings = $this->get_settings();
588
 
 
 
589
  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'] : '' ) . '">';
590
  foreach ( $settings['services_list'] as $service ) {
591
  $icon_tag = 'span';
@@ -613,43 +616,53 @@ class OBFX_Elementor_Widget_Services extends Widget_Base {
613
  $link_props .= ' rel="nofollow" ';
614
  }
615
  echo '<a' . $link_props . '>';
616
- }
617
- ?>
618
- <div class="obfx-service-box obfx-grid-col">
619
- <?php
620
- if ( $service['type'] === 'icon' && ! empty( $service['icon'] ) ) {
621
- ?>
622
- <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>
623
- <?php
624
- } elseif ( $service['type'] === 'image' && ! empty( $service['image']['url'] ) ) {
625
- ?>
626
-
627
- <span class="obfx-image-wrap"><img class="obfx-image" src="<?php echo esc_url( $service['image']['url'] ); ?>"/></span>
628
- <?php
629
- }
630
- if ( ! empty( $service['title'] ) || ! empty( $service['text'] ) ) {
631
- ?>
632
- <div class="obfx-service-box-content">
633
- <?php if ( ! empty( $service['title'] ) ) { ?>
634
- <h4 class="obfx-service-title"><?php echo esc_attr( $service['title'] ); ?></h4>
635
  <?php
636
- }
637
- if ( ! empty( $service['text'] ) ) {
638
- ?>
639
- <p class="obfx-service-text"><?php echo esc_attr( $service['text'] ); ?></p>
640
- <?php } ?>
641
- </div><!-- /.obfx-service-box-content -->
 
 
 
 
 
 
 
 
 
 
 
642
  <?php } ?>
643
- </div><!-- /.obfx-service-box -->
644
  <?php
645
  if ( ! empty( $service['link'] ) ) {
646
  echo '</a>';
647
- }
648
- ?>
649
  </div><!-- /.obfx-grid-wrapper -->
650
- <?php
651
  }// End foreach().
652
  echo '</div></div>';
653
 
654
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
655
  }
1
  <?php
2
  /**
3
+ * Services widget for Elementor builder
4
  *
5
  * @link https://themeisle.com
6
  * @since 1.0.0
7
  *
8
+ * @package ThemeIsle\ElementorExtraWidgets
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.
54
  * @return array
55
  */
56
  public function get_categories() {
57
+ $category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
58
+ $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
59
+ return [ $slug ];
60
  }
61
 
62
  /**
83
  'services_list',
84
  [
85
  'label' => __( 'Services', 'themeisle-companion' ),
86
+ 'type' => \Elementor\Controls_Manager::REPEATER,
87
  'default' => [
88
  [
89
  'title' => __( 'Award-Winning​', 'themeisle-companion' ),
109
  ],
110
  'fields' => [
111
  [
112
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
113
  'name' => 'type',
114
  'label_block' => true,
115
  'label' => __( 'Type', 'themeisle-companion' ),
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',
148
  ],
149
  ],
150
  [
151
+ 'type' => \Elementor\Controls_Manager::COLOR,
152
  'name' => 'color',
153
  'label_block' => false,
154
  'label' => __( 'Icon Color', 'themeisle-companion' ),
158
  ],
159
  ],
160
  [
161
+ 'type' => \Elementor\Controls_Manager::MEDIA,
162
  'name' => 'image',
163
  'label' => __( 'Image', 'themeisle-companion' ),
164
  'condition' => [
166
  ],
167
  ],
168
  [
169
+ 'type' => \Elementor\Controls_Manager::URL,
170
  'name' => 'link',
171
  'label' => __( 'Link to', 'themeisle-companion' ),
172
  'separator' => 'before',
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
  $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
  '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
  'icon_size',
260
  [
261
  'label' => __( 'Size', 'themeisle-companion' ),
262
+ 'type' => \Elementor\Controls_Manager::SLIDER,
263
  'range' => [
264
  'px' => [
265
  'min' => 6,
280
  'section_style_content',
281
  [
282
  'label' => __( 'Content', 'themeisle-companion' ),
283
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
284
  ]
285
  );
286
 
288
  'text_align',
289
  [
290
  'label' => __( 'Alignment', 'themeisle-companion' ),
291
+ 'type' => \Elementor\Controls_Manager::CHOOSE,
292
  'toggle' => false,
293
  'default' => 'center',
294
  'options' => [
316
  'heading_title',
317
  [
318
  'label' => __( 'Title', 'themeisle-companion' ),
319
+ 'type' => \Elementor\Controls_Manager::HEADING,
320
  'separator' => 'before',
321
  ]
322
  );
325
  'title_bottom_space',
326
  [
327
  'label' => __( 'Spacing', 'themeisle-companion' ),
328
+ 'type' => \Elementor\Controls_Manager::SLIDER,
329
  'range' => [
330
  'px' => [
331
  'min' => 0,
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
  );
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
  'heading_description',
364
  [
365
  'label' => __( 'Description', 'themeisle-companion' ),
366
+ 'type' => \Elementor\Controls_Manager::HEADING,
367
  'separator' => 'before',
368
  ]
369
  );
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
  'section_grid_style',
405
  [
406
  'label' => __( 'Grid', 'themeisle-companion' ),
407
+ 'tab' => \Elementor\Controls_Manager::TAB_STYLE,
408
  ]
409
  );
410
 
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
  'grid_style_rows_margin',
436
  [
437
  'label' => __( 'Rows margin', 'themeisle-companion' ),
438
+ 'type' => \Elementor\Controls_Manager::SLIDER,
439
  'default' => [
440
  'size' => 30,
441
  ],
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
  'grid_items_style_heading',
467
  [
468
  'label' => __( 'Items', 'themeisle-companion' ),
469
+ 'type' => \Elementor\Controls_Manager::HEADING,
470
  'separator' => 'before',
471
  ]
472
  );
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
  '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}};',
505
  * Items Style Controls
506
  */
507
  private function items_style_tabs() {
508
+ $this->start_controls_tabs( 'tabs_background' );
509
+
510
+ $this->start_controls_tab(
511
+ 'tab_background_normal',
512
+ [
513
+ 'label' => __( 'Normal', 'themeisle-companion' ),
514
+ ]
515
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516
 
517
  $this->add_group_control(
518
+ \Elementor\Group_Control_Background::get_type(),
519
+ [
520
+ 'name' => 'grid_items_background',
521
+ 'types' => [ 'classic', 'gradient' ],
522
+ 'selector' => '{{WRAPPER}} .obfx-service-box',
523
+ ]
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',
531
+ ]
532
+ );
533
+
534
+ $this->end_controls_tab();
535
+
536
+ $this->start_controls_tab(
537
+ 'tab_background_hover',
538
+ [
539
+ 'label' => __( 'Hover', 'themeisle-companion' ),
540
+ ]
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
  );
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
  'hover_transition',
562
  [
563
  'label' => __( 'Transition Duration', 'themeisle-companion' ),
564
+ 'type' => \Elementor\Controls_Manager::SLIDER,
565
  'default' => [
566
  'size' => 0.3,
567
  ],
576
  ],
577
  ]
578
  );
579
+ $this->end_controls_tab();
580
 
581
+ $this->end_controls_tabs();
582
  }
583
 
584
  /**
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';
616
  $link_props .= ' rel="nofollow" ';
617
  }
618
  echo '<a' . $link_props . '>';
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'] ) ) { ?>
630
+ <div class="obfx-service-box-content">
631
+ <?php if ( ! empty( $service['title'] ) ) { ?>
632
+ <h4 class="obfx-service-title"><?php echo esc_attr( $service['title'] ); ?></h4>
633
+ <?php
634
+ }
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
  }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/best-products.php ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent Woo Products
4
+ *
5
+ * @package Woo Recent Products
6
+ */
7
+
8
+ class Woo_Best_Products extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'woo_best_products',
13
+ 'description' => __( 'Woo Best Selling Products - designed for use with the Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'woo-best-products', __( 'Woo Best Selling Products', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'woo_best_products';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
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
+
54
+ if ( '' == $title ) {
55
+ $title = __( 'Best Sellers', 'themeisle-companion' );
56
+ }
57
+
58
+ $limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
59
+ if ( '' == $limit ) {
60
+ $limit = 4;
61
+ }
62
+ $columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
63
+
64
+ if ( '' == $columns ) {
65
+ $columns = 4;
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' );
81
+ echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
82
+
83
+ do_action( 'storepage_homepage_after_best_selling_products_title' );
84
+ echo eaw_do_shortcode(
85
+ 'best_selling_products', array(
86
+ 'per_page' => intval( $args['limit'] ),
87
+ 'columns' => intval( $args['columns'] ),
88
+ )
89
+ );
90
+ do_action( 'storepage_homepage_after_best_selling_products' );
91
+
92
+ echo '</section>';
93
+ // echo '</div>';
94
+ echo $args['after_widget'];
95
+
96
+ if ( ! $this->is_preview() ) {
97
+ $cache[ $args['widget_id'] ] = ob_get_flush();
98
+ wp_cache_set( 'woo_best_products', $cache, 'widget' );
99
+ } else {
100
+ ob_end_flush();
101
+ }
102
+ }
103
+
104
+ public function update( $new_instance, $old_instance ) {
105
+ $instance = $old_instance;
106
+ $instance['title'] = strip_tags( $new_instance['title'] );
107
+ $instance['limit'] = (int) $new_instance['limit'];
108
+ $instance['columns'] = (int) ( $new_instance['columns'] );
109
+ $this->flush_widget_cache();
110
+
111
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
112
+ if ( isset( $alloptions['woo_best_products'] ) ) {
113
+ delete_option( 'woo_best_products' );
114
+ }
115
+
116
+ return $instance;
117
+ }
118
+
119
+ /**
120
+ * @access public
121
+ */
122
+ public function flush_widget_cache() {
123
+ wp_cache_delete( 'woo_best_products', 'widget' );
124
+ }
125
+
126
+ /**
127
+ * @param array $instance
128
+ */
129
+ public function form( $instance ) {
130
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
131
+ $limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
132
+ $columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
133
+ <p>
134
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
135
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
136
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
137
+ </p>
138
+
139
+ <p>
140
+ <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'themeisle-companion' ); ?></label>
141
+ <input id="<?php echo $this->get_field_id( 'limit' ); ?>"
142
+ name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
143
+ size="3"/></p>
144
+
145
+ <p>
146
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'themeisle-companion' ); ?></label>
147
+ <input id="<?php echo $this->get_field_id( 'columns' ); ?>"
148
+ name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
149
+ size="3"/>
150
+ </p>
151
+ <?php
152
+ }
153
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/featured-products.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent Woo Products
4
+ *
5
+ * @package Woo Recent Products
6
+ */
7
+
8
+ class Woo_Featured_Products extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'woo_featured_products',
13
+ 'description' => __( 'Woo Featured Products - designed for use with the Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'woo-featured-products', __( 'Woo Featured Products', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'woo_featured_products';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
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_featured_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
+
54
+ if ( '' == $title ) {
55
+ $title = __( 'Recommended For You', 'themeisle-companion' );
56
+ }
57
+
58
+ $limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
59
+ if ( '' == $limit ) {
60
+ $limit = 4;
61
+ }
62
+
63
+ $columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
64
+ if ( '' == $columns ) {
65
+ $columns = 4;
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' );
82
+
83
+ echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
84
+
85
+ do_action( 'storepage_homepage_after_featured_products_title' );
86
+
87
+ echo eaw_do_shortcode(
88
+ 'featured_products', array(
89
+ 'per_page' => intval( $args['limit'] ),
90
+ 'columns' => intval( $args['columns'] ),
91
+ 'orderby' => esc_attr( $args['orderby'] ),
92
+ 'order' => esc_attr( $args['order'] ),
93
+ )
94
+ );
95
+
96
+ do_action( 'storepage_homepage_after_featured_products' );
97
+
98
+ echo '</section>';
99
+
100
+ echo $args['after_widget'];
101
+
102
+ if ( ! $this->is_preview() ) {
103
+ $cache[ $args['widget_id'] ] = ob_get_flush();
104
+ wp_cache_set( 'woo_featured_products', $cache, 'widget' );
105
+ } else {
106
+ ob_end_flush();
107
+ }
108
+ }
109
+
110
+ public function update( $new_instance, $old_instance ) {
111
+ $instance = $old_instance;
112
+ $instance['title'] = strip_tags( $new_instance['title'] );
113
+ $instance['limit'] = (int) $new_instance['limit'];
114
+ $instance['columns'] = (int) $new_instance['columns'];
115
+ $this->flush_widget_cache();
116
+
117
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
118
+ if ( isset( $alloptions['woo_featured_products'] ) ) {
119
+ delete_option( 'woo_featured_products' );
120
+ }
121
+
122
+ return $instance;
123
+ }
124
+
125
+ /**
126
+ * @access public
127
+ */
128
+ public function flush_widget_cache() {
129
+ wp_cache_delete( 'woo_featured_products', 'widget' );
130
+ }
131
+
132
+ /**
133
+ * @param array $instance
134
+ */
135
+ public function form( $instance ) {
136
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
137
+ $limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
138
+ $columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
139
+ <p>
140
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
141
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
142
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
143
+ </p>
144
+
145
+ <p>
146
+ <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'themeisle-companion' ); ?></label>
147
+ <input id="<?php echo $this->get_field_id( 'limit' ); ?>"
148
+ name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
149
+ size="3"/></p>
150
+
151
+ <p>
152
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'themeisle-companion' ); ?></label>
153
+ <input id="<?php echo $this->get_field_id( 'columns' ); ?>"
154
+ name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
155
+ size="3"/></p>
156
+ <?php
157
+ }
158
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/popular-products.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent Woo Products
4
+ *
5
+ * @package Woo Recent Products
6
+ */
7
+
8
+ class Woo_Popular_Products extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'woo_popular_products',
13
+ 'description' => __( 'Woo Popular Products - designed for use with the Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'woo-popular-products', __( 'Woo Popular Products', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'woo_popular_products';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
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_popular_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
+
54
+ if ( '' == $title ) {
55
+ $title = __( 'Fan Favorites', 'themeisle-companion' );
56
+ }
57
+
58
+ $limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
59
+ if ( '' == $limit ) {
60
+ $limit = 4;
61
+ }
62
+ $columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
63
+
64
+ if ( '' == $columns ) {
65
+ $columns = 4;
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
+
82
+ do_action( 'storepage_homepage_before_popular_products' );
83
+
84
+ echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
85
+
86
+ do_action( 'storepage_homepage_after_popular_products_title' );
87
+
88
+ echo eaw_do_shortcode(
89
+ 'top_rated_products', array(
90
+ 'per_page' => intval( $args['limit'] ),
91
+ 'columns' => intval( $args['columns'] ),
92
+ )
93
+ );
94
+
95
+ do_action( 'storepage_homepage_after_popular_products' );
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();
103
+ wp_cache_set( 'woo_popular_products', $cache, 'widget' );
104
+ } else {
105
+ ob_end_flush();
106
+ }
107
+ }
108
+
109
+ public function update( $new_instance, $old_instance ) {
110
+ $instance = $old_instance;
111
+ $instance['title'] = strip_tags( $new_instance['title'] );
112
+ $instance['limit'] = (int) $new_instance['limit'];
113
+ $instance['columns'] = (int) ( $new_instance['columns'] );
114
+ $this->flush_widget_cache();
115
+
116
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
117
+ if ( isset( $alloptions['woo_popular_products'] ) ) {
118
+ delete_option( 'woo_popular_products' );
119
+ }
120
+
121
+ return $instance;
122
+ }
123
+
124
+ /**
125
+ * @access public
126
+ */
127
+ public function flush_widget_cache() {
128
+ wp_cache_delete( 'woo_popular_products', 'widget' );
129
+ }
130
+
131
+ /**
132
+ * @param array $instance
133
+ */
134
+ public function form( $instance ) {
135
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
136
+ $limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
137
+ $columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
138
+ <p>
139
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
140
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
141
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
142
+ </p>
143
+
144
+ <p>
145
+ <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'themeisle-companion' ); ?></label>
146
+ <input id="<?php echo $this->get_field_id( 'limit' ); ?>"
147
+ name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
148
+ size="3"/></p>
149
+
150
+ <p>
151
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'themeisle-companion' ); ?></label>
152
+ <input id="<?php echo $this->get_field_id( 'columns' ); ?>"
153
+ name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
154
+ size="3"/></p>
155
+ <?php
156
+ }
157
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/products-categories.php ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent Woo Products
4
+ *
5
+ * @package Woo Recent Products
6
+ */
7
+
8
+ class Woo_Product_Categories extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'woo_product_categories',
13
+ 'description' => __( 'Woo Product Categories - designed for use with the Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'woo-product-categories', __( 'Woo Product Categories', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'woo_product_categories';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
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_product_categories', '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
+
54
+ if ( '' == $title ) {
55
+ $title = __( 'Shop By Categories', 'themeisle-companion' );
56
+ }
57
+
58
+ $limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 3;
59
+ if ( '' == $limit ) {
60
+ $limit = 3;
61
+ }
62
+ $columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 3;
63
+
64
+ if ( '' == $columns ) {
65
+ $columns = 3;
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
+
82
+ do_action( 'storepage_homepage_before_product_categories' );
83
+
84
+ echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
85
+
86
+ do_action( 'storepage_homepage_after_product_categories_title' );
87
+
88
+ echo eaw_do_shortcode(
89
+ 'product_categories', array(
90
+ 'number' => intval( $args['limit'] ),
91
+ 'columns' => intval( $args['columns'] ),
92
+ 'orderby' => esc_attr( $args['orderby'] ),
93
+ 'parent' => esc_attr( $args['child_categories'] ),
94
+ )
95
+ );
96
+
97
+ do_action( 'storepage_homepage_after_product_categories' );
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();
105
+ wp_cache_set( 'woo_product_categories', $cache, 'widget' );
106
+ } else {
107
+ ob_end_flush();
108
+ }
109
+ }
110
+
111
+ public function update( $new_instance, $old_instance ) {
112
+ $instance = $old_instance;
113
+ $instance['title'] = strip_tags( $new_instance['title'] );
114
+ $instance['limit'] = (int) $new_instance['limit'];
115
+ $instance['columns'] = (int) ( $new_instance['columns'] );
116
+ $this->flush_widget_cache();
117
+
118
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
119
+ if ( isset( $alloptions['woo_product_categories'] ) ) {
120
+ delete_option( 'woo_product_categories' );
121
+ }
122
+
123
+ return $instance;
124
+ }
125
+
126
+ /**
127
+ * @access public
128
+ */
129
+ public function flush_widget_cache() {
130
+ wp_cache_delete( 'woo_product_categories', 'widget' );
131
+ }
132
+
133
+ /**
134
+ * @param array $instance
135
+ */
136
+ public function form( $instance ) {
137
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
138
+ $limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 3;
139
+ $columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 3; ?>
140
+ <p>
141
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
142
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
143
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
144
+ </p>
145
+
146
+ <p>
147
+ <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of categories to show:', 'themeisle-companion' ); ?></label>
148
+ <input id="<?php echo $this->get_field_id( 'limit' ); ?>"
149
+ name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
150
+ size="3"/></p>
151
+
152
+ <p>
153
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'themeisle-companion' ); ?></label>
154
+ <input id="<?php echo $this->get_field_id( 'columns' ); ?>"
155
+ name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
156
+ size="3"/></p>
157
+ <?php
158
+ }
159
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/recent-products.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent Woo Products
4
+ *
5
+ * @package Woo Recent Products
6
+ */
7
+
8
+ class Woo_Recent_Products extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'woo_recent_products',
13
+ 'description' => __( 'Woo Recent Products - designed for use with the Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'woo-recent-products', __( 'Woo Recent Products', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'woo_recent_products';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
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_recent_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
+
54
+ if ( '' == $title ) {
55
+ $title = __( 'New In', 'themeisle-companion' );
56
+ }
57
+
58
+ $limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
59
+ if ( '' == $limit ) {
60
+ $limit = 4;
61
+ }
62
+ $columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
63
+
64
+ if ( '' == $columns ) {
65
+ $columns = 4;
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
+
80
+ do_action( 'elementor-addon-widgets_homepage_before_recent_products' );
81
+
82
+ echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
83
+
84
+ do_action( 'elementor-addon-widgets_homepage_after_recent_products_title' );
85
+
86
+ echo eaw_do_shortcode(
87
+ 'recent_products', array(
88
+ 'per_page' => intval( $args['limit'] ),
89
+ 'columns' => intval( $args['columns'] ),
90
+ )
91
+ );
92
+
93
+ do_action( 'elementor-addon-widgets_homepage_after_recent_products' );
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();
101
+ wp_cache_set( 'woo_recent_products', $cache, 'widget' );
102
+ } else {
103
+ ob_end_flush();
104
+ }
105
+ }
106
+
107
+ public function update( $new_instance, $old_instance ) {
108
+ $instance = $old_instance;
109
+ $instance['title'] = strip_tags( $new_instance['title'] );
110
+ $instance['limit'] = (int) $new_instance['limit'];
111
+ $instance['columns'] = (int) ( $new_instance['columns'] );
112
+ $this->flush_widget_cache();
113
+
114
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
115
+ if ( isset( $alloptions['woo_recent_products'] ) ) {
116
+ delete_option( 'woo_recent_products' );
117
+ }
118
+
119
+ return $instance;
120
+ }
121
+
122
+ /**
123
+ * @access public
124
+ */
125
+ public function flush_widget_cache() {
126
+ wp_cache_delete( 'woo_recent_products', 'widget' );
127
+ }
128
+
129
+ /**
130
+ * @param array $instance
131
+ */
132
+ public function form( $instance ) {
133
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
134
+ $limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
135
+ $columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
136
+ <p>
137
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
138
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
139
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
140
+ </p>
141
+
142
+ <p>
143
+ <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'themeisle-companion' ); ?></label>
144
+ <input id="<?php echo $this->get_field_id( 'limit' ); ?>"
145
+ name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
146
+ size="3"/></p>
147
+
148
+ <p>
149
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'themeisle-companion' ); ?></label>
150
+ <input id="<?php echo $this->get_field_id( 'columns' ); ?>"
151
+ name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
152
+ size="3"/></p>
153
+ <?php
154
+ }
155
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/woo/sale-products.php ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent Woo Products
4
+ *
5
+ * @package Woo Recent Products
6
+ */
7
+
8
+ class Woo_Sale_Products extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'woo_sale_products',
13
+ 'description' => __( 'Woo On Sale Products - designed for use with the Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'woo-sale-products', __( 'Woo On Sale Products', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'woo_sale_products';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
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_sale_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
+
54
+ if ( '' == $title ) {
55
+ $title = __( 'On Sale', 'themeisle-companion' );
56
+ }
57
+
58
+ $limit = ( ! empty( $instance['limit'] ) ) ? absint( $instance['limit'] ) : 4;
59
+ if ( '' == $limit ) {
60
+ $limit = 4;
61
+ }
62
+ $columns = ( ! empty( $instance['columns'] ) ) ? absint( $instance['columns'] ) : 4;
63
+
64
+ if ( '' == $columns ) {
65
+ $columns = 4;
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
+
80
+ do_action( 'storepage_homepage_before_on_sale_products' );
81
+
82
+ echo '<h2 class="section-title">' . wp_kses_post( $args['title'] ) . '</h2>';
83
+
84
+ do_action( 'storepage_homepage_after_on_sale_products_title' );
85
+
86
+ echo eaw_do_shortcode(
87
+ 'sale_products', array(
88
+ 'per_page' => intval( $args['limit'] ),
89
+ 'columns' => intval( $args['columns'] ),
90
+ )
91
+ );
92
+
93
+ do_action( 'storepage_homepage_after_on_sale_products' );
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();
101
+ wp_cache_set( 'woo_sale_products', $cache, 'widget' );
102
+ } else {
103
+ ob_end_flush();
104
+ }
105
+ }
106
+
107
+ public function update( $new_instance, $old_instance ) {
108
+ $instance = $old_instance;
109
+ $instance['title'] = strip_tags( $new_instance['title'] );
110
+ $instance['limit'] = (int) $new_instance['limit'];
111
+ $instance['columns'] = (int) ( $new_instance['columns'] );
112
+ $this->flush_widget_cache();
113
+
114
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
115
+ if ( isset( $alloptions['woo_sale_products'] ) ) {
116
+ delete_option( 'woo_sale_products' );
117
+ }
118
+
119
+ return $instance;
120
+ }
121
+
122
+ /**
123
+ * @access public
124
+ */
125
+ public function flush_widget_cache() {
126
+ wp_cache_delete( 'woo_sale_products', 'widget' );
127
+ }
128
+
129
+ /**
130
+ * @param array $instance
131
+ */
132
+ public function form( $instance ) {
133
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
134
+ $limit = isset( $instance['limit'] ) ? absint( $instance['limit'] ) : 4;
135
+ $columns = isset( $instance['columns '] ) ? absint( $instance['columns '] ) : 4; ?>
136
+ <p>
137
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
138
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
139
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
140
+ </p>
141
+
142
+ <p>
143
+ <label for="<?php echo $this->get_field_id( 'limit' ); ?>"><?php _e( 'Number of products to show:', 'themeisle-companion' ); ?></label>
144
+ <input id="<?php echo $this->get_field_id( 'limit' ); ?>"
145
+ name="<?php echo $this->get_field_name( 'limit' ); ?>" type="text" value="<?php echo $limit; ?>"
146
+ size="3"/></p>
147
+
148
+ <p>
149
+ <label for="<?php echo $this->get_field_id( 'columns' ); ?>"><?php _e( 'Number of Columns:', 'themeisle-companion' ); ?></label>
150
+ <input id="<?php echo $this->get_field_id( 'columns' ); ?>"
151
+ name="<?php echo $this->get_field_name( 'columns' ); ?>" type="text" value="<?php echo $columns; ?>"
152
+ size="3"/>
153
+ </p>
154
+ <?php
155
+ }
156
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget-plus.php ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent posts with featured image
4
+ *
5
+ * @package Elementor Addon Widgets
6
+ */
7
+
8
+ class EAW_Recent_Posts_Plus extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'widget_recent_posts_plus',
13
+ 'description' => __( 'Recent posts with featured image - ideal for use with Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'eaw-recent-posts-plus', __( 'EAW: Elementor Posts By Category', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'widget_recent_entries_plus';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
27
+ * @param array $instance
28
+ */
29
+ public function widget( $args, $instance ) {
30
+ $cache = array();
31
+ if ( ! $this->is_preview() ) {
32
+ $cache = wp_cache_get( 'widget_recent_posts_plus', '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
+
54
+ $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 3;
55
+ if ( ! $number ) {
56
+ $number = 3;
57
+ }
58
+
59
+ $category = isset( $instance['category'] ) ? $instance['category'] : '';
60
+
61
+ $show_excerpt = isset( $instance['show_excerpt'] ) ? $instance['show_excerpt'] : false;
62
+ $excerptcount = ( ! empty( $instance['excerptcount'] ) ) ? absint( $instance['excerptcount'] ) : 20;
63
+
64
+ if ( '' == $excerptcount || '0' == $excerptcount ) {
65
+ $excerptcount = 20;
66
+ }
67
+
68
+ $eawp = new WP_Query(
69
+ apply_filters(
70
+ 'eaw_widget_posts_plus_args', array(
71
+ 'posts_per_page' => $number,
72
+ 'cat' => $category,
73
+ 'no_found_rows' => true,
74
+ 'post_status' => 'publish',
75
+ 'ignore_sticky_posts' => true,
76
+ )
77
+ )
78
+ );
79
+
80
+ if ( $eawp->have_posts() ) {
81
+
82
+ echo $args['before_widget'];
83
+ if ( $title ) {
84
+ echo $args['before_title'] . $title . $args['after_title'];
85
+ }
86
+ while ( $eawp->have_posts() ) :
87
+ $eawp->the_post(); ?>
88
+ <div class="eaw-recent-posts">
89
+ <?php
90
+ if ( has_post_thumbnail() ) {
91
+ the_post_thumbnail( 'medium' );
92
+ } ?>
93
+ <div class="eaw-content">
94
+ <h3><a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a>
95
+ </h3>
96
+ <p>
97
+ <?php
98
+ if ( $show_excerpt ) {
99
+ echo wp_trim_words( get_the_excerpt(), $excerptcount, ' &hellip;' );
100
+ } ?>
101
+ </p>
102
+ </div>
103
+ </div>
104
+ <?php
105
+ endwhile;
106
+
107
+ echo $args['after_widget'];
108
+
109
+ wp_reset_postdata();
110
+
111
+ }
112
+
113
+ if ( ! $this->is_preview() ) {
114
+ $cache[ $args['widget_id'] ] = ob_get_flush();
115
+ wp_cache_set( 'widget_recent_posts_plus', $cache, 'widget' );
116
+ } else {
117
+ ob_end_flush();
118
+ }
119
+ }
120
+
121
+ public function update( $new_instance, $old_instance ) {
122
+ $instance = $old_instance;
123
+ $instance['title'] = strip_tags( $new_instance['title'] );
124
+ $instance['number'] = (int) $new_instance['number'];
125
+ $instance['category'] = wp_strip_all_tags( $new_instance['category'] );
126
+ $instance['excerptcount'] = (int) ( $new_instance['excerptcount'] );
127
+ $instance['show_excerpt'] = isset( $new_instance['show_excerpt'] ) ? (bool) $new_instance['show_excerpt'] : false;
128
+ $this->flush_widget_cache();
129
+
130
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
131
+ if ( isset( $alloptions['widget_recent_entries_plus'] ) ) {
132
+ delete_option( 'widget_recent_entries_plus' );
133
+ }
134
+
135
+ return $instance;
136
+ }
137
+
138
+ /**
139
+ * @access public
140
+ */
141
+ public function flush_widget_cache() {
142
+ wp_cache_delete( 'widget_recent_posts_plus', 'widget' );
143
+ }
144
+
145
+ /**
146
+ * @param array $instance
147
+ */
148
+ public function form( $instance ) {
149
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
150
+ $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 3;
151
+ $excerptcount = isset( $instance['excerptcount '] ) ? absint( $instance['excerptcount '] ) : 20;
152
+ $show_excerpt = isset( $instance['show_excerpt'] ) ? (bool) $instance['show_excerpt'] : false;
153
+ $category = isset( $instance['category'] ) ? $instance['category'] : ''; ?>
154
+ <p>
155
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
156
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
157
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
158
+ </p>
159
+
160
+ <p>
161
+ <label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'themeisle-companion' ); ?></label>
162
+ <input id="<?php echo $this->get_field_id( 'number' ); ?>"
163
+ name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>"
164
+ size="3"/></p>
165
+
166
+ <p>
167
+ <label for="rpjc_widget_cat_recent_posts_category"><?php _e( 'Category', 'themeisle-companion' ); ?>:</label>
168
+ <?php
169
+ wp_dropdown_categories(
170
+ array(
171
+
172
+ 'orderby' => 'title',
173
+ 'hide_empty' => false,
174
+ 'name' => $this->get_field_name( 'category' ),
175
+ 'id' => 'rpjc_widget_cat_recent_posts_category',
176
+ 'class' => 'widefat',
177
+ 'selected' => $category,
178
+ )
179
+ ); ?>
180
+ </p>
181
+
182
+ <p><input class="checkbox" type="checkbox" <?php checked( $show_excerpt ); ?>
183
+ id="<?php echo $this->get_field_id( 'show_excerpt' ); ?>"
184
+ name="<?php echo $this->get_field_name( 'show_excerpt' ); ?>"/>
185
+ <label for="<?php echo $this->get_field_id( 'show_dexcerpt' ); ?>"><?php _e( 'Display post excerpt?', 'themeisle-companion' ); ?></label>
186
+ </p>
187
+
188
+ <p>
189
+ <label for="<?php echo $this->get_field_id( 'excerptcount' ); ?>"><?php _e( 'Excerpt length to show:', 'themeisle-companion' ); ?></label>
190
+ <input id="<?php echo $this->get_field_id( 'excerptcount' ); ?>"
191
+ name="<?php echo $this->get_field_name( 'excerptcount' ); ?>" type="text"
192
+ value="<?php echo $excerptcount; ?>" size="3"/></p>
193
+ <?php }
194
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/wp/eaw-posts-widget.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Recent posts with featured image
4
+ *
5
+ * @package Elementor Addon Widgets
6
+ */
7
+
8
+ class EAW_Recent_Posts extends WP_Widget {
9
+
10
+ public function __construct() {
11
+ $widget_ops = array(
12
+ 'classname' => 'widget_recent_posts',
13
+ 'description' => __( 'Recent posts with featured image - ideal for use with Elementor Page Builder plugin', 'themeisle-companion' ),
14
+ 'customize_selective_refresh' => true,
15
+ );
16
+
17
+ parent::__construct( 'eaw-recent-posts', __( 'EAW: Elementor Recent Posts', 'themeisle-companion' ), $widget_ops );
18
+ $this->alt_option_name = 'widget_recent_entries';
19
+
20
+ add_action( 'save_post', array( $this, 'flush_widget_cache' ) );
21
+ add_action( 'deleted_post', array( $this, 'flush_widget_cache' ) );
22
+ add_action( 'switch_theme', array( $this, 'flush_widget_cache' ) );
23
+ }
24
+
25
+ /**
26
+ * @param array $args
27
+ * @param array $instance
28
+ */
29
+ public function widget( $args, $instance ) {
30
+ $cache = array();
31
+ if ( ! $this->is_preview() ) {
32
+ $cache = wp_cache_get( 'widget_recent_posts', '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
+
54
+ $number = ( ! empty( $instance['number'] ) ) ? absint( $instance['number'] ) : 3;
55
+ if ( ! $number ) {
56
+ $number = 3;
57
+ }
58
+ $show_excerpt = isset( $instance['show_excerpt'] ) ? $instance['show_excerpt'] : false;
59
+ $excerptcount = ( ! empty( $instance['excerptcount'] ) ) ? absint( $instance['excerptcount'] ) : 20;
60
+
61
+ if ( '' == $excerptcount || '0' == $excerptcount ) {
62
+ $excerptcount = 20;
63
+ }
64
+
65
+ $eawp = new WP_Query(
66
+ apply_filters(
67
+ 'eaw_widget_posts_args', array(
68
+ 'posts_per_page' => $number,
69
+ 'no_found_rows' => true,
70
+ 'post_status' => 'publish',
71
+ 'ignore_sticky_posts' => true,
72
+ )
73
+ )
74
+ );
75
+
76
+ if ( $eawp->have_posts() ) {
77
+ echo $args['before_widget'];
78
+
79
+ if ( $title ) {
80
+ echo $args['before_title'] . $title . $args['after_title'];
81
+ }
82
+
83
+ while ( $eawp->have_posts() ) :
84
+ $eawp->the_post(); ?>
85
+ <div class="eaw-recent-posts">
86
+ <?php
87
+ if ( has_post_thumbnail() ) {
88
+ the_post_thumbnail( 'medium' );
89
+ } ?>
90
+ <div class="eaw-content">
91
+ <h3><a href="<?php the_permalink(); ?>"><?php get_the_title() ? the_title() : the_ID(); ?></a>
92
+ </h3>
93
+ <p>
94
+ <?php
95
+ if ( $show_excerpt ) {
96
+ echo wp_trim_words( get_the_excerpt(), $excerptcount, ' &hellip;' );
97
+ } ?>
98
+ </p>
99
+ </div>
100
+ </div>
101
+ <?php
102
+ endwhile;
103
+
104
+ echo $args['after_widget'];
105
+
106
+ wp_reset_postdata();
107
+
108
+ }
109
+
110
+ if ( ! $this->is_preview() ) {
111
+ $cache[ $args['widget_id'] ] = ob_get_flush();
112
+ wp_cache_set( 'widget_recent_posts', $cache, 'widget' );
113
+ } else {
114
+ ob_end_flush();
115
+ }
116
+ }
117
+
118
+ public function update( $new_instance, $old_instance ) {
119
+ $instance = $old_instance;
120
+ $instance['title'] = strip_tags( $new_instance['title'] );
121
+ $instance['number'] = (int) $new_instance['number'];
122
+ $instance['excerptcount'] = (int) ( $new_instance['excerptcount'] );
123
+ $instance['show_excerpt'] = isset( $new_instance['show_excerpt'] ) ? (bool) $new_instance['show_excerpt'] : false;
124
+ $this->flush_widget_cache();
125
+
126
+ $alloptions = wp_cache_get( 'alloptions', 'options' );
127
+ if ( isset( $alloptions['widget_recent_entries'] ) ) {
128
+ delete_option( 'widget_recent_entries' );
129
+ }
130
+
131
+ return $instance;
132
+ }
133
+
134
+ /**
135
+ * @access public
136
+ */
137
+ public function flush_widget_cache() {
138
+ wp_cache_delete( 'widget_recent_posts', 'widget' );
139
+ }
140
+
141
+ /**
142
+ * @param array $instance
143
+ */
144
+ public function form( $instance ) {
145
+ $title = isset( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
146
+ $number = isset( $instance['number'] ) ? absint( $instance['number'] ) : 3;
147
+ $excerptcount = isset( $instance['excerptcount '] ) ? absint( $instance['excerptcount '] ) : 20;
148
+ $show_excerpt = isset( $instance['show_excerpt'] ) ? (bool) $instance['show_excerpt'] : false; ?>
149
+ <p>
150
+ <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'themeisle-companion' ); ?></label>
151
+ <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>"
152
+ name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo $title; ?>"/>
153
+ </p>
154
+
155
+ <p>
156
+ <label for="<?php echo $this->get_field_id( 'number' ); ?>"><?php _e( 'Number of posts to show:', 'themeisle-companion' ); ?></label>
157
+ <input id="<?php echo $this->get_field_id( 'number' ); ?>"
158
+ name="<?php echo $this->get_field_name( 'number' ); ?>" type="text" value="<?php echo $number; ?>"
159
+ size="3"/></p>
160
+
161
+ <p><input class="checkbox" type="checkbox" <?php checked( $show_excerpt ); ?>
162
+ id="<?php echo $this->get_field_id( 'show_excerpt' ); ?>"
163
+ name="<?php echo $this->get_field_name( 'show_excerpt' ); ?>"/>
164
+ <label for="<?php echo $this->get_field_id( 'show_dexcerpt' ); ?>"><?php _e( 'Display post excerpt?', 'themeisle-companion' ); ?></label>
165
+ </p>
166
+
167
+ <p>
168
+ <label for="<?php echo $this->get_field_id( 'excerptcount' ); ?>"><?php _e( 'Excerpt length to show:', 'themeisle-companion' ); ?></label>
169
+ <input id="<?php echo $this->get_field_id( 'excerptcount' ); ?>"
170
+ name="<?php echo $this->get_field_name( 'excerptcount' ); ?>" type="text"
171
+ value="<?php echo $excerptcount; ?>" size="3"/></p>
172
+ <?php
173
+ }
174
+ }
vendor/codeinwp/full-width-page-templates/builders/class-elementor-full-width-templates.php CHANGED
@@ -104,7 +104,7 @@ class Elementor {
104
  */
105
  public function __clone() {
106
  // Cloning instances of the class is forbidden.
107
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
108
  }
109
 
110
  /**
@@ -116,6 +116,6 @@ class Elementor {
116
  */
117
  public function __wakeup() {
118
  // Unserializing instances of the class is forbidden.
119
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
120
  }
121
  }
104
  */
105
  public function __clone() {
106
  // Cloning instances of the class is forbidden.
107
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
108
  }
109
 
110
  /**
116
  */
117
  public function __wakeup() {
118
  // Unserializing instances of the class is forbidden.
119
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
120
  }
121
  }
vendor/codeinwp/full-width-page-templates/class-full-width-templates.php CHANGED
@@ -35,8 +35,8 @@ if ( ! class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
35
  protected function init() {
36
  // Add your templates to this array.
37
  $this->templates = apply_filters( 'fwpt_templates_list', array(
38
- 'templates/builder-fullwidth.php' => '&harr; ' . __( 'Page Builder - Full Width - Blank', 'textdomain' ),
39
- 'templates/builder-fullwidth-std.php' => '&harr; ' . __( 'Page Builder - Full Width', 'textdomain' ),
40
  ) );
41
 
42
  add_filter( 'theme_page_templates', array( $this, 'add_pages_in_dropdown' ) );
@@ -185,7 +185,7 @@ if ( ! class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
185
  */
186
  public function __clone() {
187
  // Cloning instances of the class is forbidden.
188
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
189
  }
190
 
191
  /**
@@ -197,7 +197,7 @@ if ( ! class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
197
  */
198
  public function __wakeup() {
199
  // Unserializing instances of the class is forbidden.
200
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
201
  }
202
  }
203
  }
35
  protected function init() {
36
  // Add your templates to this array.
37
  $this->templates = apply_filters( 'fwpt_templates_list', array(
38
+ 'templates/builder-fullwidth.php' => '&harr; ' . __( 'Page Builder - Full Width - Blank', 'themeisle-companion' ),
39
+ 'templates/builder-fullwidth-std.php' => '&harr; ' . __( 'Page Builder - Full Width', 'themeisle-companion' ),
40
  ) );
41
 
42
  add_filter( 'theme_page_templates', array( $this, 'add_pages_in_dropdown' ) );
185
  */
186
  public function __clone() {
187
  // Cloning instances of the class is forbidden.
188
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
189
  }
190
 
191
  /**
197
  */
198
  public function __wakeup() {
199
  // Unserializing instances of the class is forbidden.
200
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
201
  }
202
  }
203
  }
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-base.php CHANGED
@@ -70,12 +70,12 @@ abstract class BeaverModule extends \FLBuilderModule {
70
  foreach ( $this->forms_config as $key => $val ) {
71
  if ( 'fields' === $key ) {
72
  $args['general']['sections']['settings'] = array(
73
- 'title' => esc_html__( 'Fields', 'textdomain' ),
74
  'fields' => array(
75
  'fields' => array(
76
  'multiple' => true,
77
  'type' => 'form',
78
- 'label' => esc_html__( 'Field', 'textdomain' ),
79
  'form' => 'field',
80
  'preview_text' => 'label',
81
  'default' => $fields
@@ -85,7 +85,7 @@ abstract class BeaverModule extends \FLBuilderModule {
85
  continue;
86
  } elseif ( 'controls' === $key ) {
87
  $args['general']['sections']['controls'] = array(
88
- 'title' => esc_html__( 'Form Settings', 'textdomain' ),
89
  'fields' => $controls
90
  );
91
  }
@@ -95,34 +95,34 @@ abstract class BeaverModule extends \FLBuilderModule {
95
 
96
  \FLBuilder::register_settings_form(
97
  'field', array(
98
- 'title' => esc_html__( 'Field', 'textdomain' ),
99
  'tabs' => array(
100
  'general' => array(
101
- 'title' => esc_html__( 'Field', 'textdomain' ),
102
  'sections' => array(
103
  'fields' => array(
104
- 'title' => esc_html__( 'Field', 'textdomain' ),
105
  'fields' => array(
106
  'label' => array(
107
  'type' => 'text',
108
- 'label' => esc_html__( 'Label', 'textdomain' ),
109
  ),
110
  'type' => array(
111
  'type' => 'select',
112
- 'label' => esc_html__( 'Type', 'textdomain' ),
113
  'options' => array(
114
- 'text' => esc_html__( 'Text' ),
115
- 'text' => esc_html__( 'Email' ),
116
- 'textarea' => esc_html__( 'Textarea', 'textdomain' ),
117
- 'password' => esc_html__( 'Password', 'textdomain' ),
118
  )
119
  ),
120
  'required' => array(
121
  'type' => 'select',
122
- 'label' => esc_html__( 'Is required?', 'textdomain' ),
123
  'options' => array(
124
- 'required' => esc_html__( 'Required', 'textdomain' ),
125
- 'optional' => esc_html__( 'Optional', 'textdomain' )
126
  )
127
  )
128
  ),
70
  foreach ( $this->forms_config as $key => $val ) {
71
  if ( 'fields' === $key ) {
72
  $args['general']['sections']['settings'] = array(
73
+ 'title' => esc_html__( 'Fields', 'themeisle-companion' ),
74
  'fields' => array(
75
  'fields' => array(
76
  'multiple' => true,
77
  'type' => 'form',
78
+ 'label' => esc_html__( 'Field', 'themeisle-companion' ),
79
  'form' => 'field',
80
  'preview_text' => 'label',
81
  'default' => $fields
85
  continue;
86
  } elseif ( 'controls' === $key ) {
87
  $args['general']['sections']['controls'] = array(
88
+ 'title' => esc_html__( 'Form Settings', 'themeisle-companion' ),
89
  'fields' => $controls
90
  );
91
  }
95
 
96
  \FLBuilder::register_settings_form(
97
  'field', array(
98
+ 'title' => esc_html__( 'Field', 'themeisle-companion' ),
99
  'tabs' => array(
100
  'general' => array(
101
+ 'title' => esc_html__( 'Field', 'themeisle-companion' ),
102
  'sections' => array(
103
  'fields' => array(
104
+ 'title' => esc_html__( 'Field', 'themeisle-companion' ),
105
  'fields' => array(
106
  'label' => array(
107
  'type' => 'text',
108
+ 'label' => esc_html__( 'Label', 'themeisle-companion' ),
109
  ),
110
  'type' => array(
111
  'type' => 'select',
112
+ 'label' => esc_html__( 'Type', 'themeisle-companion' ),
113
  'options' => array(
114
+ 'text' => esc_html__( 'Text', 'themeisle-companion' ),
115
+ 'text' => esc_html__( 'Email', 'themeisle-companion' ),
116
+ 'textarea' => esc_html__( 'Textarea', 'themeisle-companion' ),
117
+ 'password' => esc_html__( 'Password', 'themeisle-companion' ),
118
  )
119
  ),
120
  'required' => array(
121
  'type' => 'select',
122
+ 'label' => esc_html__( 'Is required?', 'themeisle-companion' ),
123
  'options' => array(
124
+ 'required' => esc_html__( 'Required', 'themeisle-companion' ),
125
+ 'optional' => esc_html__( 'Optional', 'themeisle-companion' )
126
  )
127
  )
128
  ),
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-contact.php CHANGED
@@ -16,9 +16,9 @@ class BeaverModuleContact extends BeaverModule {
16
 
17
  parent::__construct(
18
  array(
19
- 'name' => esc_html__( 'Contact', 'textdomain' ),
20
- 'description' => esc_html__( 'A contact form.', 'textdomain' ),
21
- 'category' => esc_html__( 'OrbitFox Modules', 'textdomain' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
16
 
17
  parent::__construct(
18
  array(
19
+ 'name' => esc_html__( 'Contact', 'themeisle-companion' ),
20
+ 'description' => esc_html__( 'A contact form.', 'themeisle-companion' ),
21
+ 'category' => esc_html__( 'OrbitFox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-newsletter.php CHANGED
@@ -16,9 +16,9 @@ class BeaverModuleNewsletter extends BeaverModule {
16
 
17
  parent::__construct(
18
  array(
19
- 'name' => esc_html__( 'Newsletter', 'textdomain' ),
20
- 'description' => esc_html__( 'A simple newsletter form.', 'textdomain' ),
21
- 'category' => esc_html__( 'OrbitFox Modules', 'textdomain' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
16
 
17
  parent::__construct(
18
  array(
19
+ 'name' => esc_html__( 'Newsletter', 'themeisle-companion' ),
20
+ 'description' => esc_html__( 'A simple newsletter form.', 'themeisle-companion' ),
21
+ 'category' => esc_html__( 'OrbitFox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-registration.php CHANGED
@@ -16,9 +16,9 @@ class BeaverModuleRegistration extends BeaverModule {
16
 
17
  parent::__construct(
18
  array(
19
- 'name' => esc_html__( 'Registration', 'textdomain' ),
20
- 'description' => esc_html__( 'A sign up form.', 'textdomain' ),
21
- 'category' => esc_html__( 'OrbitFox Modules', 'textdomain' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
16
 
17
  parent::__construct(
18
  array(
19
+ 'name' => esc_html__( 'Registration', 'themeisle-companion' ),
20
+ 'description' => esc_html__( 'A sign up form.', 'themeisle-companion' ),
21
+ 'category' => esc_html__( 'OrbitFox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
vendor/codeinwp/themeisle-content-forms/beaver/includes/frontend.php CHANGED
@@ -16,7 +16,7 @@ foreach ( $controls as $control_name => $control ) {
16
  <div class="content-forms-required">
17
  <?php
18
  printf(
19
- esc_html__( 'The %s setting is required!', 'textdomain' ),
20
  '<strong>' . $control['label'] . '</strong>'
21
  ); ?>
22
  </div>
@@ -37,7 +37,7 @@ foreach ( $fields as $key => $field ) {
37
  $controls = $form_settings['controls'];
38
 
39
  /** == FORM SUBMIT BUTTON == */
40
- $btn_label = esc_html__( 'Submit', 'textdomain' );
41
 
42
  if ( ! empty( $settings->submit_label ) ) {
43
  $btn_label = $settings->submit_label;
16
  <div class="content-forms-required">
17
  <?php
18
  printf(
19
+ esc_html__( 'The %s setting is required!', 'themeisle-companion' ),
20
  '<strong>' . $control['label'] . '</strong>'
21
  ); ?>
22
  </div>
37
  $controls = $form_settings['controls'];
38
 
39
  /** == FORM SUBMIT BUTTON == */
40
+ $btn_label = esc_html__( 'Submit', 'themeisle-companion' );
41
 
42
  if ( ! empty( $settings->submit_label ) ) {
43
  $btn_label = $settings->submit_label;
vendor/codeinwp/themeisle-content-forms/class-content-form-base.php CHANGED
@@ -164,11 +164,18 @@ abstract class ContentFormBase {
164
  $categories = \Elementor\Plugin::instance()->elements_manager->get_categories();
165
 
166
  if ( ! isset( $categories['obfx-elementor-widgets'] ) ) {
 
 
 
 
 
 
 
167
  \Elementor\Plugin::instance()->elements_manager->add_category(
168
- 'obfx-elementor-widgets',
169
  array(
170
- 'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
171
- 'icon' => 'fa fa-plug',
172
  ),
173
  1
174
  );
164
  $categories = \Elementor\Plugin::instance()->elements_manager->get_categories();
165
 
166
  if ( ! isset( $categories['obfx-elementor-widgets'] ) ) {
167
+
168
+ $category_args = apply_filters( 'content_forms_category_args', array(
169
+ 'slug' => 'obfx-elementor-widgets',
170
+ 'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
171
+ 'icon' => 'fa fa-plug',
172
+ ) );
173
+
174
  \Elementor\Plugin::instance()->elements_manager->add_category(
175
+ $category_args['slug'],
176
  array(
177
+ 'title' => $category_args['title'],
178
+ 'icon' => $category_args['slug'],
179
  ),
180
  1
181
  );
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-contact.php CHANGED
@@ -23,8 +23,8 @@ class ContactForm extends Base {
23
  $this->set_type( 'contact' );
24
 
25
  $this->notices = array(
26
- 'success' => esc_html__( 'Your message has been sent!', 'textdomain' ),
27
- 'error' => esc_html__( 'We failed to send your message!', 'textdomain' ),
28
  );
29
 
30
  }
@@ -40,34 +40,34 @@ class ContactForm extends Base {
40
  return array(
41
  'id' => 'contact',
42
  'icon' => 'eicon-align-left',
43
- 'title' => esc_html__( 'Contact Form' ),
44
  'fields' /* or form_fields? */ => array(
45
  'name' => array(
46
  'type' => 'text',
47
- 'label' => esc_html__( 'Name' ),
48
- 'default' => esc_html__( 'Name' ),
49
- 'placeholder' => esc_html__( 'Your Name' ),
50
  'require' => 'required'
51
  ),
52
  'email' => array(
53
  'type' => 'email',
54
- 'label' => esc_html__( 'Email' ),
55
- 'default' => esc_html__( 'Email' ),
56
- 'placeholder' => esc_html__( 'Email address' ),
57
  'require' => 'required'
58
  ),
59
  'phone' => array(
60
  'type' => 'number',
61
- 'label' => esc_html__( 'Phone' ),
62
- 'default' => esc_html__( 'Phone' ),
63
- 'placeholder' => esc_html__( 'Phone Nr' ),
64
  'require' => 'optional'
65
  ),
66
  'message' => array(
67
  'type' => 'textarea',
68
- 'label' => esc_html__( 'Message' ),
69
- 'default' => esc_html__( 'Message' ),
70
- 'placeholder' => esc_html__( 'Your message' ),
71
  'require' => 'required'
72
  )
73
  ),
@@ -75,15 +75,15 @@ class ContactForm extends Base {
75
  'controls' /* or settings? */ => array(
76
  'to_send_email' => array(
77
  'type' => 'text',
78
- 'label' => esc_html__( 'Send to', 'textdomain' ),
79
- 'description' => esc_html__( 'Where should we send the email?', 'textdomain' ),
80
  'default' => get_bloginfo( 'admin_email' )
81
  ),
82
  'submit_label' => array(
83
  'type' => 'text',
84
- 'label' => esc_html__( 'Submit', 'textdomain' ),
85
- 'default' => esc_html__( 'Submit', 'textdomain' ),
86
- 'description' => esc_html__( 'The Call To Action label', 'textdomain' )
87
  )
88
  )
89
  );
@@ -104,7 +104,7 @@ class ContactForm extends Base {
104
  public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
105
 
106
  if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
107
- $return['msg'] = esc_html__( 'Invalid email.', 'textdomain' );
108
 
109
  return $return;
110
  }
@@ -112,7 +112,7 @@ class ContactForm extends Base {
112
  $from = $data['email'];
113
 
114
  if ( empty( $data['name'] ) ) {
115
- $return['msg'] = esc_html__( 'Missing name.', 'textdomain' );
116
 
117
  return $return;
118
  }
@@ -120,7 +120,7 @@ class ContactForm extends Base {
120
  $name = $data['name'];
121
 
122
  if ( empty( $data['message'] ) ) {
123
- $return['msg'] = esc_html__( 'Missing message.', 'textdomain' );
124
 
125
  return $return;
126
  }
@@ -131,7 +131,7 @@ class ContactForm extends Base {
131
  $settings = $this->get_widget_settings( $widget_id, $post_id, $builder );
132
 
133
  if ( ! isset( $settings['to_send_email'] ) || ! is_email( $settings['to_send_email'] ) ) {
134
- $return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'textdomain' );
135
 
136
  return $return;
137
  }
@@ -142,7 +142,7 @@ class ContactForm extends Base {
142
  $return['success'] = true;
143
  $return['msg'] = $this->notices['success'];
144
  } else {
145
- $return['msg'] = esc_html__( 'Ops! I cannot send this email!', 'textdomain' );
146
  }
147
 
148
  return $return;
@@ -202,7 +202,7 @@ class ContactForm extends Base {
202
  <!-- view port meta tag -->
203
  <meta name="viewport" content="width=device-width, initial-scale=1">
204
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
205
- <title><?php echo esc_html__( 'Mail From: ', 'textdomain' ) . esc_html( $data['name'] ); ?></title>
206
  </head>
207
  <body>
208
  <table>
@@ -210,7 +210,7 @@ class ContactForm extends Base {
210
  <tr>
211
  <th>
212
  <h3>
213
- <?php esc_html_e( 'Content Form submission from ', 'textdomain' ); ?>
214
  <a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
215
  </h3>
216
  <hr/>
@@ -232,7 +232,7 @@ class ContactForm extends Base {
232
  <tr>
233
  <td>
234
  <hr/>
235
- <?php esc_html_e( 'You recieved this email because your email address is set in the content form settings on ' ) ?>
236
  <a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
237
  </td>
238
  </tr>
@@ -288,7 +288,7 @@ class ContactForm extends Base {
288
  */
289
  public function __clone() {
290
  // Cloning instances of the class is forbidden.
291
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
292
  }
293
 
294
  /**
@@ -300,6 +300,6 @@ class ContactForm extends Base {
300
  */
301
  public function __wakeup() {
302
  // Unserializing instances of the class is forbidden.
303
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
304
  }
305
  }
23
  $this->set_type( 'contact' );
24
 
25
  $this->notices = array(
26
+ 'success' => esc_html__( 'Your message has been sent!', 'themeisle-companion' ),
27
+ 'error' => esc_html__( 'We failed to send your message!', 'themeisle-companion' ),
28
  );
29
 
30
  }
40
  return array(
41
  'id' => 'contact',
42
  'icon' => 'eicon-align-left',
43
+ 'title' => esc_html__( 'Contact Form', 'themeisle-companion' ),
44
  'fields' /* or form_fields? */ => array(
45
  'name' => array(
46
  'type' => 'text',
47
+ 'label' => esc_html__( 'Name', 'themeisle-companion' ),
48
+ 'default' => esc_html__( 'Name', 'themeisle-companion' ),
49
+ 'placeholder' => esc_html__( 'Your Name', 'themeisle-companion' ),
50
  'require' => 'required'
51
  ),
52
  'email' => array(
53
  'type' => 'email',
54
+ 'label' => esc_html__( 'Email', 'themeisle-companion' ),
55
+ 'default' => esc_html__( 'Email', 'themeisle-companion' ),
56
+ 'placeholder' => esc_html__( 'Email address', 'themeisle-companion' ),
57
  'require' => 'required'
58
  ),
59
  'phone' => array(
60
  'type' => 'number',
61
+ 'label' => esc_html__( 'Phone', 'themeisle-companion' ),
62
+ 'default' => esc_html__( 'Phone', 'themeisle-companion' ),
63
+ 'placeholder' => esc_html__( 'Phone Nr', 'themeisle-companion' ),
64
  'require' => 'optional'
65
  ),
66
  'message' => array(
67
  'type' => 'textarea',
68
+ 'label' => esc_html__( 'Message', 'themeisle-companion' ),
69
+ 'default' => esc_html__( 'Message', 'themeisle-companion' ),
70
+ 'placeholder' => esc_html__( 'Your message', 'themeisle-companion' ),
71
  'require' => 'required'
72
  )
73
  ),
75
  'controls' /* or settings? */ => array(
76
  'to_send_email' => array(
77
  'type' => 'text',
78
+ 'label' => esc_html__( 'Send to', 'themeisle-companion' ),
79
+ 'description' => esc_html__( 'Where should we send the email?', 'themeisle-companion' ),
80
  'default' => get_bloginfo( 'admin_email' )
81
  ),
82
  'submit_label' => array(
83
  'type' => 'text',
84
+ 'label' => esc_html__( 'Submit', 'themeisle-companion' ),
85
+ 'default' => esc_html__( 'Submit', 'themeisle-companion' ),
86
+ 'description' => esc_html__( 'The Call To Action label', 'themeisle-companion' )
87
  )
88
  )
89
  );
104
  public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
105
 
106
  if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
107
+ $return['msg'] = esc_html__( 'Invalid email.', 'themeisle-companion' );
108
 
109
  return $return;
110
  }
112
  $from = $data['email'];
113
 
114
  if ( empty( $data['name'] ) ) {
115
+ $return['msg'] = esc_html__( 'Missing name.', 'themeisle-companion' );
116
 
117
  return $return;
118
  }
120
  $name = $data['name'];
121
 
122
  if ( empty( $data['message'] ) ) {
123
+ $return['msg'] = esc_html__( 'Missing message.', 'themeisle-companion' );
124
 
125
  return $return;
126
  }
131
  $settings = $this->get_widget_settings( $widget_id, $post_id, $builder );
132
 
133
  if ( ! isset( $settings['to_send_email'] ) || ! is_email( $settings['to_send_email'] ) ) {
134
+ $return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'themeisle-companion' );
135
 
136
  return $return;
137
  }
142
  $return['success'] = true;
143
  $return['msg'] = $this->notices['success'];
144
  } else {
145
+ $return['msg'] = esc_html__( 'Ops! I cannot send this email!', 'themeisle-companion' );
146
  }
147
 
148
  return $return;
202
  <!-- view port meta tag -->
203
  <meta name="viewport" content="width=device-width, initial-scale=1">
204
  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
205
+ <title><?php echo esc_html__( 'Mail From: ', 'themeisle-companion' ) . esc_html( $data['name'] ); ?></title>
206
  </head>
207
  <body>
208
  <table>
210
  <tr>
211
  <th>
212
  <h3>
213
+ <?php esc_html_e( 'Content Form submission from ', 'themeisle-companion' ); ?>
214
  <a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
215
  </h3>
216
  <hr/>
232
  <tr>
233
  <td>
234
  <hr/>
235
+ <?php esc_html_e( 'You recieved this email because your email address is set in the content form settings on ', 'themeisle-companion' ) ?>
236
  <a href="<?php echo esc_url( get_site_url() ); ?>"><?php bloginfo( 'name' ); ?></a>
237
  </td>
238
  </tr>
288
  */
289
  public function __clone() {
290
  // Cloning instances of the class is forbidden.
291
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
292
  }
293
 
294
  /**
300
  */
301
  public function __wakeup() {
302
  // Unserializing instances of the class is forbidden.
303
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
304
  }
305
  }
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-elementor.php CHANGED
@@ -96,7 +96,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
96
  $this->start_controls_section(
97
  'section_form_settings',
98
  array(
99
- 'label' => __( 'Form Settings', 'textdomain' ),
100
  )
101
  );
102
 
@@ -127,7 +127,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
127
 
128
  $this->start_controls_section(
129
  $this->form_type . '_form_fields',
130
- array( 'label' => __( 'Fields', 'textdomain' ) )
131
  );
132
 
133
  $repeater = new \Elementor\Repeater();
@@ -135,7 +135,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
135
  $repeater->add_control(
136
  'label',
137
  array(
138
- 'label' => __( 'Label', 'textdomain' ),
139
  'type' => \Elementor\Controls_Manager::TEXT,
140
  'default' => '',
141
  )
@@ -144,7 +144,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
144
  $repeater->add_control(
145
  'placeholder',
146
  array(
147
- 'label' => __( 'Placeholder', 'textdomain' ),
148
  'type' => \Elementor\Controls_Manager::TEXT,
149
  'default' => '',
150
  )
@@ -153,22 +153,22 @@ class ElementorWidget extends \Elementor\Widget_Base {
153
  $repeater->add_control(
154
  'requirement',
155
  array(
156
- 'label' => __( 'Requirement', 'textdomain' ),
157
  'type' => \Elementor\Controls_Manager::SELECT,
158
  'options' => array(
159
- 'required' => esc_html__( 'Required' ),
160
- 'optional' => esc_html__( 'Optional' )
161
  ),
162
  'default' => 'optional',
163
  )
164
  );
165
 
166
  $field_types = array(
167
- 'text' => __( 'Text', 'textdomain' ),
168
- 'password' => __( 'Password', 'textdomain' ),
169
  // 'tel' => __( 'Tel', 'textdomain' ),
170
- 'email' => __( 'Email', 'textdomain' ),
171
- 'textarea' => __( 'Textarea', 'textdomain' ),
172
  // 'number' => __( 'Number', 'textdomain' ),
173
  // 'select' => __( 'Select', 'textdomain' ),
174
  // 'url' => __( 'URL', 'textdomain' ),
@@ -177,7 +177,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
177
  $repeater->add_control(
178
  'type',
179
  array(
180
- 'label' => __( 'Type', 'textdomain' ),
181
  'type' => \Elementor\Controls_Manager::SELECT,
182
  'options' => $field_types,
183
  'default' => 'text'
@@ -187,7 +187,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
187
  $repeater->add_control(
188
  'key',
189
  array(
190
- 'label' => __( 'Key', 'textdomain' ),
191
  'type' => \Elementor\Controls_Manager::HIDDEN
192
  )
193
  );
@@ -210,7 +210,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
210
  $this->add_control(
211
  'form_fields',
212
  array(
213
- 'label' => __( 'Form Fields', 'textdomain' ),
214
  'type' => \Elementor\Controls_Manager::REPEATER,
215
  'show_label' => false,
216
  'separator' => 'before',
@@ -255,7 +255,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
255
  <div class="content-forms-required">
256
  <?php
257
  printf(
258
- esc_html__( 'The %s setting is required!', 'textdomain' ),
259
  '<strong>' . $control['label'] . '</strong>'
260
  ); ?>
261
  </div>
@@ -269,7 +269,7 @@ class ElementorWidget extends \Elementor\Widget_Base {
269
  $this->render_form_field( $field );
270
  }
271
 
272
- $btn_label = esc_html__( 'Submit', 'textdomain' );
273
 
274
  if ( ! empty( $controls['submit_label'] ) ) {
275
  $btn_label = $this->get_settings( 'submit_label' );
@@ -305,7 +305,6 @@ class ElementorWidget extends \Elementor\Widget_Base {
305
  * Display method for the form's header
306
  * It is also takes care about the form attributes and the regular hidden fields
307
  *
308
- * @param $type
309
  * @param $id
310
  */
311
  private function render_form_header( $id ) {
@@ -482,7 +481,9 @@ class ElementorWidget extends \Elementor\Widget_Base {
482
  * @return array
483
  */
484
  public function get_categories() {
485
- return array( 'obfx-elementor-widgets' );
 
 
486
  }
487
 
488
  /**
96
  $this->start_controls_section(
97
  'section_form_settings',
98
  array(
99
+ 'label' => __( 'Form Settings', 'themeisle-companion' ),
100
  )
101
  );
102
 
127
 
128
  $this->start_controls_section(
129
  $this->form_type . '_form_fields',
130
+ array( 'label' => __( 'Fields', 'themeisle-companion' ) )
131
  );
132
 
133
  $repeater = new \Elementor\Repeater();
135
  $repeater->add_control(
136
  'label',
137
  array(
138
+ 'label' => __( 'Label', 'themeisle-companion' ),
139
  'type' => \Elementor\Controls_Manager::TEXT,
140
  'default' => '',
141
  )
144
  $repeater->add_control(
145
  'placeholder',
146
  array(
147
+ 'label' => __( 'Placeholder', 'themeisle-companion' ),
148
  'type' => \Elementor\Controls_Manager::TEXT,
149
  'default' => '',
150
  )
153
  $repeater->add_control(
154
  'requirement',
155
  array(
156
+ 'label' => __( 'Requirement', 'themeisle-companion' ),
157
  'type' => \Elementor\Controls_Manager::SELECT,
158
  'options' => array(
159
+ 'required' => esc_html__( 'Required', 'themeisle-companion' ),
160
+ 'optional' => esc_html__( 'Optional', 'themeisle-companion' )
161
  ),
162
  'default' => 'optional',
163
  )
164
  );
165
 
166
  $field_types = array(
167
+ 'text' => __( 'Text', 'themeisle-companion' ),
168
+ 'password' => __( 'Password', 'themeisle-companion' ),
169
  // 'tel' => __( 'Tel', 'textdomain' ),
170
+ 'email' => __( 'Email', 'themeisle-companion' ),
171
+ 'textarea' => __( 'Textarea', 'themeisle-companion' ),
172
  // 'number' => __( 'Number', 'textdomain' ),
173
  // 'select' => __( 'Select', 'textdomain' ),
174
  // 'url' => __( 'URL', 'textdomain' ),
177
  $repeater->add_control(
178
  'type',
179
  array(
180
+ 'label' => __( 'Type', 'themeisle-companion' ),
181
  'type' => \Elementor\Controls_Manager::SELECT,
182
  'options' => $field_types,
183
  'default' => 'text'
187
  $repeater->add_control(
188
  'key',
189
  array(
190
+ 'label' => __( 'Key', 'themeisle-companion' ),
191
  'type' => \Elementor\Controls_Manager::HIDDEN
192
  )
193
  );
210
  $this->add_control(
211
  'form_fields',
212
  array(
213
+ 'label' => __( 'Form Fields', 'themeisle-companion' ),
214
  'type' => \Elementor\Controls_Manager::REPEATER,
215
  'show_label' => false,
216
  'separator' => 'before',
255
  <div class="content-forms-required">
256
  <?php
257
  printf(
258
+ esc_html__( 'The %s setting is required!', 'themeisle-companion' ),
259
  '<strong>' . $control['label'] . '</strong>'
260
  ); ?>
261
  </div>
269
  $this->render_form_field( $field );
270
  }
271
 
272
+ $btn_label = esc_html__( 'Submit', 'themeisle-companion' );
273
 
274
  if ( ! empty( $controls['submit_label'] ) ) {
275
  $btn_label = $this->get_settings( 'submit_label' );
305
  * Display method for the form's header
306
  * It is also takes care about the form attributes and the regular hidden fields
307
  *
 
308
  * @param $id
309
  */
310
  private function render_form_header( $id ) {
481
  * @return array
482
  */
483
  public function get_categories() {
484
+ $category_args = apply_filters( 'content_forms_category_args', array() );
485
+ $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
486
+ return [ $slug ];
487
  }
488
 
489
  /**
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-gutenberg.php CHANGED
@@ -95,7 +95,7 @@ class GutenbergModule {
95
  $form_footer = $this->render_form_footer();
96
 
97
 
98
- $btn_label = esc_html__( 'Submit', 'textdomain' );
99
  ob_start();
100
  if ( ! empty( $attributes['submit_label'] ) ) {
101
  $btn_label = $attributes['submit_label'];
95
  $form_footer = $this->render_form_footer();
96
 
97
 
98
+ $btn_label = esc_html__( 'Submit', 'themeisle-companion' );
99
  ob_start();
100
  if ( ! empty( $attributes['submit_label'] ) ) {
101
  $btn_label = $attributes['submit_label'];
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-newsletter.php CHANGED
@@ -22,8 +22,8 @@ class NewsletterForm extends Base {
22
  $this->set_type( 'newsletter' );
23
 
24
  $this->notices = array(
25
- 'success' => esc_html__( 'Welcome to our newsletter!', 'textdomain' ),
26
- 'error' => esc_html__( 'Action failed!', 'textdomain' ),
27
  );
28
  }
29
 
@@ -38,43 +38,43 @@ class NewsletterForm extends Base {
38
  return array(
39
  'id' => 'newsletter',
40
  'icon' => 'eicon-align-left',
41
- 'title' => esc_html__( 'Newsletter Form' ),
42
 
43
  'controls' => array(
44
  'provider' => array(
45
  'type' => 'select',
46
- 'label' => esc_html__( 'Subscribe to', 'textdomain' ),
47
- 'description' => esc_html__( 'Where to send the email?', 'textdomain' ),
48
  'options' => array(
49
- 'mailchimp' => esc_html__( 'MailChimp', 'textdomain' ),
50
- 'sendinblue' => esc_html__( 'Sendinblue ', 'textdomain' )
51
  )
52
  ),
53
  'access_key' => array(
54
  'type' => 'text',
55
- 'label' => esc_html__( 'Access Key', 'textdomain' ),
56
- 'description' => esc_html__( 'Provide an access key for the selected service', 'textdomain' ),
57
  'required' => true
58
  ),
59
  'list_id' => array(
60
  'type' => 'text',
61
- 'label' => esc_html__( 'List ID', 'textdomain' ),
62
- 'description' => esc_html__( 'The List ID (based on the seleced service) where we should subscribe the user', 'textdomain' ),
63
  'required' => true
64
  ),
65
  'submit_label' => array(
66
  'type' => 'text',
67
- 'label' => esc_html__( 'Submit Label', 'textdomain' ),
68
- 'default' => esc_html__( 'Join Newsletter', 'textdomain' ),
69
  )
70
  ),
71
 
72
  'fields' => array(
73
  'email' => array(
74
  'type' => 'email',
75
- 'label' => esc_html__( 'Email', 'textdomain' ),
76
- 'default' => esc_html__( 'Email', 'textdomain' ),
77
- 'placeholder' => esc_html__( 'Email', 'textdomain' ),
78
  'require' => 'required'
79
  )
80
  ),
@@ -96,7 +96,7 @@ class NewsletterForm extends Base {
96
  public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
97
 
98
  if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
99
- $return['msg'] = esc_html__( 'Invalid email.', 'textdomain' );
100
 
101
  return $return;
102
  }
@@ -115,7 +115,7 @@ class NewsletterForm extends Base {
115
  $providerArgs = array();
116
 
117
  if ( empty( $settings['access_key'] ) || empty( $settings['list_id'] ) ) {
118
- $return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'textdomain' );
119
 
120
  return $return;
121
  }
@@ -253,7 +253,7 @@ class NewsletterForm extends Base {
253
  */
254
  public function __clone() {
255
  // Cloning instances of the class is forbidden.
256
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
257
  }
258
 
259
  /**
@@ -265,6 +265,6 @@ class NewsletterForm extends Base {
265
  */
266
  public function __wakeup() {
267
  // Unserializing instances of the class is forbidden.
268
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
269
  }
270
  }
22
  $this->set_type( 'newsletter' );
23
 
24
  $this->notices = array(
25
+ 'success' => esc_html__( 'Welcome to our newsletter!', 'themeisle-companion' ),
26
+ 'error' => esc_html__( 'Action failed!', 'themeisle-companion' ),
27
  );
28
  }
29
 
38
  return array(
39
  'id' => 'newsletter',
40
  'icon' => 'eicon-align-left',
41
+ 'title' => esc_html__( 'Newsletter Form', 'themeisle-companion' ),
42
 
43
  'controls' => array(
44
  'provider' => array(
45
  'type' => 'select',
46
+ 'label' => esc_html__( 'Subscribe to', 'themeisle-companion' ),
47
+ 'description' => esc_html__( 'Where to send the email?', 'themeisle-companion' ),
48
  'options' => array(
49
+ 'mailchimp' => esc_html__( 'MailChimp', 'themeisle-companion' ),
50
+ 'sendinblue' => esc_html__( 'Sendinblue ', 'themeisle-companion' )
51
  )
52
  ),
53
  'access_key' => array(
54
  'type' => 'text',
55
+ 'label' => esc_html__( 'Access Key', 'themeisle-companion' ),
56
+ 'description' => esc_html__( 'Provide an access key for the selected service', 'themeisle-companion' ),
57
  'required' => true
58
  ),
59
  'list_id' => array(
60
  'type' => 'text',
61
+ 'label' => esc_html__( 'List ID', 'themeisle-companion' ),
62
+ 'description' => esc_html__( 'The List ID (based on the seleced service) where we should subscribe the user', 'themeisle-companion' ),
63
  'required' => true
64
  ),
65
  'submit_label' => array(
66
  'type' => 'text',
67
+ 'label' => esc_html__( 'Submit Label', 'themeisle-companion' ),
68
+ 'default' => esc_html__( 'Join Newsletter', 'themeisle-companion' ),
69
  )
70
  ),
71
 
72
  'fields' => array(
73
  'email' => array(
74
  'type' => 'email',
75
+ 'label' => esc_html__( 'Email', 'themeisle-companion' ),
76
+ 'default' => esc_html__( 'Email', 'themeisle-companion' ),
77
+ 'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),
78
  'require' => 'required'
79
  )
80
  ),
96
  public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
97
 
98
  if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
99
+ $return['msg'] = esc_html__( 'Invalid email.', 'themeisle-companion' );
100
 
101
  return $return;
102
  }
115
  $providerArgs = array();
116
 
117
  if ( empty( $settings['access_key'] ) || empty( $settings['list_id'] ) ) {
118
+ $return['msg'] = esc_html__( 'Wrong email configuration! Please contact administration!', 'themeisle-companion' );
119
 
120
  return $return;
121
  }
253
  */
254
  public function __clone() {
255
  // Cloning instances of the class is forbidden.
256
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
257
  }
258
 
259
  /**
265
  */
266
  public function __wakeup() {
267
  // Unserializing instances of the class is forbidden.
268
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
269
  }
270
  }
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-registration.php CHANGED
@@ -22,8 +22,8 @@ class RegistrationForm extends Base {
22
  $this->set_type( 'registration' );
23
 
24
  $this->notices = array(
25
- 'success' => esc_html__( 'Your message has been sent!', 'textdomain' ),
26
- 'error' => esc_html__( 'We failed to send your message!', 'textdomain' ),
27
  );
28
  }
29
 
@@ -39,29 +39,29 @@ class RegistrationForm extends Base {
39
  return array(
40
  'id' => $this->get_type(),
41
  'icon' => 'eicon-align-left',
42
- 'title' => esc_html__( 'User Registration Form' ),
43
 
44
  'fields' => array(
45
  'username' => array(
46
  'type' => 'text',
47
- 'label' => esc_html__( 'User Name', 'textdomain' ),
48
- 'default' => esc_html__( 'User Name', 'textdomain' ),
49
- 'placeholder' => esc_html__( 'User Name', 'textdomain' ),
50
  'require' => 'required',
51
  'validation' => ''// name a function which should allow only letters and numbers
52
  ),
53
  'email' => array(
54
  'type' => 'email',
55
- 'label' => esc_html__( 'Email', 'textdomain' ),
56
- 'default' => esc_html__( 'Email', 'textdomain' ),
57
- 'placeholder' => esc_html__( 'Email', 'textdomain' ),
58
  'require' => 'required'
59
  ),
60
  'password' => array(
61
  'type' => 'password',
62
- 'label' => esc_html__( 'Password', 'textdomain' ),
63
- 'default' => esc_html__( 'Password', 'textdomain' ),
64
- 'placeholder' => esc_html__( 'Password', 'textdomain' ),
65
  'require' => 'required'
66
  )
67
  ),
@@ -69,9 +69,9 @@ class RegistrationForm extends Base {
69
  'controls' => array(
70
  'submit_label' => array(
71
  'type' => 'text',
72
- 'label' => esc_html__( 'Submit', 'textdomain' ),
73
- 'default' => esc_html__( 'Register', 'textdomain' ),
74
- 'description' => esc_html__( 'The Call To Action label', 'textdomain' )
75
  )
76
  )
77
  );
@@ -92,7 +92,7 @@ class RegistrationForm extends Base {
92
  public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
93
 
94
  if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
95
- $return['msg'] = esc_html__( 'Invalid email.', 'textdomain' );
96
 
97
  return $return;
98
  }
@@ -136,25 +136,25 @@ class RegistrationForm extends Base {
136
  private function _register_user( $return, $user_email, $user_name, $password = null, $extra_data = array() ) {
137
 
138
  if ( ! get_option( 'users_can_register' ) ) {
139
- $return['msg'] = esc_html__( 'This website does not allow registrations at this moment!' );
140
 
141
  return $return;
142
  }
143
 
144
  if ( ! validate_username( $user_name ) ) {
145
- $return['msg'] = esc_html__( 'Invalid user name' );
146
 
147
  return $return;
148
  }
149
 
150
  if ( username_exists( $user_name ) ) {
151
- $return['msg'] = esc_html__( 'Username already exists' );
152
 
153
  return $return;
154
  }
155
 
156
  if ( email_exists( $user_email ) ) {
157
- $return['msg'] = esc_html__( 'This email is already registered' );
158
  return $return;
159
  }
160
 
@@ -183,7 +183,7 @@ class RegistrationForm extends Base {
183
  }
184
 
185
  $return['success'] = true;
186
- $return['msg'] = esc_html__( 'Welcome, ', 'textdomain' ) . $user_name;
187
  }
188
 
189
  return $return;
@@ -217,7 +217,7 @@ class RegistrationForm extends Base {
217
  */
218
  public function __clone() {
219
  // Cloning instances of the class is forbidden.
220
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
221
  }
222
 
223
  /**
@@ -229,6 +229,6 @@ class RegistrationForm extends Base {
229
  */
230
  public function __wakeup() {
231
  // Unserializing instances of the class is forbidden.
232
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
233
  }
234
  }
22
  $this->set_type( 'registration' );
23
 
24
  $this->notices = array(
25
+ 'success' => esc_html__( 'Your message has been sent!', 'themeisle-companion' ),
26
+ 'error' => esc_html__( 'We failed to send your message!', 'themeisle-companion' ),
27
  );
28
  }
29
 
39
  return array(
40
  'id' => $this->get_type(),
41
  'icon' => 'eicon-align-left',
42
+ 'title' => esc_html__( 'User Registration Form', 'themeisle-companion' ),
43
 
44
  'fields' => array(
45
  'username' => array(
46
  'type' => 'text',
47
+ 'label' => esc_html__( 'User Name', 'themeisle-companion' ),
48
+ 'default' => esc_html__( 'User Name', 'themeisle-companion' ),
49
+ 'placeholder' => esc_html__( 'User Name', 'themeisle-companion' ),
50
  'require' => 'required',
51
  'validation' => ''// name a function which should allow only letters and numbers
52
  ),
53
  'email' => array(
54
  'type' => 'email',
55
+ 'label' => esc_html__( 'Email', 'themeisle-companion' ),
56
+ 'default' => esc_html__( 'Email', 'themeisle-companion' ),
57
+ 'placeholder' => esc_html__( 'Email', 'themeisle-companion' ),
58
  'require' => 'required'
59
  ),
60
  'password' => array(
61
  'type' => 'password',
62
+ 'label' => esc_html__( 'Password', 'themeisle-companion' ),
63
+ 'default' => esc_html__( 'Password', 'themeisle-companion' ),
64
+ 'placeholder' => esc_html__( 'Password', 'themeisle-companion' ),
65
  'require' => 'required'
66
  )
67
  ),
69
  'controls' => array(
70
  'submit_label' => array(
71
  'type' => 'text',
72
+ 'label' => esc_html__( 'Submit', 'themeisle-companion' ),
73
+ 'default' => esc_html__( 'Register', 'themeisle-companion' ),
74
+ 'description' => esc_html__( 'The Call To Action label', 'themeisle-companion' )
75
  )
76
  )
77
  );
92
  public function rest_submit_form( $return, $data, $widget_id, $post_id, $builder ) {
93
 
94
  if ( empty( $data['email'] ) || ! is_email( $data['email'] ) ) {
95
+ $return['msg'] = esc_html__( 'Invalid email.', 'themeisle-companion' );
96
 
97
  return $return;
98
  }
136
  private function _register_user( $return, $user_email, $user_name, $password = null, $extra_data = array() ) {
137
 
138
  if ( ! get_option( 'users_can_register' ) ) {
139
+ $return['msg'] = esc_html__( 'This website does not allow registrations at this moment!', 'themeisle-companion' );
140
 
141
  return $return;
142
  }
143
 
144
  if ( ! validate_username( $user_name ) ) {
145
+ $return['msg'] = esc_html__( 'Invalid user name', 'themeisle-companion' );
146
 
147
  return $return;
148
  }
149
 
150
  if ( username_exists( $user_name ) ) {
151
+ $return['msg'] = esc_html__( 'Username already exists', 'themeisle-companion' );
152
 
153
  return $return;
154
  }
155
 
156
  if ( email_exists( $user_email ) ) {
157
+ $return['msg'] = esc_html__( 'This email is already registered', 'themeisle-companion' );
158
  return $return;
159
  }
160
 
183
  }
184
 
185
  $return['success'] = true;
186
+ $return['msg'] = esc_html__( 'Welcome, ', 'themeisle-companion' ) . $user_name;
187
  }
188
 
189
  return $return;
217
  */
218
  public function __clone() {
219
  // Cloning instances of the class is forbidden.
220
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
221
  }
222
 
223
  /**
229
  */
230
  public function __wakeup() {
231
  // Unserializing instances of the class is forbidden.
232
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
233
  }
234
  }
vendor/codeinwp/themeisle-content-forms/class-themeisle-content-forms-server.php CHANGED
@@ -39,27 +39,27 @@ class RestServer extends \WP_Rest_Controller {
39
  'form_type' => array(
40
  'type' => 'string',
41
  'required' => true,
42
- 'description' => __( 'What type of form is submitted.', 'textdomain' ),
43
  ),
44
  'nonce' => array(
45
  'type' => 'string',
46
  'required' => true,
47
- 'description' => __( 'The security key', 'textdomain' ),
48
  ),
49
  'data' => array(
50
  'type' => 'json',
51
  'required' => true,
52
- 'description' => __( 'The form must have data', 'textdomain' ),
53
  ),
54
  'form_id' => array(
55
  'type' => 'string',
56
  'required' => true,
57
- 'description' => __( 'The form identifier.', 'textdomain' ),
58
  ),
59
  'post_id' => array(
60
  'type' => 'string',
61
  'required' => true,
62
- 'description' => __( 'The form identifier.', 'textdomain' ),
63
  )
64
  ),
65
  ),
@@ -78,7 +78,7 @@ class RestServer extends \WP_Rest_Controller {
78
  public function submit_form( $request ) {
79
  $return = array(
80
  'success' => false,
81
- 'msg' => esc_html__( 'Something went wrong', 'textdomain' )
82
  );
83
 
84
  $nonce = $request->get_param( 'nonce' );
@@ -95,7 +95,7 @@ class RestServer extends \WP_Rest_Controller {
95
  $data = $request->get_param( 'data' );
96
 
97
  if ( empty( $data[ $form_id ] ) ) {
98
- $return['msg'] = esc_html__( 'Invalid Data ', 'textdomain' ) . $form_id;
99
  return $return;
100
  }
101
 
@@ -141,7 +141,7 @@ class RestServer extends \WP_Rest_Controller {
141
  */
142
  public function __clone() {
143
  // Cloning instances of the class is forbidden.
144
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
145
  }
146
 
147
  /**
@@ -153,6 +153,6 @@ class RestServer extends \WP_Rest_Controller {
153
  */
154
  public function __wakeup() {
155
  // Unserializing instances of the class is forbidden.
156
- _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'textdomain' ), '1.0.0' );
157
  }
158
  }
39
  'form_type' => array(
40
  'type' => 'string',
41
  'required' => true,
42
+ 'description' => __( 'What type of form is submitted.', 'themeisle-companion' ),
43
  ),
44
  'nonce' => array(
45
  'type' => 'string',
46
  'required' => true,
47
+ 'description' => __( 'The security key', 'themeisle-companion' ),
48
  ),
49
  'data' => array(
50
  'type' => 'json',
51
  'required' => true,
52
+ 'description' => __( 'The form must have data', 'themeisle-companion' ),
53
  ),
54
  'form_id' => array(
55
  'type' => 'string',
56
  'required' => true,
57
+ 'description' => __( 'The form identifier.', 'themeisle-companion' ),
58
  ),
59
  'post_id' => array(
60
  'type' => 'string',
61
  'required' => true,
62
+ 'description' => __( 'The form identifier.', 'themeisle-companion' ),
63
  )
64
  ),
65
  ),
78
  public function submit_form( $request ) {
79
  $return = array(
80
  'success' => false,
81
+ 'msg' => esc_html__( 'Something went wrong', 'themeisle-companion' )
82
  );
83
 
84
  $nonce = $request->get_param( 'nonce' );
95
  $data = $request->get_param( 'data' );
96
 
97
  if ( empty( $data[ $form_id ] ) ) {
98
+ $return['msg'] = esc_html__( 'Invalid Data ', 'themeisle-companion' ) . $form_id;
99
  return $return;
100
  }
101
 
141
  */
142
  public function __clone() {
143
  // Cloning instances of the class is forbidden.
144
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
145
  }
146
 
147
  /**
153
  */
154
  public function __wakeup() {
155
  // Unserializing instances of the class is forbidden.
156
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
157
  }
158
  }
vendor/codeinwp/themeisle-content-forms/composer.json CHANGED
@@ -6,7 +6,7 @@
6
  "wordpress"
7
  ],
8
  "homepage": "https://github.com/Codeinwp/themeisle-content-forms",
9
- "license": "GPL-2.0+",
10
  "authors": [
11
  {
12
  "name": "ThemeIsle team",
6
  "wordpress"
7
  ],
8
  "homepage": "https://github.com/Codeinwp/themeisle-content-forms",
9
+ "license": "GPL-2.0-or-later",
10
  "authors": [
11
  {
12
  "name": "ThemeIsle team",
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-endpoints.php CHANGED
@@ -235,7 +235,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
235
 
236
  // fetch the calculated hashes.
237
  if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
238
- return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf( __( '%s not found', 'themeisle-sdk' ), self::HASH_FILE ) );
239
  }
240
 
241
  $hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
@@ -296,7 +296,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Endpoints' ) ) :
296
  $value = sanitize_text_field( $data[ $param ] );
297
  if ( empty( $value ) ) {
298
  return new WP_Error(
299
- 'themeisle_' . $param . '_invalid', sprintf( __( 'Invalid %', 'themeisle-sdk' ), $param ), array(
300
  'status' => 403,
301
  )
302
  );
235
 
236
  // fetch the calculated hashes.
237
  if ( ! $wp_filesystem->is_readable( $path . '/' . self::HASH_FILE ) ) {
238
+ return new WP_Error( 'themeisle_sdk_hash_not_found', sprintf( __( '%s not found', 'themeisle-sdk', 'themeisle-companion' ), self::HASH_FILE ) );
239
  }
240
 
241
  $hashes = json_decode( $wp_filesystem->get_contents( $path . '/' . self::HASH_FILE ), true );
296
  $value = sanitize_text_field( $data[ $param ] );
297
  if ( empty( $value ) ) {
298
  return new WP_Error(
299
+ 'themeisle_' . $param . '_invalid', sprintf( __( 'Invalid %', 'themeisle-sdk', 'themeisle-companion' ), $param ), array(
300
  'status' => 403,
301
  )
302
  );
vendor/composer/autoload_files.php CHANGED
@@ -8,6 +8,7 @@ $baseDir = dirname($vendorDir);
8
  return array(
9
  '957c51f8f334b5ea3be310bfb8b3492c' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
10
  '62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
 
11
  '7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
12
  '4577ab960be90dedc8f8512147cf356d' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
13
  );
8
  return array(
9
  '957c51f8f334b5ea3be310bfb8b3492c' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
10
  '62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
11
+ '2e85745cdd367ff6e5579a8598f422b9' => $vendorDir . '/codeinwp/elementor-extra-widgets/load.php',
12
  '7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
13
  '4577ab960be90dedc8f8512147cf356d' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
14
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita6f1fca15487c58cbbc5ffa8175e25ba
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInita6f1fca15487c58cbbc5ffa8175e25ba
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInita6f1fca15487c58cbbc5ffa8175e25ba', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInita6f1fca15487c58cbbc5ffa8175e25ba', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInita6f1fca15487c58cbbc5ffa8175e25ba
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequirea6f1fca15487c58cbbc5ffa8175e25ba($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequirea6f1fca15487c58cbbc5ffa8175e25ba($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 ComposerAutoloaderInit4035687531a206f15a6b6487aad54c2a
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit4035687531a206f15a6b6487aad54c2a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit4035687531a206f15a6b6487aad54c2a', '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
+ composerRequire4035687531a206f15a6b6487aad54c2a($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequire4035687531a206f15a6b6487aad54c2a($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/installed.json CHANGED
@@ -76,6 +76,42 @@
76
  "description": "A WordPress library to create full width page templates.",
77
  "homepage": "https://github.com/Codeinwp/full-width-page-templates"
78
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  {
80
  "name": "codeinwp/themeisle-content-forms",
81
  "version": "dev-master",
@@ -83,15 +119,15 @@
83
  "source": {
84
  "type": "git",
85
  "url": "https://github.com/Codeinwp/themeisle-content-forms.git",
86
- "reference": "8f1df80e4bfde5335a27ae987e4652e7b5fd202c"
87
  },
88
  "dist": {
89
  "type": "zip",
90
- "url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/8f1df80e4bfde5335a27ae987e4652e7b5fd202c",
91
- "reference": "8f1df80e4bfde5335a27ae987e4652e7b5fd202c",
92
  "shasum": ""
93
  },
94
- "time": "2018-01-16 17:44:48",
95
  "type": "library",
96
  "installation-source": "dist",
97
  "autoload": {
@@ -101,7 +137,7 @@
101
  },
102
  "notification-url": "https://packagist.org/downloads/",
103
  "license": [
104
- "GPL-2.0+"
105
  ],
106
  "authors": [
107
  {
76
  "description": "A WordPress library to create full width page templates.",
77
  "homepage": "https://github.com/Codeinwp/full-width-page-templates"
78
  },
79
+ {
80
+ "name": "codeinwp/elementor-extra-widgets",
81
+ "version": "dev-master",
82
+ "version_normalized": "9999999-dev",
83
+ "source": {
84
+ "type": "git",
85
+ "url": "https://github.com/Codeinwp/elementor-extra-widgets.git",
86
+ "reference": "b47005540e4b59ecd8ccfe4f10a5ef6f9735b400"
87
+ },
88
+ "dist": {
89
+ "type": "zip",
90
+ "url": "https://api.github.com/repos/Codeinwp/elementor-extra-widgets/zipball/b47005540e4b59ecd8ccfe4f10a5ef6f9735b400",
91
+ "reference": "b47005540e4b59ecd8ccfe4f10a5ef6f9735b400",
92
+ "shasum": ""
93
+ },
94
+ "time": "2018-01-23 16:50:26",
95
+ "type": "library",
96
+ "installation-source": "dist",
97
+ "autoload": {
98
+ "files": [
99
+ "load.php"
100
+ ]
101
+ },
102
+ "notification-url": "https://packagist.org/downloads/",
103
+ "license": [
104
+ "GPL-3.0-or-later"
105
+ ],
106
+ "authors": [
107
+ {
108
+ "name": "ThemeIsle team",
109
+ "email": "friends@themeisle.com",
110
+ "homepage": "https://themeisle.com"
111
+ }
112
+ ],
113
+ "homepage": "https://github.com/Codeinwp/elementor-extra-widgets"
114
+ },
115
  {
116
  "name": "codeinwp/themeisle-content-forms",
117
  "version": "dev-master",
119
  "source": {
120
  "type": "git",
121
  "url": "https://github.com/Codeinwp/themeisle-content-forms.git",
122
+ "reference": "7f384b1c03e9a3e0afc246941090fa0819531816"
123
  },
124
  "dist": {
125
  "type": "zip",
126
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/7f384b1c03e9a3e0afc246941090fa0819531816",
127
+ "reference": "7f384b1c03e9a3e0afc246941090fa0819531816",
128
  "shasum": ""
129
  },
130
+ "time": "2018-02-08 09:50:31",
131
  "type": "library",
132
  "installation-source": "dist",
133
  "autoload": {
137
  },
138
  "notification-url": "https://packagist.org/downloads/",
139
  "license": [
140
+ "GPL-2.0-or-later"
141
  ],
142
  "authors": [
143
  {