Orbit Fox by ThemeIsle - Version 2.2.0

Version Description

  • 2017-11-23
Download this release

Release Info

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

Code changes from version 2.1.1 to 2.2.0

Files changed (53) hide show
  1. CHANGELOG.md +8 -0
  2. core/app/abstract/class-orbit-fox-module-abstract.php +14 -4
  3. core/app/class-orbit-fox-admin.php +8 -5
  4. core/app/class-orbit-fox-global-settings.php +4 -2
  5. core/app/models/class-orbit-fox-model.php +5 -4
  6. core/assets/css/orbit-fox-admin.css +50 -1
  7. core/assets/js/orbit-fox-admin.js +144 -114
  8. core/includes/class-orbit-fox.php +1 -1
  9. languages/themeisle-companion.pot +88 -29
  10. obfx_modules/companion-legacy/inc/hestia/common-functions.php +203 -0
  11. obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php +1 -0
  12. obfx_modules/companion-legacy/inc/hestia/inc/img/clients1.png +0 -0
  13. obfx_modules/companion-legacy/inc/hestia/inc/img/clients2.png +0 -0
  14. obfx_modules/companion-legacy/inc/hestia/inc/img/clients3.png +0 -0
  15. obfx_modules/companion-legacy/inc/hestia/inc/img/clients4.png +0 -0
  16. obfx_modules/companion-legacy/inc/hestia/inc/img/clients5.png +0 -0
  17. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-clients-bar-section.php +3 -3
  18. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php +2 -2
  19. obfx_modules/companion-legacy/init.php +56 -7
  20. obfx_modules/elementor-widgets/css/public.css +293 -0
  21. obfx_modules/elementor-widgets/init.php +179 -0
  22. obfx_modules/elementor-widgets/js/obfx-grid.js +50 -0
  23. obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-posts-grid.php +1755 -0
  24. obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-pricing-table.php +1056 -0
  25. obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-services.php +615 -0
  26. obfx_modules/menu-icons/init.php +1 -0
  27. obfx_modules/menu-icons/js/admin.js +70 -70
  28. obfx_modules/mystock-import/css/media.css +17 -8
  29. obfx_modules/mystock-import/inc/photos.php +27 -25
  30. obfx_modules/mystock-import/init.php +9 -2
  31. obfx_modules/mystock-import/js/admin.js +15 -2
  32. obfx_modules/social-sharing/js/admin.js +18 -12
  33. obfx_modules/social-sharing/js/public.js +12 -8
  34. obfx_modules/social-sharing/views/hestia-social-sharing-tpl.php +1 -6
  35. obfx_modules/social-sharing/views/social-sharing-tpl.php +1 -2
  36. obfx_modules/stats/js/stats.js +51 -43
  37. obfx_modules/template-directory/css/admin.css +233 -0
  38. obfx_modules/template-directory/inc/class-obfx-template-directory-customizer-section.php +122 -0
  39. obfx_modules/template-directory/init.php +475 -0
  40. obfx_modules/template-directory/js/customizer.js +71 -0
  41. obfx_modules/template-directory/js/plugin-install-helper.js +55 -0
  42. obfx_modules/template-directory/js/script.js +65 -0
  43. obfx_modules/template-directory/views/template-directory-page-tpl.php +57 -0
  44. obfx_modules/template-directory/views/template-directory-render-template-tpl.php +13 -0
  45. obfx_modules/template-directory/views/template-plugin-install-tpl.php +23 -0
  46. readme.md +9 -0
  47. readme.txt +9 -0
  48. themeisle-companion.php +1 -1
  49. vendor/autoload.php +1 -1
  50. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +1 -1
  51. vendor/codeinwp/themeisle-sdk/load.php +1 -1
  52. vendor/composer/autoload_real.php +5 -5
  53. vendor/composer/installed.json +4 -4
CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
 
 
 
 
 
 
 
 
 
2
  ### v2.1.1 - 2017-11-16
3
  **Changes:**
4
  * Adds compatibility with WordPress 4.9.
1
 
2
+ ### v2.2.0 - 2017-11-23
3
+ **Changes:**
4
+ * - Added new Elementor Widgets module;
5
+ * - Added new Template Directory module;
6
+ * - Bug fixes for the Photos Import Module;
7
+ * - Bug fixes for the Social Sharing module backend interface;
8
+ * - Moved Orbit Fox Companion out of Tools Menu;
9
+
10
  ### v2.1.1 - 2017-11-16
11
  **Changes:**
12
  * Adds compatibility with WordPress 4.9.
core/app/abstract/class-orbit-fox-module-abstract.php CHANGED
@@ -45,6 +45,15 @@ abstract class Orbit_Fox_Module_Abstract {
45
  */
46
  public $description;
47
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * Stores an array of notices
50
  *
@@ -278,7 +287,7 @@ abstract class Orbit_Fox_Module_Abstract {
278
  if ( $this->auto == true ) {
279
  return true;
280
  }
281
- return $this->model->get_is_module_active( $this->slug );
282
  }
283
 
284
  /**
@@ -449,6 +458,7 @@ abstract class Orbit_Fox_Module_Abstract {
449
  $sanitized = str_replace( ' ', '-', strtolower( $this->name ) );
450
 
451
  $module_dir = $this->slug;
 
452
  if ( ! empty( $enqueue ) ) {
453
  if ( isset( $enqueue['js'] ) && ! empty( $enqueue['js'] ) ) {
454
  $order = 0;
@@ -490,9 +500,9 @@ abstract class Orbit_Fox_Module_Abstract {
490
  );
491
  }
492
  $order++;
493
- }
494
- }
495
- }
496
  }
497
 
498
  /**
45
  */
46
  public $description;
47
 
48
+ /**
49
+ * Holds the default setting activation state of the module.
50
+ *
51
+ * @since 2.1.0
52
+ * @access protected
53
+ * @var boolean $active_default The default active state of the module.
54
+ */
55
+ protected $active_default = false;
56
+
57
  /**
58
  * Stores an array of notices
59
  *
287
  if ( $this->auto == true ) {
288
  return true;
289
  }
290
+ return $this->model->get_is_module_active( $this->slug, $this->active_default );
291
  }
292
 
293
  /**
458
  $sanitized = str_replace( ' ', '-', strtolower( $this->name ) );
459
 
460
  $module_dir = $this->slug;
461
+
462
  if ( ! empty( $enqueue ) ) {
463
  if ( isset( $enqueue['js'] ) && ! empty( $enqueue['js'] ) ) {
464
  $order = 0;
500
  );
501
  }
502
  $order++;
503
+ }// End foreach().
504
+ }// End if().
505
+ }// End if().
506
  }
507
 
508
  /**
core/app/class-orbit-fox-admin.php CHANGED
@@ -76,7 +76,7 @@ class Orbit_Fox_Admin {
76
  if ( empty( $screen ) ) {
77
  return;
78
  }
79
- if ( in_array( $screen->id, array( 'tools_page_obfx_companion' ) ) ) {
80
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/css/orbit-fox-admin.css', array(), $this->version, 'all' );
81
  }
82
  do_action( 'obfx_admin_enqueue_styles' );
@@ -105,7 +105,7 @@ class Orbit_Fox_Admin {
105
  if ( empty( $screen ) ) {
106
  return;
107
  }
108
- if ( in_array( $screen->id, array( 'tools_page_obfx_companion' ) ) ) {
109
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/js/orbit-fox-admin.js', array( 'jquery' ), $this->version, false );
110
  }
111
  do_action( 'obfx_admin_enqueue_scripts' );
@@ -118,13 +118,16 @@ class Orbit_Fox_Admin {
118
  * @access public
119
  */
120
  public function menu_pages() {
121
- add_management_page(
122
- __( 'Orbit Fox', 'themeisle-companion' ), __( 'Orbit Fox Companion', 'themeisle-companion' ), 'manage_options', 'obfx_companion',
123
  array(
124
  $this,
125
  'page_modules_render',
126
- )
 
 
127
  );
 
128
  }
129
 
130
  /**
76
  if ( empty( $screen ) ) {
77
  return;
78
  }
79
+ if ( in_array( $screen->id, array( 'toplevel_page_obfx_companion' ) ) ) {
80
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/css/orbit-fox-admin.css', array(), $this->version, 'all' );
81
  }
82
  do_action( 'obfx_admin_enqueue_styles' );
105
  if ( empty( $screen ) ) {
106
  return;
107
  }
108
+ if ( in_array( $screen->id, array( 'toplevel_page_obfx_companion' ) ) ) {
109
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/js/orbit-fox-admin.js', array( 'jquery' ), $this->version, false );
110
  }
111
  do_action( 'obfx_admin_enqueue_scripts' );
118
  * @access public
119
  */
120
  public function menu_pages() {
121
+ add_menu_page(
122
+ __( 'Orbit Fox', 'themeisle-companion' ), __( 'Orbit Fox', 'themeisle-companion' ), 'manage_options', 'obfx_companion',
123
  array(
124
  $this,
125
  'page_modules_render',
126
+ ),
127
+ 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0MzQuNjIiIGhlaWdodD0iMzkxLjMzIiB2aWV3Qm94PSIwIDAgNDM0LjYyIDM5MS4zMyI+PGRlZnM+PHN0eWxlPi5he2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmxvZ28tb3JiaXQtZm94LTI8L3RpdGxlPjxwYXRoIGNsYXNzPSJhIiBkPSJNNzA4LjE1LDM5NS4yM2gwYy0xLjQ5LTEzLjc2LTcuNjEtMjkuMjEtMTUuOTQtNDQuNzZsLTE0LjQ2LDguMzVhNzYsNzYsMCwxLDEtMTQ1LDQyLjd2MUg0OTEuMWE3Niw3NiwwLDEsMS0xNDQuODYtNDMuNjVsLTE0LjQyLTguMzNjLTguMTcsMTUuMjgtMTQuMjIsMzAuNDctMTUuODMsNDQtLjA2LjM3LS4xMS43NS0uMTQsMS4xMnMtLjA2LjQ2LS4wOC42OGguMDVBMTUuNTcsMTUuNTcsMCwwLDAsMzIwLjM1LDQwOEw1MDEsNTU1LjExYTE1LjU0LDE1LjU0LDAsMCwwLDExLDQuNTVoMGExNS41NCwxNS41NCwwLDAsMCwxMS00LjU1TDcwMy42OSw0MDhBMTUuNjMsMTUuNjMsMCwwLDAsNzA4LjE1LDM5NS4yM1pNNDc5LjU5LDQ0MC41MWwyMi4wNSw1LjkxLTIuMDcsNy43My0yMi4wNS01LjkxWm0zLDE4Ljc1LDIyLjA1LDUuOTEtMi4wNyw3LjczTDQ4MC41Miw0NjdabTEsMTguNzUsMjIuMDUsNS45MS0yLjA3LDcuNzMtMjIuMDUtNS45MVptMzEsNjMuMzhhMTIuMzgsMTIuMzgsMCwwLDAtMSwuOTEsMi4yMSwyLjIxLDAsMCwxLTEuNTguNjNoMGEyLjIxLDIuMjEsMCwwLDEtMS41OC0uNjMsMTIuMzgsMTIuMzgsMCwwLDAtMS0uOTFMNDg2Ljg5LDUyM2M4LjItLjUzLDE2LjYzLS44MSwyNS4xMS0uODFzMTYuOTMuMjgsMjUuMTUuODFabTUuODktNDkuNzQtMi4wNy03LjczTDU0MC40OSw0NzhsMi4wNyw3LjczWm0xLTE4Ljc1LTIuMDctNy43MywyMi4wNi01LjkxLDIuMDcsNy43M1ptMy0xOC43NS0yLjA3LTcuNzMsMjIuMDYtNS45MSwyLjA3LDcuNzNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjk0LjY5IC0xNjguMzQpIi8+PHBhdGggY2xhc3M9ImEiIGQ9Ik03MjkuMjYsMjA5YTEyMC4xOCwxMjAuMTgsMCwwLDAtMS4xOC0xNC43OGMtLjEzLS44OC0uMjctMS43Mi0uNDItMi41Ni0uMjItMS4yLS40Ni0yLjM1LS43Mi0zLjQ3LS4xOC0uNzktLjM4LTEuNTctLjU4LTIuMzItLjM2LTEuMjgtLjc0LTIuNDgtMS4xNi0zLjYyLS4zNi0uOTUtLjc0LTEuODUtMS4xNS0yLjctLjItLjQzLS40MS0uODQtLjYzLTEuMjRzLS40My0uNzktLjY1LTEuMTVhMTkuNzYsMTkuNzYsMCwwLDAtMS4xNS0xLjY4LDE0LjE5LDE0LjE5LDAsMCwwLTEuMTUtMS4zNiwxMS44NywxMS44NywwLDAsMC0xLS45MWMtLjExLS4xLS4yNS0uMTgtLjM3LS4yN2ExNS4yMSwxNS4yMSwwLDAsMC0yLjU0LTEuNTlsLTEuMDYtLjQ5YTI1LjU3LDI1LjU3LDAsMCwwLTMuODUtMS4yNWMtLjc0LS4xOC0xLjUyLS4zNS0yLjMzLS40OS0xLjExLS4xOS0yLjI4LS4zNS0zLjUtLjQ3cy0yLjY5LS4yMS00LjExLS4yNWMtMi4xNC0uMDctNC4zOSwwLTYuNzMuMDktMS41Ny4wOC0zLjE4LjItNC44Mi4zNmwtMi44MS4zYTE3MSwxNzEsMCwwLDAtMTgsMy4xN2wtMy4xMi43NHEtNC44NywxLjItOS43OSwyLjY0Yy0zLjI3LDEtNi41NCwyLTkuNzcsMy4xMXEtNS4yNCwxLjc4LTEwLjMsNGMtLjg1LjM3LTEuNjkuNzUtMi41MywxLjE0cS0zLjc4LDEuNzYtNy40OCwzLjc4YTE0Mi4zNywxNDIuMzcsMCwwLDAtMTIuOCw3Ljg4Yy0xLjQsMS0yLjgxLDItNC4yLDNhMjAxLjUzLDIwMS41MywwLDAsMC0yMy43LDIwLjc3Yy0yMC4zNy0xNC00Mi4zLTIwLTczLjctMjAuNDZ2MS43N2gwdi0xLjc3Yy0zMS40MS41LTUzLjM1LDYuNDQtNzMuNzIsMjAuNDctMTkuODQtMjAuMS0zOS4yNi0zMy4xNi02MS00MC42LTI5LjU2LTEwLjExLTYyLTE0LjU5LTcyLjc2LTUuNnMtMTEuOTUsNDEuNzYtNy4xMyw3Mi42M2M0LjU1LDI5LjEsMTguODMsNTYsNDQuNzgsODdsMCwuMDYsMTQuNDgsOC4zNkE3Niw3NiwwLDAsMSw0OTIuMjIsMzgyaDM5LjU2QTc2LDc2LDAsMCwxLDY2Ny40LDM0MS4xOWwxNC41Mi04LjM5LDAtLjA3cTMuNTctNC4yNiw2Ljg0LTguNDNjMS41LTEuODksMi45NC0zLjc3LDQuMzQtNS42NHMyLjc2LTMuNzMsNC4wNy01LjU3Yy42Ni0uOTIsMS4zLTEuODQsMS45NC0yLjc2cTEuOS0yLjc2LDMuNjctNS40OCwyLjY3LTQuMSw1LTguMTN0NC40NS04LjA1Yy45Mi0xLjc4LDEuODEtMy41NiwyLjY1LTUuMzRxMS44OS00LDMuNTEtOGMuNzItMS43OCwxLjM5LTMuNTUsMi01LjMzLjMyLS44OC42My0xLjc3LjkzLTIuNjYuNi0xLjc4LDEuMTUtMy41NiwxLjY3LTUuMzRhMTMxLjU0LDEzMS41NCwwLDAsMCwzLjYxLTE2LjIxLDIyMS4yNCwyMjEuMjQsMCwwLDAsMi42OC0zMS40NkM3MjkuMzIsMjEyLjUyLDcyOS4zMSwyMTAuNzMsNzI5LjI2LDIwOVpNMzg5LjMxLDI2OC43OWMtOS4yOSwxMS41OC0yMi4zNywyNy43Ni0zNC45NCw0NS42Ni0xMS42NC0xNi45Mi0yNC43Ni0zOC42MS0yNy40OS01Ny42NS0zLjEzLTIxLjg2LTEuOTQtMzcuNTktLjA3LTQzLjQ4YTMyLjY1LDMyLjY1LDAsMCwxLDQuMjktLjI1YzkuODYsMCwyNC4yOCwyLjkyLDM4LjU5LDcuODEsMTMuNTMsNC42MywyNi4xNSwxMi41NiwzOS4yNiwyNC44NUM0MDIuNjgsMjUyLjU0LDM5Ni4yMSwyNjAuMTksMzg5LjMxLDI2OC43OVptMzA3LjgxLTEyYy0yLjczLDE5LTE1LjgzLDQwLjctMjcuNDYsNTcuNjEtMTIuNTctMTcuODgtMjUuNjQtMzQuMDUtMzQuOTMtNDUuNjItNi45MS04LjYxLTEzLjM4LTE2LjI2LTE5LjY2LTIzLjA4LDEzLjExLTEyLjI4LDI1LjcyLTIwLjIsMzkuMjQtMjQuODMsMTQuMzEtNC44OSwyOC43My03LjgxLDM4LjU5LTcuODFhMzIuNjUsMzIuNjUsMCwwLDEsNC4yOS4yNUM2OTkuMDYsMjE5LjIxLDcwMC4yNSwyMzQuOTQsNjk3LjEyLDI1Ni44WiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTI5NC42OSAtMTY4LjM0KSIvPjxwYXRoIGNsYXNzPSJhIiBkPSJNNDE2LjQ0LDMzMS41N0E1Ni41MSw1Ni41MSwwLDEsMCw0NzMsMzg4LjA4LDU2LjU3LDU2LjU3LDAsMCwwLDQxNi40NCwzMzEuNTdabTMxLjYyLDg2LjM2YTIzLjQ0LDIzLjQ0LDAsMSwxLDUtNy4zOCw5LjI1LDkuMjUsMCwwLDEtMS43OSwzLjM5QTIyLjcxLDIyLjcxLDAsMCwxLDQ0OC4wNiw0MTcuOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjk0LjY5IC0xNjguMzQpIi8+PHBhdGggY2xhc3M9ImEiIGQ9Ik02MDcuNTYsMzMxLjU3YTU2LjUxLDU2LjUxLDAsMSwwLDU2LjUxLDU2LjUxQTU2LjU3LDU2LjU3LDAsMCwwLDYwNy41NiwzMzEuNTdabTEuNTMsODYuMzZhMjMuNDIsMjMuNDIsMCwwLDEtMzMuMTMsMCwyMy4xOCwyMy4xOCwwLDAsMS0zLjE5LTQsOS4wOCw5LjA4LDAsMCwxLTEuNzgtMy4zOSwyMy40MiwyMy40MiwwLDEsMSwzOC4xLDcuMzhaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMjk0LjY5IC0xNjguMzQpIi8+PC9zdmc+',
128
+ '75'
129
  );
130
+ add_submenu_page( 'obfx_companion', __( 'Orbit Fox General Options', 'themeisle-companion' ), __( 'General Settings', 'themeisle-companion' ), 'manage_options', 'obfx_companion' );
131
  }
132
 
133
  /**
core/app/class-orbit-fox-global-settings.php CHANGED
@@ -25,7 +25,7 @@ class Orbit_Fox_Global_Settings {
25
  *
26
  * @since 1.0.0
27
  * @access public
28
- * @var Orbit_Fox_Global_Settings $instance The istance of this class.
29
  */
30
  public static $instance;
31
 
@@ -64,6 +64,8 @@ class Orbit_Fox_Global_Settings {
64
  'stats',
65
  'social-sharing',
66
  'companion-legacy',
 
 
67
  'menu-icons',
68
  'mystock-import',
69
  )
@@ -102,7 +104,7 @@ class Orbit_Fox_Global_Settings {
102
  * @since 1.0.0
103
  * @access public
104
  */
105
- public static function distroy_instance() {
106
  static::$instance = null;
107
  }
108
  }
25
  *
26
  * @since 1.0.0
27
  * @access public
28
+ * @var Orbit_Fox_Global_Settings $instance The instance of this class.
29
  */
30
  public static $instance;
31
 
64
  'stats',
65
  'social-sharing',
66
  'companion-legacy',
67
+ 'elementor-widgets',
68
+ 'template-directory',
69
  'menu-icons',
70
  'mystock-import',
71
  )
104
  * @since 1.0.0
105
  * @access public
106
  */
107
+ public static function destroy_instance() {
108
  static::$instance = null;
109
  }
110
  }
core/app/models/class-orbit-fox-model.php CHANGED
@@ -120,15 +120,16 @@ class Orbit_Fox_Model {
120
  *
121
  * @since 1.0.0
122
  * @access public
123
- * @param string $slug The module slug.
 
124
  * @return bool
125
  */
126
- public function get_is_module_active( $slug ) {
127
  $data = $this->get();
128
  if ( isset( $data['module_status'][ $slug ]['active'] ) ) {
129
  return $data['module_status'][ $slug ]['active'];
130
  }
131
- return false; // @codeCoverageIgnore
132
  }
133
 
134
  /**
@@ -243,7 +244,7 @@ class Orbit_Fox_Model {
243
  * @access public
244
  * @return mixed
245
  */
246
- public function distroy_model() {
247
  return delete_option( $this->namespace );
248
  }
249
  }
120
  *
121
  * @since 1.0.0
122
  * @access public
123
+ * @param string $slug The module slug.
124
+ * @param boolean $default The default active state.
125
  * @return bool
126
  */
127
+ public function get_is_module_active( $slug, $default ) {
128
  $data = $this->get();
129
  if ( isset( $data['module_status'][ $slug ]['active'] ) ) {
130
  return $data['module_status'][ $slug ]['active'];
131
  }
132
+ return $default; // @codeCoverageIgnore
133
  }
134
 
135
  /**
244
  * @access public
245
  * @return mixed
246
  */
247
+ public function destroy_model() {
248
  return delete_option( $this->namespace );
249
  }
250
  }
core/assets/css/orbit-fox-admin.css CHANGED
@@ -8,7 +8,7 @@
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
- Version: 2.1.1
12
  */
13
 
14
  /* Document
@@ -3593,3 +3593,52 @@ html {
3593
  -webkit-transition: height 1s;
3594
  transition: height 1s;
3595
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
+ Version: 2.2.0
12
  */
13
 
14
  /* Document
3593
  -webkit-transition: height 1s;
3594
  transition: height 1s;
3595
  }
3596
+
3597
+ /** TEMPORARY FIX FOR SOCIAL SHARING STYLE **/
3598
+
3599
+ #obfx-mod-social-sharing .form-group.inline-setting {
3600
+ display: inline-block;
3601
+ }
3602
+
3603
+ #obfx-mod-social-sharing .form-group.inline-setting.network-toggle {
3604
+ min-width: 300px;
3605
+ }
3606
+
3607
+ #obfx-mod-social-sharing .form-group.inline-setting.last .form-label {
3608
+ display: none;
3609
+ }
3610
+
3611
+ #obfx-mod-social-sharing .show {
3612
+ opacity: 1;
3613
+ -webkit-transition: all 0.3s ease;
3614
+ transition: all 0.3s ease;
3615
+ }
3616
+
3617
+ #obfx-mod-social-sharing .show.obfxHiddenOption {
3618
+ opacity: 0;
3619
+ cursor: default;
3620
+ }
3621
+
3622
+ .obfx-row {
3623
+ margin-bottom: 10px;
3624
+ border-bottom: 1px solid #eee;
3625
+ }
3626
+
3627
+ @media ( max-width: 600px ) {
3628
+ #obfx-mod-social-sharing .obfx-row .form-label {
3629
+ margin-bottom: 20px;
3630
+ font-weight: 600;
3631
+ }
3632
+
3633
+ #obfx-mod-social-sharing .obfx-row .show .form-label {
3634
+ display: none;
3635
+ }
3636
+
3637
+ #obfx-mod-social-sharing .form-group.inline-setting.network-toggle {
3638
+ display: block;
3639
+ }
3640
+
3641
+ .obfx-row {
3642
+ padding: 10px 0;
3643
+ }
3644
+ }
core/assets/js/orbit-fox-admin.js CHANGED
@@ -37,121 +37,151 @@ var obfx_admin = function( $ ) {
37
  * Although scripts in the WordPress core, Plugins and Themes may be
38
  * practising this, we should strive to set a better example in our own work.
39
  */
40
- $( function() {
41
- // if ( $( '#toplevel_page_jetpack' ).length ) {
42
- // var obfx_menu = $( '#toplevel_page_obfx_menu' ).clone().wrap( '<p/>' ).parent().html();
43
- // $( '#toplevel_page_obfx_menu' ).remove();
44
- // $( '#toplevel_page_jetpack' ).before( obfx_menu );
45
- // }
46
- } );
47
-
48
- $( function() {
49
- $( '.obfx-mod-switch' ).on( 'click', function() {
50
- var switch_ref = $( this );
51
- var checked = switch_ref.is( ':checked' );
52
- var name = switch_ref.attr( 'name' );
53
- var noance = switch_ref.val();
54
-
55
- var post_data = {
56
- noance: noance,
57
- name: name,
58
- checked: checked
59
- };
60
- var json_data = JSON.stringify( post_data );
61
-
62
- var ajax_data = {
63
- 'action': 'obfx_update_module_active_status',
64
- 'data': json_data
65
- };
66
-
67
- $.post( 'admin-ajax.php', ajax_data, function( response ) {
68
- if ( response.type === 'success' ) {
69
- if ( checked ) {
70
- $( '#obfx-mod-' + name ).slideDown();
71
- $( '#obfx-mod-' + name ).find( 'fieldset' ).removeAttr( 'disabled' );
72
- } else {
73
- $( '#obfx-mod-' + name ).hide();
74
- $( '#obfx-mod-' + name ).find( 'fieldset' ).attr( 'disabled', true );
 
 
 
 
 
 
 
 
 
 
 
75
  }
76
- } else {
77
- switch_ref.attr( 'checked', ! switch_ref.attr( 'checked' ) );
78
- }
79
- }, 'json');
80
- } );
81
-
82
- $( '.obfx-toast-dismiss' ).on( 'click', function() {
83
- $( this ).closest( '.obfx-mod-toast' ).slideUp( 400, function() {
84
- $( this ).removeClass( 'toast-success' );
85
- $( this ).removeClass( 'toast-error' );
86
- $( this ).removeClass( 'toast-warning' );
87
- } );
88
- } );
89
-
90
- $( '.btn-expand' ).on( 'click', function() {
91
- if ( $( this ).hasClass( 'active' ) ) {
92
- $( this ).removeClass( 'active' );
93
- $( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).removeClass( 'active' );
94
- $( this ).closest( '.panel.options' ).css( 'height', '75px' );
95
- } else {
96
- $( this ).addClass( 'active' );
97
- $( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).addClass( 'active' );
98
- $( this ).closest( '.panel.options' ).css( 'height', ( $( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).height() * 1 + 80 ) + 'px' );
99
- }
100
- } );
101
-
102
- $( '.obfx-module-form' ).on( 'submit', function (e) {
103
- e.preventDefault();
104
- } );
105
-
106
- $( '.obfx-module-form' ).on( 'keyup change', 'input, select, textarea', function () {
107
- $( this ).closest( 'form' ).find( '[class*="obfx-mod-btn"]:disabled' ).removeAttr( 'disabled' );
108
- } );
109
-
110
- $( '.obfx-mod-btn-cancel' ).on( 'click', function () {
111
- $( this ).closest( 'form' ).trigger( 'reset' );
112
- $( this ).closest( 'form' ).find( '[class*="obfx-mod-btn"]' ).attr( 'disabled', true );
113
- } );
114
-
115
- $( '.obfx-mod-btn-save' ).on( 'click', function () {
116
- var module_form = $( this ).closest( 'form' );
117
- module_form.find( '[class*="obfx-mod-btn"]' ).attr( 'disabled', true );
118
- module_form.find( '.obfx-mod-btn-save' ).addClass( 'loading' );
119
- module_form.find( $( 'input:checkbox:not(:checked)' ) ).each( function() {
120
- var input = $( '<input />' );
121
- input.attr( 'type', 'hidden' );
122
- input.attr( 'name', $( this ).attr( 'name' ) );
123
- input.attr( 'value', '0' );
124
- var form = $( this )[0].form;
125
- $( form ).append( input );
126
- } );
127
- var form_data = module_form.serializeArray();
128
- var maped_array = {};
129
- $.each( form_data, function( i, elem ) {
130
- maped_array[ elem.name ] = elem.value;
131
- } );
132
-
133
- form_data = JSON.stringify( maped_array );
134
-
135
- var ajax_data = {
136
- 'action': 'obfx_update_module_options',
137
- 'data': form_data
138
- };
139
-
140
- $.post( 'admin-ajax.php', ajax_data, function( response ) {
141
- module_form.find( '.obfx-mod-btn-save' ).removeClass( 'loading' );
142
- if ( response.type ) {
143
- module_form.closest( '.panel' ).find( '.obfx-mod-toast' ).addClass( 'toast-' + response.type );
144
- module_form.closest( '.panel' ).find( '.obfx-mod-toast span' ).html( response.message );
145
- module_form.closest( '.panel' ).find( '.obfx-mod-toast' ).show();
146
- setTimeout( function() {
147
- module_form.closest( '.panel' ).find( '.obfx-toast-dismiss' ).trigger( 'click' );
148
- }, 2000 );
149
- }
150
- }, 'json');
151
-
152
- } );
153
-
154
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
 
156
  };
157
 
37
  * Although scripts in the WordPress core, Plugins and Themes may be
38
  * practising this, we should strive to set a better example in our own work.
39
  */
40
+ $(
41
+ function() {
42
+ // if ( $( '#toplevel_page_jetpack' ).length ) {
43
+ // var obfx_menu = $( '#toplevel_page_obfx_menu' ).clone().wrap( '<p/>' ).parent().html();
44
+ // $( '#toplevel_page_obfx_menu' ).remove();
45
+ // $( '#toplevel_page_jetpack' ).before( obfx_menu );
46
+ // }
47
+ }
48
+ );
49
+
50
+ $(
51
+ function() {
52
+ $( '.obfx-mod-switch' ).on(
53
+ 'click', function() {
54
+ var switch_ref = $( this );
55
+ var checked = switch_ref.is( ':checked' );
56
+ var name = switch_ref.attr( 'name' );
57
+ var noance = switch_ref.val();
58
+
59
+ var post_data = {
60
+ noance: noance,
61
+ name: name,
62
+ checked: checked
63
+ };
64
+ var json_data = JSON.stringify( post_data );
65
+
66
+ var ajax_data = {
67
+ 'action': 'obfx_update_module_active_status',
68
+ 'data': json_data
69
+ };
70
+
71
+ $.post(
72
+ 'admin-ajax.php', ajax_data, function( response ) {
73
+ if ( response.type === 'success' ) {
74
+ if ( checked ) {
75
+ $( '#obfx-mod-' + name ).slideDown();
76
+ $( '#obfx-mod-' + name ).find( 'fieldset' ).removeAttr( 'disabled' );
77
+ } else {
78
+ $( '#obfx-mod-' + name ).hide();
79
+ $( '#obfx-mod-' + name ).find( 'fieldset' ).attr( 'disabled', true );
80
+ }
81
+ } else {
82
+ switch_ref.attr( 'checked', ! switch_ref.attr( 'checked' ) );
83
+ }
84
+ }, 'json'
85
+ );
86
  }
87
+ );
88
+
89
+ $( '.obfx-toast-dismiss' ).on(
90
+ 'click', function() {
91
+ $( this ).closest( '.obfx-mod-toast' ).slideUp(
92
+ 400, function() {
93
+ $( this ).removeClass( 'toast-success' );
94
+ $( this ).removeClass( 'toast-error' );
95
+ $( this ).removeClass( 'toast-warning' );
96
+ }
97
+ );
98
+ }
99
+ );
100
+
101
+ $( '.btn-expand' ).on(
102
+ 'click', function() {
103
+ if ( $( this ).hasClass( 'active' ) ) {
104
+ $( this ).removeClass( 'active' );
105
+ $( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).removeClass( 'active' );
106
+ $( this ).closest( '.panel.options' ).css( 'height', '75px' );
107
+ } else {
108
+ $( this ).addClass( 'active' );
109
+ $( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).addClass( 'active' );
110
+ $( this ).closest( '.panel.options' ).css( 'height', ( $( this ).closest( '.panel-header' ).siblings( '.obfx-module-form' ).height() * 1 + 80 ) + 'px' );
111
+ }
112
+ }
113
+ );
114
+
115
+ $( '.obfx-module-form' ).on(
116
+ 'submit', function (e) {
117
+ e.preventDefault();
118
+ }
119
+ );
120
+
121
+ $( '.obfx-module-form' ).on(
122
+ 'keyup change', 'input, select, textarea', function () {
123
+ $( this ).closest( 'form' ).find( '[class*="obfx-mod-btn"]:disabled' ).removeAttr( 'disabled' );
124
+ }
125
+ );
126
+
127
+ $( '.obfx-mod-btn-cancel' ).on(
128
+ 'click', function () {
129
+ $( this ).closest( 'form' ).trigger( 'reset' );
130
+ $( this ).closest( 'form' ).find( '[class*="obfx-mod-btn"]' ).attr( 'disabled', true );
131
+ }
132
+ );
133
+
134
+ $( '.obfx-mod-btn-save' ).on(
135
+ 'click', function () {
136
+ var module_form = $( this ).closest( 'form' );
137
+ module_form.find( '[class*="obfx-mod-btn"]' ).attr( 'disabled', true );
138
+ module_form.find( '.obfx-mod-btn-save' ).addClass( 'loading' );
139
+ module_form.find( $( 'input:checkbox:not(:checked)' ) ).each(
140
+ function() {
141
+ var input = $( '<input />' );
142
+ input.attr( 'type', 'hidden' );
143
+ input.attr( 'name', $( this ).attr( 'name' ) );
144
+ input.attr( 'value', '0' );
145
+ var form = $( this )[0].form;
146
+ $( form ).append( input );
147
+ }
148
+ );
149
+ var form_data = module_form.serializeArray();
150
+ var maped_array = {};
151
+ $.each(
152
+ form_data, function( i, elem ) {
153
+ maped_array[ elem.name ] = elem.value;
154
+ }
155
+ );
156
+
157
+ form_data = JSON.stringify( maped_array );
158
+
159
+ var ajax_data = {
160
+ 'action': 'obfx_update_module_options',
161
+ 'data': form_data
162
+ };
163
+
164
+ $.post(
165
+ 'admin-ajax.php', ajax_data, function( response ) {
166
+ module_form.find( '.obfx-mod-btn-save' ).removeClass( 'loading' );
167
+ if ( response.type ) {
168
+ module_form.closest( '.panel' ).find( '.obfx-mod-toast' ).addClass( 'toast-' + response.type );
169
+ module_form.closest( '.panel' ).find( '.obfx-mod-toast span' ).html( response.message );
170
+ module_form.closest( '.panel' ).find( '.obfx-mod-toast' ).show();
171
+ setTimeout(
172
+ function() {
173
+ module_form.closest( '.panel' ).find( '.obfx-toast-dismiss' ).trigger( 'click' );
174
+ }, 2000
175
+ );
176
+ }
177
+ }, 'json'
178
+ );
179
+
180
+ }
181
+ );
182
+
183
+ }
184
+ );
185
 
186
  };
187
 
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.1.1';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
+ $this->version = '2.2.0';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
languages/themeisle-companion.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Orbit Fox Companion 2.0.11\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/orbit-fox/issues\n"
7
- "POT-Creation-Date: 2017-11-07 14:30:58+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -122,6 +122,7 @@ msgid "Module Description ..."
122
  msgstr ""
123
 
124
  #: core/app/views/partials/module-tile-tpl.php:42
 
125
  msgid "Activate"
126
  msgstr ""
127
 
@@ -714,91 +715,91 @@ msgid "Module to define menu icons for navigation."
714
  msgstr ""
715
 
716
  #: obfx_modules/mystock-import/inc/photos.php:28
717
- #: obfx_modules/mystock-import/init.php:188
718
  msgid "Deselect"
719
  msgstr ""
720
 
721
- #: obfx_modules/mystock-import/init.php:44
722
  msgid "Mystock Import"
723
  msgstr ""
724
 
725
- #: obfx_modules/mystock-import/init.php:45
726
- msgid "Module to import images from mystock."
727
  msgstr ""
728
 
729
- #: obfx_modules/mystock-import/init.php:108
730
- #: obfx_modules/mystock-import/init.php:115
731
- #: obfx_modules/mystock-import/init.php:122
732
- #: obfx_modules/mystock-import/init.php:130
733
- #: obfx_modules/mystock-import/init.php:135
734
  msgid "Image failed to upload"
735
  msgstr ""
736
 
737
- #: obfx_modules/mystock-import/init.php:222
738
  msgid "Square"
739
  msgstr ""
740
 
741
- #: obfx_modules/mystock-import/init.php:223
742
  msgid "Large Square"
743
  msgstr ""
744
 
745
- #: obfx_modules/mystock-import/init.php:224
746
  msgid "Thumbnail"
747
  msgstr ""
748
 
749
- #: obfx_modules/mystock-import/init.php:225
750
  msgid "Small"
751
  msgstr ""
752
 
753
- #: obfx_modules/mystock-import/init.php:226
754
  msgid "Small 320"
755
  msgstr ""
756
 
757
- #: obfx_modules/mystock-import/init.php:227
758
  msgid "Medium"
759
  msgstr ""
760
 
761
- #: obfx_modules/mystock-import/init.php:228
762
  msgid "Medium 640"
763
  msgstr ""
764
 
765
- #: obfx_modules/mystock-import/init.php:229
766
  msgid "Medium 800"
767
  msgstr ""
768
 
769
- #: obfx_modules/mystock-import/init.php:230
770
  msgid "Large"
771
  msgstr ""
772
 
773
- #: obfx_modules/mystock-import/init.php:231
774
  msgid "Original"
775
  msgstr ""
776
 
777
- #: obfx_modules/mystock-import/init.php:239
778
  msgid "Attachement display settings"
779
  msgstr ""
780
 
781
- #: obfx_modules/mystock-import/init.php:241
782
  msgid "Size"
783
  msgstr ""
784
 
785
- #: obfx_modules/mystock-import/init.php:291
786
  msgid "Fetching data"
787
  msgstr ""
788
 
789
- #: obfx_modules/mystock-import/init.php:292
790
  msgid "Downloading image. Please wait..."
791
  msgstr ""
792
 
793
- #: obfx_modules/mystock-import/init.php:293
794
  msgid "Your image was imported. Go to Media Library tab to use it."
795
  msgstr ""
796
 
797
- #: obfx_modules/mystock-import/init.php:294
798
  msgid "Loading more photos..."
799
  msgstr ""
800
 
801
- #: obfx_modules/mystock-import/init.php:295
802
  msgid "MyStock Library"
803
  msgstr ""
804
 
@@ -810,7 +811,7 @@ msgstr ""
810
  msgid "Add basic social sharing to your posts and pages."
811
  msgstr ""
812
 
813
- #: obfx_modules/social-sharing/views/hestia-social-sharing-tpl.php:37
814
  msgid "Share on "
815
  msgstr ""
816
 
@@ -822,6 +823,64 @@ msgstr ""
822
  msgid "A simple module for your WordPress data."
823
  msgstr ""
824
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
825
  #. Plugin URI of the plugin/theme
826
  msgid "https://themeisle.com/plugins/orbit-fox-companion"
827
  msgstr ""
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Orbit Fox Companion 2.1.0\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/orbit-fox/issues\n"
7
+ "POT-Creation-Date: 2017-11-10 13:40:54+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
122
  msgstr ""
123
 
124
  #: core/app/views/partials/module-tile-tpl.php:42
125
+ #: obfx_modules/template-directory/init.php:457
126
  msgid "Activate"
127
  msgstr ""
128
 
715
  msgstr ""
716
 
717
  #: obfx_modules/mystock-import/inc/photos.php:28
718
+ #: obfx_modules/mystock-import/init.php:187
719
  msgid "Deselect"
720
  msgstr ""
721
 
722
+ #: obfx_modules/mystock-import/init.php:49
723
  msgid "Mystock Import"
724
  msgstr ""
725
 
726
+ #: obfx_modules/mystock-import/init.php:50
727
+ msgid "Module to import images directly from"
728
  msgstr ""
729
 
730
+ #: obfx_modules/mystock-import/init.php:132
731
+ #: obfx_modules/mystock-import/init.php:139
732
+ #: obfx_modules/mystock-import/init.php:146
733
+ #: obfx_modules/mystock-import/init.php:154
734
+ #: obfx_modules/mystock-import/init.php:159
735
  msgid "Image failed to upload"
736
  msgstr ""
737
 
738
+ #: obfx_modules/mystock-import/init.php:217
739
  msgid "Square"
740
  msgstr ""
741
 
742
+ #: obfx_modules/mystock-import/init.php:218
743
  msgid "Large Square"
744
  msgstr ""
745
 
746
+ #: obfx_modules/mystock-import/init.php:219
747
  msgid "Thumbnail"
748
  msgstr ""
749
 
750
+ #: obfx_modules/mystock-import/init.php:220
751
  msgid "Small"
752
  msgstr ""
753
 
754
+ #: obfx_modules/mystock-import/init.php:221
755
  msgid "Small 320"
756
  msgstr ""
757
 
758
+ #: obfx_modules/mystock-import/init.php:222
759
  msgid "Medium"
760
  msgstr ""
761
 
762
+ #: obfx_modules/mystock-import/init.php:223
763
  msgid "Medium 640"
764
  msgstr ""
765
 
766
+ #: obfx_modules/mystock-import/init.php:224
767
  msgid "Medium 800"
768
  msgstr ""
769
 
770
+ #: obfx_modules/mystock-import/init.php:225
771
  msgid "Large"
772
  msgstr ""
773
 
774
+ #: obfx_modules/mystock-import/init.php:226
775
  msgid "Original"
776
  msgstr ""
777
 
778
+ #: obfx_modules/mystock-import/init.php:234
779
  msgid "Attachement display settings"
780
  msgstr ""
781
 
782
+ #: obfx_modules/mystock-import/init.php:236
783
  msgid "Size"
784
  msgstr ""
785
 
786
+ #: obfx_modules/mystock-import/init.php:286
787
  msgid "Fetching data"
788
  msgstr ""
789
 
790
+ #: obfx_modules/mystock-import/init.php:287
791
  msgid "Downloading image. Please wait..."
792
  msgstr ""
793
 
794
+ #: obfx_modules/mystock-import/init.php:288
795
  msgid "Your image was imported. Go to Media Library tab to use it."
796
  msgstr ""
797
 
798
+ #: obfx_modules/mystock-import/init.php:289
799
  msgid "Loading more photos..."
800
  msgstr ""
801
 
802
+ #: obfx_modules/mystock-import/init.php:290
803
  msgid "MyStock Library"
804
  msgstr ""
805
 
811
  msgid "Add basic social sharing to your posts and pages."
812
  msgstr ""
813
 
814
+ #: obfx_modules/social-sharing/views/hestia-social-sharing-tpl.php:36
815
  msgid "Share on "
816
  msgstr ""
817
 
823
  msgid "A simple module for your WordPress data."
824
  msgstr ""
825
 
826
+ #: obfx_modules/template-directory/init.php:29
827
+ msgid "Template Directory Module"
828
+ msgstr ""
829
+
830
+ #: obfx_modules/template-directory/init.php:30
831
+ msgid ""
832
+ "The awesome template directory is aiming to provide a wide range of "
833
+ "templates that you can import straight into your website."
834
+ msgstr ""
835
+
836
+ #: obfx_modules/template-directory/init.php:62
837
+ msgid "A new Orbit Fox Template"
838
+ msgstr ""
839
+
840
+ #: obfx_modules/template-directory/init.php:64
841
+ msgid "This is an awesome Orbit Fox Template."
842
+ msgstr ""
843
+
844
+ #: obfx_modules/template-directory/init.php:71
845
+ msgid "About Our Business"
846
+ msgstr ""
847
+
848
+ #: obfx_modules/template-directory/init.php:72
849
+ #: obfx_modules/template-directory/init.php:79
850
+ msgid "A fancy description here"
851
+ msgstr ""
852
+
853
+ #: obfx_modules/template-directory/init.php:78
854
+ msgid "Contact Us"
855
+ msgstr ""
856
+
857
+ #: obfx_modules/template-directory/init.php:275
858
+ #: obfx_modules/template-directory/views/template-directory-page-tpl.php:19
859
+ msgid "Orbit Fox Template Directory"
860
+ msgstr ""
861
+
862
+ #: obfx_modules/template-directory/init.php:275
863
+ msgid "Template Directory"
864
+ msgstr ""
865
+
866
+ #: obfx_modules/template-directory/init.php:444
867
+ msgid "Install and activate"
868
+ msgstr ""
869
+
870
+ #: obfx_modules/template-directory/views/template-directory-page-tpl.php:40
871
+ msgid "Preview"
872
+ msgstr ""
873
+
874
+ #: obfx_modules/template-directory/views/template-directory-page-tpl.php:44
875
+ msgid "Import"
876
+ msgstr ""
877
+
878
+ #: obfx_modules/template-directory/views/template-plugin-install-tpl.php:17
879
+ msgid ""
880
+ "In order to import this template, you must have Elementor Page Builder "
881
+ "installed. Click the button below to install and activate now."
882
+ msgstr ""
883
+
884
  #. Plugin URI of the plugin/theme
885
  msgid "https://themeisle.com/plugins/orbit-fox-companion"
886
  msgstr ""
obfx_modules/companion-legacy/inc/hestia/common-functions.php ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Functions that are running in both Hestia Lite and Pro
4
+ *
5
+ * @author Themeisle
6
+ * @package themeisle-companion
7
+ */
8
+
9
+ /**
10
+ * Change default alignment for top bar.
11
+ */
12
+ function themeisle_hestia_top_bar_default_alignment(){
13
+ return 'left';
14
+ }
15
+
16
+ /**
17
+ * Add default content to clients section;
18
+ */
19
+ function themeisle_hestia_clients_default_content(){
20
+ $plugin_path = plugins_url( 'inc/img/', __FILE__ );
21
+ return json_encode(
22
+ array(
23
+ array( 'image_url' => $plugin_path . 'clients1.png', 'link' => '#'),
24
+ array( 'image_url' => $plugin_path . 'clients2.png', 'link' => '#'),
25
+ array( 'image_url' => $plugin_path . 'clients3.png', 'link' => '#'),
26
+ array( 'image_url' => $plugin_path . 'clients4.png', 'link' => '#'),
27
+ array( 'image_url' => $plugin_path . 'clients5.png', 'link' => '#'),
28
+ )
29
+ );
30
+ }
31
+
32
+ /**
33
+ * Function to load content in top bar.
34
+ */
35
+ function themeisle_hestia_top_bar_default_content() {
36
+ if ( class_exists( 'WooCommerce' ) ) {
37
+ $top_bar_state = 'woo_top';
38
+ } else {
39
+ if ( 'page' == get_option('show_on_front') ) {
40
+ $top_bar_state = 'page_top';
41
+ } else {
42
+ $top_bar_state = 'blog_top';
43
+ }
44
+ }
45
+
46
+ $load_default = get_option( 'hestia_load_default' );
47
+ if ( $load_default !== false ) {
48
+ return;
49
+ }
50
+
51
+ switch ( $top_bar_state ) {
52
+ case 'woo_top':
53
+ themeisle_hestia_set_top_bar_menu( 'contact' );
54
+ themeisle_hestia_set_top_bar_widgets( $top_bar_state );
55
+ break;
56
+ case 'blog_top':
57
+ themeisle_hestia_set_top_bar_menu( 'socials' );
58
+ themeisle_hestia_set_top_bar_widgets( $top_bar_state );
59
+ break;
60
+ case 'page_top':
61
+ themeisle_hestia_set_top_bar_menu( 'contact' );
62
+ themeisle_hestia_set_top_bar_widgets( $top_bar_state );
63
+ break;
64
+ }
65
+
66
+ add_option( 'hestia_load_default', true );
67
+ }
68
+
69
+
70
+ /**
71
+ * Set default widgets in top bar.
72
+ *
73
+ * @param string $type Top bar state.
74
+ */
75
+ function themeisle_hestia_set_top_bar_widgets( $type ) {
76
+
77
+ $active_widgets = get_option( 'sidebars_widgets' );
78
+
79
+ if ( ! empty( $active_widgets['sidebar-top-bar'] ) ) :
80
+ /* There is already some content. */
81
+ return;
82
+ endif;
83
+
84
+ switch ( $type ) {
85
+ case 'woo_top':
86
+ $counter = 1;
87
+ $active_widgets['sidebar-top-bar'][0] = 'woocommerce_widget_cart-' . $counter;
88
+ $cart_widget[ $counter ] = array( 'title' => 'Cart' );
89
+ update_option( 'widget_woocommerce_widget_cart', $cart_widget );
90
+ $counter++;
91
+
92
+ $active_widgets['sidebar-top-bar'][] = 'woocommerce_product_search-' . $counter;
93
+ $search_widget[ $counter ] = array( 'title' => 'Search' );
94
+ update_option( 'widget_woocommerce_product_search', $search_widget );
95
+ break;
96
+ case 'blog_top':
97
+ $active_widgets['sidebar-top-bar'][0] = 'search-1';
98
+ $search_widget[1] = array( 'title' => 'Search' );
99
+ update_option( 'widget_search', $search_widget );
100
+ break;
101
+ case 'page_top':
102
+ $menu_id = themeisle_hestia_create_menu( 'socials' );
103
+ $active_widgets['sidebar-top-bar'][0] = 'nav_menu-1';
104
+ $menu_widget[1] = array(
105
+ 'title' => 'Socials',
106
+ 'nav_menu' => $menu_id,
107
+ );
108
+ update_option( 'widget_nav_menu', $menu_widget );
109
+ break;
110
+ }
111
+ update_option( 'sidebars_widgets', $active_widgets );
112
+ }
113
+
114
+ /**
115
+ * Set default menu in top bar.
116
+ *
117
+ * @param string $type Top bar state.
118
+ */
119
+ function themeisle_hestia_set_top_bar_menu( $type ) {
120
+ $theme_navs = get_theme_mod( 'nav_menu_locations' );
121
+ if ( empty( $theme_navs['top-bar-menu'] ) ) {
122
+ $menu_id = themeisle_hestia_create_menu( $type );
123
+ $theme_navs['top-bar-menu'] = $menu_id;
124
+ set_theme_mod( 'nav_menu_locations', $theme_navs );
125
+ }
126
+ }
127
+
128
+ /**
129
+ * Create default menu for top bar
130
+ *
131
+ * @param string $type Top bar state.
132
+ */
133
+ function themeisle_hestia_create_menu( $type ) {
134
+
135
+ $menu_name = 'Default Top Menu';
136
+ if ( $type === 'socials' ) {
137
+ $menu_name = 'Socials Top Menu';
138
+ }
139
+
140
+ $menu_exists = wp_get_nav_menu_object( $menu_name );
141
+ if ( ! $menu_exists ) {
142
+
143
+ $menu_id = wp_create_nav_menu( $menu_name );
144
+ $menu_items = array();
145
+ switch ( $type ) {
146
+ case 'contact':
147
+ $menu_items = array(
148
+ array(
149
+ 'title' => esc_html__('1-800-123-4567','themeisle-companion'),
150
+ 'url' => esc_html__('tel:1-800-123-4567','themeisle-companion'),
151
+ ),
152
+ array(
153
+ 'title' => esc_html__('friends@themeisle.com','themeisle-companion'),
154
+ 'url' => esc_html__('mailto:friends@themeisle.com','themeisle-companion'),
155
+ ),
156
+ );
157
+ break;
158
+ case 'socials':
159
+ $menu_items = array(
160
+ array(
161
+ 'title' => esc_html__('Facebook','themeisle-companion'),
162
+ 'url' => esc_html__('www.facebook.com','themeisle-companion'),
163
+ ),
164
+ array(
165
+ 'title' => esc_html__('Twitter','themeisle-companion'),
166
+ 'url' => esc_html__('www.twitter.com','themeisle-companion'),
167
+ ),
168
+ array(
169
+ 'title' => esc_html__('Google','themeisle-companion'),
170
+ 'url' => esc_html__('www.google.com','themeisle-companion'),
171
+ ),
172
+ array(
173
+ 'title' => esc_html__('Linkedin','themeisle-companion'),
174
+ 'url' => esc_html__('www.linkedin.com','themeisle-companion'),
175
+ ),
176
+ array(
177
+ 'title' => esc_html__('Instagram','themeisle-companion'),
178
+ 'url' => esc_html__('www.instagram.com','themeisle-companion'),
179
+ ),
180
+ array(
181
+ 'title' => esc_html__('Pinterest','themeisle-companion'),
182
+ 'url' => esc_html__('www.pinterest.com','themeisle-companion'),
183
+ ),
184
+ array(
185
+ 'title' => esc_html__('Youtube','themeisle-companion'),
186
+ 'url' => esc_html__('www.youtube.com','themeisle-companion'),
187
+ ),
188
+ );
189
+ break;
190
+ }
191
+ foreach ( $menu_items as $menu_item ) {
192
+ wp_update_nav_menu_item(
193
+ $menu_id, 0, array(
194
+ 'menu-item-title' => $menu_item['title'],
195
+ 'menu-item-url' => $menu_item['url'],
196
+ 'menu-item-status' => 'publish',
197
+ )
198
+ );
199
+ }
200
+ return $menu_id;
201
+ }
202
+ return '';
203
+ }
obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php CHANGED
@@ -60,6 +60,7 @@ if ( ! function_exists( 'hestia_clients_bar_customize_register' ) ) :
60
  'hestia_clients_bar_content', array(
61
  'sanitize_callback' => 'hestia_repeater_sanitize',
62
  'transport' => $selective_refresh,
 
63
  )
64
  );
65
 
60
  'hestia_clients_bar_content', array(
61
  'sanitize_callback' => 'hestia_repeater_sanitize',
62
  'transport' => $selective_refresh,
63
+ 'default' => apply_filters( 'hestia_clients_bar_default_content', false ),
64
  )
65
  );
66
 
obfx_modules/companion-legacy/inc/hestia/inc/img/clients1.png ADDED
Binary file
obfx_modules/companion-legacy/inc/hestia/inc/img/clients2.png ADDED
Binary file
obfx_modules/companion-legacy/inc/hestia/inc/img/clients3.png ADDED
Binary file
obfx_modules/companion-legacy/inc/hestia/inc/img/clients4.png ADDED
Binary file
obfx_modules/companion-legacy/inc/hestia/inc/img/clients5.png ADDED
Binary file
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-clients-bar-section.php CHANGED
@@ -25,13 +25,13 @@ if ( ! function_exists( 'hestia_clients_bar' ) ) :
25
  }
26
 
27
  $hide_section = get_theme_mod( 'hestia_clients_bar_hide', true );
28
- $hestia_clients_bar_content = get_theme_mod( 'hestia_clients_bar_content' );
29
  $hestia_clients_bar_content_decoded = json_decode( $hestia_clients_bar_content );
30
 
31
  /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
32
  if ( $is_shortcode === false && ( empty( $hestia_clients_bar_content ) || (bool) $hide_section === true ) || empty( $hestia_clients_bar_content_decoded ) ) {
33
  if ( is_customize_preview() ) {
34
- echo '<section class="hestia-clients-bar text-center" data-sorder="hestia_clients_bar" style="display: none"></section>';
35
  }
36
  return;
37
  }
@@ -39,7 +39,7 @@ if ( ! function_exists( 'hestia_clients_bar' ) ) :
39
  $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
40
 
41
  ?>
42
- <section class="hestia-clients-bar text-center <?php echo esc_attr( $wrapper_class ); ?>" data-sorder="hestia_clients_bar">
43
  <div class="container">
44
  <div class="row">
45
  <?php
25
  }
26
 
27
  $hide_section = get_theme_mod( 'hestia_clients_bar_hide', true );
28
+ $hestia_clients_bar_content = get_theme_mod( 'hestia_clients_bar_content', apply_filters( 'hestia_clients_bar_default_content', false ) );
29
  $hestia_clients_bar_content_decoded = json_decode( $hestia_clients_bar_content );
30
 
31
  /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
32
  if ( $is_shortcode === false && ( empty( $hestia_clients_bar_content ) || (bool) $hide_section === true ) || empty( $hestia_clients_bar_content_decoded ) ) {
33
  if ( is_customize_preview() ) {
34
+ echo '<section class="hestia-clients-bar text-center" id="clients" data-sorder="hestia_clients_bar" style="display: none"></section>';
35
  }
36
  return;
37
  }
39
  $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
40
 
41
  ?>
42
+ <section class="hestia-clients-bar text-center <?php echo esc_attr( $wrapper_class ); ?>" id="clients" data-sorder="hestia_clients_bar">
43
  <div class="container">
44
  <div class="row">
45
  <?php
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php CHANGED
@@ -28,7 +28,7 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
28
  $hestia_ribbon_hide = get_theme_mod( 'hestia_ribbon_hide', true );
29
  if ( $is_shortcode === false && (bool) $hestia_ribbon_hide === true ) {
30
  if ( is_customize_preview() ) {
31
- echo '<section class="hestia-ribbon section section-image" data-sorder="hestia_ribbon" style="display: none"></section>';
32
  }
33
  return;
34
  }
@@ -43,7 +43,7 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
43
 
44
  $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
45
  ?>
46
- <section class="hestia-ribbon section section-image <?php echo esc_attr( $wrapper_class ); ?>" data-sorder="hestia_ribbon">
47
  <?php hestia_ribbon_background(); ?>
48
  <div class="container">
49
  <div class="row hestia-xs-text-center hestia-like-table">
28
  $hestia_ribbon_hide = get_theme_mod( 'hestia_ribbon_hide', true );
29
  if ( $is_shortcode === false && (bool) $hestia_ribbon_hide === true ) {
30
  if ( is_customize_preview() ) {
31
+ echo '<section class="hestia-ribbon section section-image" id="ribbon" data-sorder="hestia_ribbon" style="display: none"></section>';
32
  }
33
  return;
34
  }
43
 
44
  $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
45
  ?>
46
+ <section class="hestia-ribbon section section-image <?php echo esc_attr( $wrapper_class ); ?>" id="ribbon" data-sorder="hestia_ribbon">
47
  <?php hestia_ribbon_background(); ?>
48
  <div class="container">
49
  <div class="row hestia-xs-text-center hestia-like-table">
obfx_modules/companion-legacy/init.php CHANGED
@@ -27,16 +27,14 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
27
  */
28
  public function __construct() {
29
  parent::__construct();
30
- $this->name = __( 'Companion Legacy', 'themeisle-companion' );
31
- $this->description = __( 'Module containing legacy functionality from ThemeIsle Companion.', 'themeisle-companion' );
32
 
33
- $this->auto = true;
34
 
35
  $this->inc_dir = $this->get_dir() . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR;
36
- if( ! defined('THEMEISLE_COMPANION_PATH') ) {
37
  define( 'THEMEISLE_COMPANION_PATH', $this->inc_dir );
38
  }
39
- if( ! defined('THEMEISLE_COMPANION_URL') ) {
40
  define( 'THEMEISLE_COMPANION_URL', plugin_dir_url( $this->inc_dir ) );
41
  }
42
  $theme_name = '';
@@ -61,9 +59,19 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
61
 
62
  if ( $this->is_hestia() ) {
63
  require_once $this->inc_dir . 'hestia' . DIRECTORY_SEPARATOR . 'functions.php';
 
64
  $theme_name = 'Hestia';
65
 
66
  }
 
 
 
 
 
 
 
 
 
67
  if ( ! empty( $theme_name ) ) {
68
  $this->notices = array(
69
  array(
@@ -100,6 +108,14 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
100
  return false;
101
  }
102
 
 
 
 
 
 
 
 
 
103
  /**
104
  * Determine if module should be loaded.
105
  *
@@ -108,7 +124,7 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
108
  * @return bool
109
  */
110
  public function enable_module() {
111
- if ( $this->is_hestia() || $this->is_rhea() || $this->is_zerif() ) {
112
  return true;
113
  } else {
114
  return false;
@@ -171,13 +187,37 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
171
  themeisle_hestia_require();
172
  }
173
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  /**
175
  * Wrapper method for themeisle_hestia_load_controls function call.
176
  *
177
  * @since 2.0.4
178
  * @access public
179
  */
180
- public function hestia_require_customizer(){
181
  themeisle_hestia_load_controls();
182
  }
183
 
@@ -221,9 +261,18 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
221
 
222
  if ( $this->is_hestia() ) {
223
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_require' );
 
 
 
224
  $this->loader->add_action( 'customize_register', $this, 'hestia_require_customizer', 0 );
225
  $this->loader->add_action( 'after_switch_theme', $this, 'hestia_set_front_page' );
226
  }
 
 
 
 
 
 
227
  }
228
 
229
  /**
27
  */
28
  public function __construct() {
29
  parent::__construct();
 
 
30
 
31
+ $this->active_default = true;
32
 
33
  $this->inc_dir = $this->get_dir() . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR;
34
+ if ( ! defined( 'THEMEISLE_COMPANION_PATH' ) ) {
35
  define( 'THEMEISLE_COMPANION_PATH', $this->inc_dir );
36
  }
37
+ if ( ! defined( 'THEMEISLE_COMPANION_URL' ) ) {
38
  define( 'THEMEISLE_COMPANION_URL', plugin_dir_url( $this->inc_dir ) );
39
  }
40
  $theme_name = '';
59
 
60
  if ( $this->is_hestia() ) {
61
  require_once $this->inc_dir . 'hestia' . DIRECTORY_SEPARATOR . 'functions.php';
62
+ require_once $this->inc_dir . 'hestia' . DIRECTORY_SEPARATOR . 'common-functions.php';
63
  $theme_name = 'Hestia';
64
 
65
  }
66
+
67
+ if ( $this->is_hestia_pro() ) {
68
+ require_once $this->inc_dir . 'hestia' . DIRECTORY_SEPARATOR . 'common-functions.php';
69
+ $theme_name = 'Hestia Pro';
70
+
71
+ }
72
+ $this->name = sprintf( __( '%s enhancements ', 'themeisle-companion' ), $theme_name );
73
+ $this->description = sprintf( __( 'Module containing frontpage improvements for %s theme.', 'themeisle-companion' ), $theme_name );
74
+
75
  if ( ! empty( $theme_name ) ) {
76
  $this->notices = array(
77
  array(
108
  return false;
109
  }
110
 
111
+ private function is_hestia_pro(){
112
+ if ( $this->get_active_theme_dir() == 'hestia-pro' ) {
113
+ return true;
114
+ }
115
+
116
+ return false;
117
+ }
118
+
119
  /**
120
  * Determine if module should be loaded.
121
  *
124
  * @return bool
125
  */
126
  public function enable_module() {
127
+ if ( $this->is_hestia() || $this->is_rhea() || $this->is_zerif() || $this->is_hestia_pro() ) {
128
  return true;
129
  } else {
130
  return false;
187
  themeisle_hestia_require();
188
  }
189
 
190
+ /**
191
+ * Wrapper method for themeisle_hestia_set_default_content function call.
192
+ *
193
+ * @since 2.1.1
194
+ * @access public
195
+ */
196
+ public function hestia_load_default_content(){
197
+ themeisle_hestia_top_bar_default_content();
198
+ }
199
+
200
+ /**
201
+ * Wrapper method for themeisle_hestia_clients_default_content function call.
202
+ *
203
+ * @since 2.1.1
204
+ * @access public
205
+ */
206
+ public function hestia_load_clients_default_content(){
207
+ return themeisle_hestia_clients_default_content();
208
+ }
209
+
210
+ public function hestia_top_bar_default_alignment(){
211
+ return themeisle_hestia_top_bar_default_alignment();
212
+ }
213
+
214
  /**
215
  * Wrapper method for themeisle_hestia_load_controls function call.
216
  *
217
  * @since 2.0.4
218
  * @access public
219
  */
220
+ public function hestia_require_customizer() {
221
  themeisle_hestia_load_controls();
222
  }
223
 
261
 
262
  if ( $this->is_hestia() ) {
263
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_require' );
264
+ $this->loader->add_action( 'after_setup_theme', $this, 'hestia_load_default_content' );
265
+ $this->loader->add_filter( 'after_setup_theme', $this, 'hestia_load_clients_default_content' );
266
+ $this->loader->add_filter( 'hestia_top_bar_alignment_default', $this, 'hestia_top_bar_default_alignment' );
267
  $this->loader->add_action( 'customize_register', $this, 'hestia_require_customizer', 0 );
268
  $this->loader->add_action( 'after_switch_theme', $this, 'hestia_set_front_page' );
269
  }
270
+
271
+ if ( $this->is_hestia_pro() ) {
272
+ $this->loader->add_action( 'after_setup_theme', $this, 'hestia_load_default_content' );
273
+ $this->loader->add_filter( 'hestia_clients_bar_default_content', $this, 'hestia_load_clients_default_content' );
274
+ $this->loader->add_filter( 'hestia_top_bar_alignment_default', $this, 'hestia_top_bar_default_alignment' );
275
+ }
276
  }
277
 
278
  /**
obfx_modules/elementor-widgets/css/public.css ADDED
@@ -0,0 +1,293 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Pricing Table Base CSS */
2
+ .obfx-pricing-table-wrapper, .obfx-pricing-table-wrapper p.obfx-pricing-table-subtitle {
3
+ text-align: center;
4
+ }
5
+
6
+ .obfx-pricing-table-wrapper a {
7
+ cursor: pointer;
8
+ }
9
+
10
+ .obfx-title-wrapper {
11
+ padding: 15px;
12
+ }
13
+
14
+ .obfx-pricing-table-title {
15
+ font-weight: 600;
16
+ }
17
+
18
+ .obfx-pricing-table-wrapper .obfx-feature-list {
19
+ list-style: none;
20
+ padding: 10px 50px;
21
+ margin: 0;
22
+ }
23
+
24
+ .obfx-pricing-table-wrapper .obfx-feature-list li {
25
+ font-size: 16px;
26
+ }
27
+
28
+ .obfx-price-wrapper {
29
+ padding: 20px 0;
30
+ }
31
+
32
+ .obfx-price {
33
+ line-height: normal;
34
+ font-size: 80px;
35
+ font-weight: 600;
36
+ }
37
+
38
+ .obfx-pricing-period,
39
+ .obfx-price-currency {
40
+ font-size: 21px;
41
+ }
42
+
43
+ .obfx-button-icon-align-right i {
44
+ margin-left: 5px;
45
+ }
46
+ .obfx-button-icon-align-left i {
47
+ margin-right: 5px;
48
+ }
49
+
50
+ .obfx-pricing-table-accented {
51
+ font-weight: 600;
52
+ }
53
+
54
+ .obfx-pricing-table-button-wrapper {
55
+ padding: 20px 0;
56
+ }
57
+
58
+ .obfx-pricing-table-button {
59
+ padding: 10px 20px;
60
+ border-radius: 5px;
61
+ }
62
+ /* End Of Pricing Table Base CSS */
63
+
64
+ /* Post Type Grid Base CSS */
65
+
66
+ .obfx-grid:after {
67
+ visibility: hidden;
68
+ display: block;
69
+ font-size: 0;
70
+ content: " ";
71
+ clear: both;
72
+ height: 0;
73
+ }
74
+
75
+ .obfx-grid-container {
76
+ display: -webkit-flex;
77
+ display: flex;
78
+ -webkit-flex-wrap: wrap;
79
+ flex-wrap: wrap;
80
+ margin-left: -15px;
81
+ margin-right: -15px;
82
+ }
83
+
84
+ .obfx-grid-wrapper {
85
+ padding-left: 15px;
86
+ padding-right: 15px;
87
+ }
88
+
89
+ .obfx-grid .obfx-grid-col-image {
90
+ display: block;
91
+ margin: 0 0 10px 0;
92
+ overflow: hidden;
93
+ position: relative;
94
+ left: 0;
95
+ right: 0;
96
+ bottom: 0;
97
+ top: 0;
98
+ -webkit-box-shadow: 0px 3px 10px 0px rgba(181,181,181,1);
99
+ -moz-box-shadow: 0px 3px 10px 0px rgba(181,181,181,1);
100
+ box-shadow: 0px 3px 10px 0px rgba(181,181,181,1);
101
+ }
102
+
103
+ .obfx-grid .obfx-grid-col-image {
104
+ display: inline-block;
105
+ height: 200px;
106
+ width: 100%;
107
+ }
108
+
109
+ .obfx-grid .obfx-grid-col-image.obfx-fit-height img {
110
+ height: 100%;
111
+ width: auto;
112
+ }
113
+
114
+ .obfx-grid .obfx-grid-col-image img {
115
+ display: block;
116
+ height: auto;
117
+ left: 50%;
118
+ position: absolute;
119
+ max-height: none;
120
+ max-width: none;
121
+ top: 50%;
122
+ transform: translate(-50%,-50%);
123
+ width: 100%;
124
+ }
125
+
126
+ .obfx-grid .obfx-grid-title,
127
+ .obfx-grid .obfx-grid-title a {
128
+ color: #333;
129
+ font-size: 24px;
130
+ line-height: 1.5;
131
+ margin: 0;
132
+ }
133
+
134
+ .obfx-grid-meta {
135
+ margin: 0 0 10px 0;
136
+ }
137
+
138
+ .obfx-grid-meta > span {
139
+ color: #999;
140
+ font-size: 14px;
141
+ margin-right: 10px;
142
+ }
143
+
144
+ .obfx-grid-meta > span:last-of-type {
145
+ margin-right: 0;
146
+ }
147
+
148
+ .obfx-grid-meta .fa {
149
+ margin-right: 7px;
150
+ }
151
+
152
+ .obfx-grid-meta a {
153
+ color: #999;
154
+ text-decoration: none;
155
+ }
156
+
157
+ .obfx-grid-meta a:hover,
158
+ .obfx-grid-meta a:focus {
159
+ color: inherit;
160
+ text-decoration: underline;
161
+ }
162
+
163
+ .obfx-grid-categories-item:after,
164
+ .obfx-grid-tags-item:after {
165
+ content: ', ';
166
+ }
167
+
168
+ .obfx-grid-categories-item:last-of-type:after,
169
+ .obfx-grid-tags-item:last-of-type:after {
170
+ content: '';
171
+ display: none;
172
+ }
173
+
174
+ .obfx-grid-content {
175
+ color: #555;
176
+ font-size: 16px;
177
+ line-height: 1.5;
178
+ margin: 0 0 10px 0;
179
+ }
180
+
181
+ .obfx-grid-footer a {
182
+ color: #333;
183
+ display: inline-block;
184
+ font-size: 14px;
185
+ font-weight: 700;
186
+ }
187
+
188
+ .obfx-grid-container.obfx-grid-style-list .obfx-grid-col {
189
+ display: -webkit-flex;
190
+ display: flex;
191
+ -webkit-flex-wrap: wrap;
192
+ flex-wrap: wrap;
193
+ }
194
+
195
+ .obfx-grid-container.obfx-grid-style-list .obfx-grid-col-image {
196
+ width: 40%;
197
+ }
198
+
199
+ .obfx-grid-container.obfx-grid-style-list .obfx-grid-col-content {
200
+ padding-left: 15px;
201
+ width: 60%;
202
+ }
203
+
204
+ .obfx-grid-container.obfx-grid-style-list .obfx-grid-col.obfx-no-image .obfx-grid-col-content {
205
+ padding-left: 0;
206
+ width: 100%;
207
+ }
208
+
209
+ .obfx-grid-pagination {
210
+ width: 100%;
211
+ }
212
+
213
+ .obfx-grid-desktop-1 .obfx-grid-wrapper {
214
+ width: 100%;
215
+ }
216
+
217
+ .obfx-grid-desktop-2 .obfx-grid-wrapper {
218
+ width: 50%;
219
+ }
220
+
221
+ .obfx-grid-desktop-3 .obfx-grid-wrapper {
222
+ width: 33.333%;
223
+ }
224
+
225
+ .obfx-grid-desktop-4 .obfx-grid-wrapper {
226
+ width: 25%;
227
+ }
228
+
229
+ .obfx-grid-desktop-5 .obfx-grid-wrapper {
230
+ width: 20%;
231
+ }
232
+
233
+ @media (max-width: 992px) {
234
+ .obfx-grid-tablet-1 .obfx-grid-wrapper {
235
+ width: 100%;
236
+ }
237
+
238
+ .obfx-grid-tablet-2 .obfx-grid-wrapper {
239
+ width: 50%;
240
+ }
241
+
242
+ .obfx-grid-tablet-3 .obfx-grid-wrapper {
243
+ width: 33.333%;
244
+ }
245
+
246
+ .obfx-grid-tablet-4 .obfx-grid-wrapper {
247
+ width: 25%;
248
+ }
249
+
250
+ .obfx-grid-tablet-5 .obfx-grid-wrapper {
251
+ width: 20%;
252
+ }
253
+ }
254
+
255
+ @media (max-width: 767px) {
256
+ .obfx-grid-mobile-1 .obfx-grid-wrapper {
257
+ width: 100%;
258
+ }
259
+
260
+ .obfx-grid-mobile-2 .obfx-grid-wrapper {
261
+ width: 50%;
262
+ }
263
+
264
+ .obfx-grid-mobile-3 .obfx-grid-wrapper {
265
+ width: 33.333%;
266
+ }
267
+
268
+ .obfx-grid-mobile-4 .obfx-grid-wrapper {
269
+ width: 25%;
270
+ }
271
+
272
+ .obfx-grid-mobile-5 .obfx-grid-wrapper {
273
+ width: 20%;
274
+ }
275
+ }
276
+ /* End Of Post Type Grid Base CSS */
277
+
278
+ .obfx-service-box {
279
+ display: flex;
280
+ }
281
+
282
+ .obfx-position-left .obfx-service-box {
283
+ flex-direction: row;
284
+ }
285
+ .obfx-position-right .obfx-service-box {
286
+ flex-direction: row-reverse;
287
+ }
288
+ .obfx-position-top .obfx-service-box {
289
+ flex-direction: column;
290
+ }
291
+ .obfx-service-box .obfx-service-box-content .obfx-service-title, .obfx-service-box .obfx-service-box-content .obfx-service-text {
292
+ margin: 0;
293
+ }
obfx_modules/elementor-widgets/init.php ADDED
@@ -0,0 +1,179 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Elementor Widgets Core Orbit Fox Module.
4
+ *
5
+ * @link https://themeisle.com
6
+ * @since 1.0.0
7
+ *
8
+ * @package Elementor_Widgets_OBFX_Module
9
+ */
10
+
11
+ define( 'OBFX_MODULE_URL', __FILE__ );
12
+
13
+ /**
14
+ * The class defines a new module to be used by Orbit Fox plugin.
15
+ *
16
+ * @package Elementor_Widgets_OBFX_Module
17
+ * @author Themeisle <friends@themeisle.com>
18
+ * @codeCoverageIgnore
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
+ *
36
+ * @since 1.0.0
37
+ * @access public
38
+ */
39
+ public function __construct() {
40
+ parent::__construct();
41
+ $this->name = __( 'Elementor Modules', 'themeisle-companion' );
42
+ $this->description = __( 'Adds new Elementor Widgets.', 'themeisle-companion' );
43
+ $this->active_default = true;
44
+ }
45
+
46
+ /**
47
+ * Check if Elementor exists.
48
+ *
49
+ * @return bool
50
+ */
51
+ private function has_elementor() {
52
+ if ( defined( 'ELEMENTOR_VERSION' ) ) {
53
+ return true;
54
+ }
55
+ return false;
56
+ }
57
+
58
+ /**
59
+ * Determine if module should be loaded.
60
+ *
61
+ * @since 1.0.0
62
+ * @access public
63
+ * @return bool
64
+ */
65
+ public function enable_module() {
66
+ if ( $this->has_elementor() ) {
67
+ return true;
68
+ }
69
+ return false;
70
+ }
71
+
72
+ /**
73
+ * The loading logic for the module.
74
+ *
75
+ * @since 1.0.0
76
+ * @access public
77
+ */
78
+ public function load() {
79
+ if ( $this->has_elementor() ) {
80
+ return true;
81
+ }
82
+ return false;
83
+ }
84
+
85
+ /**
86
+ * Method to define hooks needed.
87
+ *
88
+ * @since 1.0.0
89
+ * @access public
90
+ * @return mixed | array
91
+ */
92
+ public function hooks() {
93
+
94
+ $this->loader->add_action( 'elementor/init', $this, 'add_elementor_category' );
95
+ $this->loader->add_action( 'elementor/widgets/widgets_registered', $this, 'add_elementor_widgets' );
96
+ $this->loader->add_action( 'elementor/frontend/after_register_scripts', $this, 'enqueue_scripts' );
97
+
98
+ }
99
+
100
+ /**
101
+ * Method that returns an array of scripts and styles to be loaded
102
+ * for the front end part.
103
+ *
104
+ * @since 1.0.0
105
+ * @access public
106
+ * @return array
107
+ */
108
+ public function public_enqueue() {
109
+ return array(
110
+ 'css' => array(
111
+ 'public' => false,
112
+ ),
113
+ );
114
+ }
115
+
116
+ /**
117
+ * Method that returns an array of scripts and styles to be loaded
118
+ * for the admin part.
119
+ *
120
+ * @since 1.0.0
121
+ * @access public
122
+ * @return array
123
+ */
124
+ public function admin_enqueue() {
125
+ return array();
126
+ }
127
+
128
+ /**
129
+ * Method to define the options fields for the module
130
+ *
131
+ * @since 1.0.0
132
+ * @access public
133
+ * @return array
134
+ */
135
+ public function options() {
136
+ $options = array();
137
+
138
+ return $options;
139
+ }
140
+
141
+ /**
142
+ * Add the Category for Orbit Fox Widgets.
143
+ */
144
+ public function add_elementor_category() {
145
+ \Elementor\Plugin::instance()->elements_manager->add_category(
146
+ 'obfx-elementor-widgets',
147
+ array(
148
+ 'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
149
+ 'icon' => 'fa fa-plug',
150
+ ),
151
+ 1 );
152
+ }
153
+
154
+ /**
155
+ * Require and instantiate Elementor Widgets.
156
+ *
157
+ * @param $widgets_manager
158
+ */
159
+ public function add_elementor_widgets( $widgets_manager ) {
160
+ foreach ( $this->elementor_widgets as $widget ) {
161
+ require_once $this->get_dir() . '/widgets/' . $widget . '.php';
162
+ }
163
+
164
+ // Pricing table
165
+ $widget = new Elementor\OBFX_Elementor_Widget_Pricing_Table();
166
+ $widgets_manager->register_widget_type( $widget );
167
+ // Services
168
+ $widget = new Elementor\OBFX_Elementor_Widget_Services();
169
+ $widgets_manager->register_widget_type( $widget );
170
+ // Posts grid
171
+ $widget = new Elementor\OBFX_Elementor_Widget_Posts_Grid();
172
+ $widgets_manager->register_widget_type( $widget );
173
+ }
174
+
175
+ public function enqueue_scripts() {
176
+ // Add custom JS for grid.
177
+ wp_enqueue_script( 'obfx-grid-js', plugins_url ( 'js/obfx-grid.js', OBFX_MODULE_URL ), array(), '1.0', true );
178
+ }
179
+ }
obfx_modules/elementor-widgets/js/obfx-grid.js ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global elementor */
2
+ (function ($) {
3
+
4
+ $( document ).ready( function () {
5
+ checkImageSize();
6
+ } );
7
+
8
+
9
+ $( window ).resize( function () {
10
+ checkImageSize();
11
+ } );
12
+
13
+ if ( typeof elementor !== 'undefined' ) {
14
+ $( window ).on( 'elementor/frontend/init', function () {
15
+ elementor.hooks.addAction( 'panel/open_editor/widget/obfx-posts-grid', function ( panel ) {
16
+ var $element = panel.$el.find( '.elementor-control-section_grid_image' );
17
+ $element.click( function () {
18
+ panel.$el.find( '.elementor-control-grid_image_height .elementor-control-input-wrapper' ).mouseup( function () {
19
+ checkImageSize();
20
+ } );
21
+ } );
22
+ } );
23
+ } );
24
+ }
25
+
26
+ /**
27
+ * Check the container and image size.
28
+ */
29
+ function checkImageSize() {
30
+ $( '.obfx-grid .obfx-grid-col' ).each( function () {
31
+ var container = $( this ).find( '.obfx-grid-col-image' ),
32
+ containerWidth = $( this ).find( '.obfx-grid-col-image' ).width(),
33
+ containerHeight = $( this ).find( '.obfx-grid-col-image' ).height(),
34
+ imageWidth = $( this ).find( '.obfx-grid-col-image img' ).width(),
35
+ imageHeight = $( this ).find( '.obfx-grid-col-image img' ).height();
36
+
37
+ if ( $( this ).find( '.obfx-grid-col-image' ).length > 0 ) {
38
+
39
+ if ( containerHeight > imageHeight ) {
40
+ container.addClass( 'obfx-fit-height' );
41
+ }
42
+
43
+ if ( containerWidth > imageWidth && container.hasClass( 'obfx-fit-height' ) ) {
44
+ container.removeClass( 'obfx-fit-height' );
45
+ }
46
+ }
47
+ } );
48
+ }
49
+
50
+ })(jQuery);
obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-posts-grid.php ADDED
@@ -0,0 +1,1755 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ } // Exit if accessed directly
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.
26
+ *
27
+ * @return string
28
+ */
29
+ public function get_title() {
30
+ return __( 'Post Type Grid', 'themeisle-companion' );
31
+ }
32
+
33
+ /**
34
+ * Widget icon.
35
+ *
36
+ * @return string
37
+ */
38
+ public function get_icon() {
39
+ return 'eicon-posts-grid';
40
+ }
41
+
42
+ /**
43
+ * Widget name.
44
+ *
45
+ * @return string
46
+ */
47
+ public function get_name() {
48
+ return 'obfx-posts-grid';
49
+ }
50
+
51
+ /**
52
+ * Widget Category.
53
+ *
54
+ * @return array
55
+ */
56
+ public function get_categories() {
57
+ return [ 'obfx-elementor-widgets' ];
58
+ }
59
+
60
+ /**
61
+ * Get post types.
62
+ */
63
+ private function grid_get_all_post_types() {
64
+ $options = array();
65
+ $exclude = array( 'attachment', 'elementor_library' ); // excluded post types
66
+
67
+ $args = array(
68
+ 'public' => true,
69
+ );
70
+
71
+ foreach ( get_post_types( $args, 'objects' ) as $post_type ) {
72
+ // Check if post type name exists.
73
+ if ( ! isset( $post_type->name ) ) {
74
+ continue;
75
+ }
76
+
77
+ // Check if post type label exists.
78
+ if ( ! isset( $post_type->label ) ) {
79
+ continue;
80
+ }
81
+
82
+ // Check if post type is excluded.
83
+ if ( in_array( $post_type->name, $exclude ) === true ) {
84
+ continue;
85
+ }
86
+
87
+ $options[ $post_type->name ] = $post_type->label;
88
+ }
89
+
90
+ return $options;
91
+ }
92
+
93
+ /**
94
+ * Get post type categories.
95
+ */
96
+ private function grid_get_all_post_type_categories( $post_type ) {
97
+ $options = array();
98
+
99
+ if ( $post_type == 'post' ) {
100
+ $taxonomy = 'category';
101
+ } else {
102
+ $taxonomy = 'product_cat';
103
+ }
104
+
105
+ // Get categories for post type.
106
+ $terms = get_terms(
107
+ array(
108
+ 'taxonomy' => $taxonomy,
109
+ 'hide_empty' => false,
110
+ )
111
+ );
112
+
113
+ foreach ( $terms as $term ) {
114
+ $options[ $term->slug ] = $term->name;
115
+ }
116
+
117
+ return $options;
118
+ }
119
+
120
+ /**
121
+ * Register Elementor Controls.
122
+ */
123
+ protected function _register_controls() {
124
+ // Content.
125
+ $this->grid_options_section();
126
+ $this->grid_image_section();
127
+ $this->grid_title_section();
128
+ $this->grid_meta_section();
129
+ $this->grid_content_section();
130
+ $this->grid_pagination_section();
131
+ // Style.
132
+ $this->grid_options_style_section();
133
+ $this->grid_image_style_section();
134
+ $this->grid_title_style_section();
135
+ $this->grid_meta_style_section();
136
+ $this->grid_content_style_section();
137
+ $this->grid_pagination_style_section();
138
+ }
139
+
140
+ /**
141
+ * Content > Grid.
142
+ */
143
+ private function grid_options_section() {
144
+ $this->start_controls_section(
145
+ 'section_grid',
146
+ [
147
+ 'label' => __( 'Grid Options', 'themeisle-companion' ),
148
+ ]
149
+ );
150
+
151
+ // Post type.
152
+ $this->add_control(
153
+ 'grid_post_type',
154
+ [
155
+ 'type' => Controls_Manager::SELECT,
156
+ 'label' => '<i class="fa fa-tag"></i> ' . __( 'Post Type', 'themeisle-companion' ),
157
+ 'default' => 'post',
158
+ 'options' => $this->grid_get_all_post_types(),
159
+ ]
160
+ );
161
+
162
+ // Post categories.
163
+ $this->add_control(
164
+ 'grid_post_categories',
165
+ [
166
+ 'type' => Controls_Manager::SELECT,
167
+ 'label' => '<i class="fa fa-folder"></i> ' . __( 'Category', 'themeisle-companion' ),
168
+ 'options' => $this->grid_get_all_post_type_categories( 'post' ),
169
+ 'condition' => [
170
+ 'grid_post_type' => 'post',
171
+ ],
172
+ ]
173
+ );
174
+
175
+ // Product categories.
176
+ $this->add_control(
177
+ 'grid_product_categories',
178
+ [
179
+ 'type' => Controls_Manager::SELECT,
180
+ 'label' => '<i class="fa fa-tag"></i> ' . __( 'Category', 'themeisle-companion' ),
181
+ 'options' => $this->grid_get_all_post_type_categories( 'product' ),
182
+ 'condition' => [
183
+ 'grid_post_type' => 'product',
184
+ ],
185
+ ]
186
+ );
187
+
188
+ // Style.
189
+ $this->add_control(
190
+ 'grid_style',
191
+ [
192
+ 'type' => Controls_Manager::SELECT,
193
+ 'label' => '<i class="fa fa-paint-brush"></i> ' . __( 'Style', 'themeisle-companion' ),
194
+ 'default' => 'grid',
195
+ 'options' => [
196
+ 'grid' => __( 'Grid', 'themeisle-companion' ),
197
+ 'list' => __( 'List', 'themeisle-companion' ),
198
+ ],
199
+ ]
200
+ );
201
+
202
+ // Items.
203
+ $this->add_control(
204
+ 'grid_items',
205
+ [
206
+ 'type' => Controls_Manager::NUMBER,
207
+ 'label' => '<i class="fa fa-th-large"></i> ' . __( 'Items', 'themeisle-companion' ),
208
+ 'placeholder' => __( 'How many items?', 'themeisle-companion' ),
209
+ 'default' => 6,
210
+ ]
211
+ );
212
+
213
+ // Columns.
214
+ $this->add_responsive_control(
215
+ 'grid_columns',
216
+ [
217
+ 'type' => Controls_Manager::SELECT,
218
+ 'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
219
+ 'default' => 3,
220
+ 'tablet_default' => 2,
221
+ 'mobile_default' => 1,
222
+ 'options' => [
223
+ 1 => 1,
224
+ 2 => 2,
225
+ 3 => 3,
226
+ 4 => 4,
227
+ 5 => 5,
228
+ ],
229
+ ]
230
+ );
231
+
232
+ // Order by.
233
+ $this->add_control(
234
+ 'grid_order_by',
235
+ [
236
+ 'type' => Controls_Manager::SELECT,
237
+ 'label' => '<i class="fa fa-sort"></i> ' . __( 'Order by', 'themeisle-companion' ),
238
+ 'default' => 'date',
239
+ 'options' => [
240
+ 'date' => __( 'Date', 'themeisle-companion' ),
241
+ 'title' => __( 'Title', 'themeisle-companion' ),
242
+ 'modified' => __( 'Modified date', 'themeisle-companion' ),
243
+ 'comment_count' => __( 'Comment count', 'themeisle-companion' ),
244
+ 'rand' => __( 'Random', 'themeisle-companion' ),
245
+ ],
246
+ ]
247
+ );
248
+
249
+ // Display pagination.
250
+ $this->add_control(
251
+ 'grid_pagination',
252
+ [
253
+ 'label' => '<i class="fa fa-arrow-circle-right"></i> ' . __( 'Pagination', 'themeisle-companion' ),
254
+ 'type' => Controls_Manager::SWITCHER,
255
+ 'default' => '',
256
+ ]
257
+ );
258
+
259
+ $this->end_controls_section();
260
+ }
261
+
262
+ /**
263
+ * Content > Image Options.
264
+ */
265
+ private function grid_image_section() {
266
+ $this->start_controls_section(
267
+ 'section_grid_image',
268
+ [
269
+ 'label' => __( 'Image', 'themeisle-companion' ),
270
+ ]
271
+ );
272
+
273
+ // Hide image.
274
+ $this->add_control(
275
+ 'grid_image_hide',
276
+ [
277
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
278
+ 'type' => Controls_Manager::SWITCHER,
279
+ 'default' => '',
280
+ ]
281
+ );
282
+
283
+ // Image height.
284
+ $this->add_control(
285
+ 'grid_image_height',
286
+ [
287
+ 'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Image height', 'themeisle-companion' ),
288
+ 'type' => Controls_Manager::SLIDER,
289
+ 'default' => [
290
+ 'size' => 220,
291
+ ],
292
+ 'range' => [
293
+ 'px' => [
294
+ 'min' => 1,
295
+ 'max' => 1000,
296
+ 'step' => 1,
297
+ ],
298
+ ],
299
+ 'selectors' => [
300
+ '{{WRAPPER}} .obfx-grid-col-image' => 'height: {{SIZE}}{{UNIT}};',
301
+ ],
302
+ ]
303
+ );
304
+
305
+ // Image link.
306
+ $this->add_control(
307
+ 'grid_image_link',
308
+ [
309
+ 'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'themeisle-companion' ),
310
+ 'type' => Controls_Manager::SWITCHER,
311
+ 'default' => 'yes',
312
+ ]
313
+ );
314
+
315
+ $this->end_controls_section();
316
+ }
317
+
318
+ /**
319
+ * Content > Title Options.
320
+ */
321
+ private function grid_title_section() {
322
+ $this->start_controls_section(
323
+ 'section_grid_title',
324
+ [
325
+ 'label' => __( 'Title', 'themeisle-companion' ),
326
+ ]
327
+ );
328
+
329
+ // Hide title.
330
+ $this->add_control(
331
+ 'grid_title_hide',
332
+ [
333
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
334
+ 'type' => Controls_Manager::SWITCHER,
335
+ 'default' => '',
336
+ ]
337
+ );
338
+
339
+ // Title tag.
340
+ $this->add_control(
341
+ 'grid_title_tag',
342
+ [
343
+ 'type' => Controls_Manager::SELECT,
344
+ 'label' => '<i class="fa fa-code"></i> ' . __( 'Tag', 'themeisle-companion' ),
345
+ 'default' => 'h2',
346
+ 'options' => [
347
+ 'h1' => 'H1',
348
+ 'h2' => 'H2',
349
+ 'h3' => 'H3',
350
+ 'h4' => 'H4',
351
+ 'h5' => 'H5',
352
+ 'h6' => 'Hh6',
353
+ 'span' => 'span',
354
+ 'p' => 'p',
355
+ 'div' => 'div',
356
+ ],
357
+ ]
358
+ );
359
+
360
+ // Title link.
361
+ $this->add_control(
362
+ 'grid_title_link',
363
+ [
364
+ 'label' => '<i class="fa fa-link"></i> ' . __( 'Link', 'themeisle-companion' ),
365
+ 'type' => Controls_Manager::SWITCHER,
366
+ 'default' => 'yes',
367
+ ]
368
+ );
369
+
370
+ $this->end_controls_section();
371
+ }
372
+
373
+ /**
374
+ * Content > Meta Options.
375
+ */
376
+ private function grid_meta_section() {
377
+ $this->start_controls_section(
378
+ 'section_grid_meta',
379
+ [
380
+ 'label' => __( 'Meta', 'themeisle-companion' ),
381
+ ]
382
+ );
383
+
384
+ // Hide content.
385
+ $this->add_control(
386
+ 'grid_meta_hide',
387
+ [
388
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
389
+ 'type' => Controls_Manager::SWITCHER,
390
+ 'default' => '',
391
+ ]
392
+ );
393
+
394
+ // Meta.
395
+ $this->add_control(
396
+ 'grid_meta_display',
397
+ [
398
+ 'label' => '<i class="fa fa-info-circle"></i> ' . __( 'Display', 'themeisle-companion' ),
399
+ 'label_block' => true,
400
+ 'type' => Controls_Manager::SELECT2,
401
+ 'default' => [ 'author', 'date' ],
402
+ 'multiple' => true,
403
+ 'options' => [
404
+ 'author' => __( 'Author', 'themeisle-companion' ),
405
+ 'date' => __( 'Date', 'themeisle-companion' ),
406
+ 'category' => __( 'Category', 'themeisle-companion' ),
407
+ 'tags' => __( 'Tags', 'themeisle-companion' ),
408
+ 'comments' => __( 'Comments', 'themeisle-companion' ),
409
+ ],
410
+ ]
411
+ );
412
+
413
+ // No. of Categories.
414
+ $this->add_control(
415
+ 'grid_meta_categories_max',
416
+ [
417
+ 'type' => Controls_Manager::NUMBER,
418
+ 'label' => __( 'No. of Categories', 'themeisle-companion' ),
419
+ 'placeholder' => __( 'How many categories to display?', 'themeisle-companion' ),
420
+ 'default' => __( '1', 'themeisle-companion' ),
421
+ 'condition' => [
422
+ 'grid_meta_display' => 'category',
423
+ ],
424
+ ]
425
+ );
426
+
427
+ // No. of Tags.
428
+ $this->add_control(
429
+ 'grid_meta_tags_max',
430
+ [
431
+ 'type' => Controls_Manager::NUMBER,
432
+ 'label' => __( 'No. of Tags', 'themeisle-companion' ),
433
+ 'placeholder' => __( 'How many tags to display?', 'themeisle-companion' ),
434
+ 'condition' => [
435
+ 'grid_meta_display' => 'tags',
436
+ ],
437
+ ]
438
+ );
439
+
440
+ // Remove meta icons.
441
+ $this->add_control(
442
+ 'grid_meta_remove_icons',
443
+ [
444
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Remove icons', 'themeisle-companion' ),
445
+ 'type' => Controls_Manager::SWITCHER,
446
+ 'default' => '',
447
+ ]
448
+ );
449
+
450
+ $this->end_controls_section();
451
+ }
452
+
453
+ /**
454
+ * Content > Content Options.
455
+ */
456
+ private function grid_content_section() {
457
+ $this->start_controls_section(
458
+ 'section_grid_content',
459
+ [
460
+ 'label' => __( 'Content', 'themeisle-companion' ),
461
+ ]
462
+ );
463
+
464
+ // Hide content.
465
+ $this->add_control(
466
+ 'grid_content_hide',
467
+ [
468
+ 'label' => '<i class="fa fa-minus-circle"></i> ' . __( 'Hide', 'themeisle-companion' ),
469
+ 'type' => Controls_Manager::SWITCHER,
470
+ 'default' => '',
471
+ ]
472
+ );
473
+
474
+ // Length.
475
+ $this->add_control(
476
+ 'grid_content_length',
477
+ [
478
+ 'type' => Controls_Manager::NUMBER,
479
+ 'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Length (words)', 'themeisle-companion' ),
480
+ 'placeholder' => __( 'Length of content (words)', 'themeisle-companion' ),
481
+ 'default' => 30,
482
+ ]
483
+ );
484
+
485
+ // Price.
486
+ $this->add_control(
487
+ 'grid_content_price',
488
+ [
489
+ 'label' => '<i class="fa fa-usd"></i> ' . __( 'Price', 'themeisle-companion' ),
490
+ 'type' => Controls_Manager::SWITCHER,
491
+ 'default' => 'yes',
492
+ 'condition' => [
493
+ 'section_grid.grid_post_type' => 'product',
494
+ ],
495
+ ]
496
+ );
497
+
498
+ // Read more button hide.
499
+ $this->add_control(
500
+ 'grid_content_default_btn',
501
+ [
502
+ 'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'themeisle-companion' ),
503
+ 'type' => Controls_Manager::SWITCHER,
504
+ 'default' => 'yes',
505
+ 'condition' => [
506
+ 'section_grid.grid_post_type!' => 'product',
507
+ ],
508
+ ]
509
+ );
510
+
511
+ // Default button text.
512
+ $this->add_control(
513
+ 'grid_content_default_btn_text',
514
+ [
515
+ 'type' => Controls_Manager::TEXT,
516
+ 'label' => __( 'Button text', 'themeisle-companion' ),
517
+ 'placeholder' => __( 'Read more', 'themeisle-companion' ),
518
+ 'default' => __( 'Read more', 'themeisle-companion' ),
519
+ 'condition' => [
520
+ 'grid_content_default_btn!' => '',
521
+ 'section_grid.grid_post_type!' => 'product',
522
+ ],
523
+ ]
524
+ );
525
+
526
+ // Add to cart button hide.
527
+ $this->add_control(
528
+ 'grid_content_product_btn',
529
+ [
530
+ 'label' => '<i class="fa fa-check-square"></i> ' . __( 'Button', 'themeisle-companion' ),
531
+ 'type' => Controls_Manager::SWITCHER,
532
+ 'default' => 'yes',
533
+ 'condition' => [
534
+ 'section_grid.grid_post_type' => 'product',
535
+ ],
536
+ ]
537
+ );
538
+
539
+ // Button alignment.
540
+ $this->add_responsive_control(
541
+ 'grid_content_btn_alignment',
542
+ [
543
+ 'label' => __( 'Button alignment', 'themeisle-companion' ),
544
+ 'type' => Controls_Manager::CHOOSE,
545
+ 'options' => [
546
+ 'left' => [
547
+ 'title' => __( 'Left', 'themeisle-companion' ),
548
+ 'icon' => 'fa fa-align-left',
549
+ ],
550
+ 'center' => [
551
+ 'title' => __( 'Center', 'themeisle-companion' ),
552
+ 'icon' => 'fa fa-align-center',
553
+ ],
554
+ 'right' => [
555
+ 'title' => __( 'Right', 'themeisle-companion' ),
556
+ 'icon' => 'fa fa-align-right',
557
+ ],
558
+ 'justify' => [
559
+ 'title' => __( 'Justified', 'themeisle-companion' ),
560
+ 'icon' => 'fa fa-align-justify',
561
+ ],
562
+ ],
563
+ 'default' => 'left',
564
+ 'tablet_default' => 'left',
565
+ 'mobile_default' => 'center',
566
+ 'selectors' => [
567
+ '{{WRAPPER}} .obfx-grid-footer' => 'text-align: {{VALUE}};',
568
+ ],
569
+ 'condition' => [
570
+ 'grid_content_btn!' => '',
571
+ ],
572
+ ]
573
+ );
574
+
575
+ // Content alignment.
576
+ $this->add_responsive_control(
577
+ 'grid_content_alignment',
578
+ [
579
+ 'label' => '<i class="fa fa-align-right"></i> ' . __( 'Alignment', 'themeisle-companion' ),
580
+ 'type' => Controls_Manager::CHOOSE,
581
+ 'options' => [
582
+ 'left' => [
583
+ 'title' => __( 'Left', 'themeisle-companion' ),
584
+ 'icon' => 'fa fa-align-left',
585
+ ],
586
+ 'center' => [
587
+ 'title' => __( 'Center', 'themeisle-companion' ),
588
+ 'icon' => 'fa fa-align-center',
589
+ ],
590
+ 'right' => [
591
+ 'title' => __( 'Right', 'themeisle-companion' ),
592
+ 'icon' => 'fa fa-align-right',
593
+ ],
594
+ ],
595
+ 'default' => 'left',
596
+ 'tablet_default' => 'left',
597
+ 'mobile_default' => 'center',
598
+ 'selectors' => [
599
+ '{{WRAPPER}} .obfx-grid-col-content' => 'text-align: {{VALUE}};',
600
+ ],
601
+ ]
602
+ );
603
+
604
+ $this->end_controls_section();
605
+ }
606
+
607
+ /**
608
+ * Content > Pagination Options.
609
+ */
610
+ private function grid_pagination_section() {
611
+ $this->start_controls_section(
612
+ 'section_grid_pagination',
613
+ [
614
+ 'label' => __( 'Pagination', 'themeisle-companion' ),
615
+ 'condition' => [
616
+ 'section_grid.grid_pagination' => 'yes',
617
+ ],
618
+ ]
619
+ );
620
+
621
+ // Pagination alignment.
622
+ $this->add_responsive_control(
623
+ 'grid_pagination_alignment',
624
+ [
625
+ 'label' => __( 'Alignment', 'themeisle-companion' ),
626
+ 'type' => Controls_Manager::CHOOSE,
627
+ 'options' => [
628
+ 'left' => [
629
+ 'title' => __( 'Left', 'themeisle-companion' ),
630
+ 'icon' => 'fa fa-align-left',
631
+ ],
632
+ 'center' => [
633
+ 'title' => __( 'Center', 'themeisle-companion' ),
634
+ 'icon' => 'fa fa-align-center',
635
+ ],
636
+ 'right' => [
637
+ 'title' => __( 'Right', 'themeisle-companion' ),
638
+ 'icon' => 'fa fa-align-right',
639
+ ],
640
+ ],
641
+ 'default' => 'center',
642
+ 'tablet_default' => 'center',
643
+ 'mobile_default' => 'center',
644
+ 'selectors' => [
645
+ '{{WRAPPER}} .obfx-grid-pagination .pagination' => 'text-align: {{VALUE}};',
646
+ ],
647
+ ]
648
+ );
649
+
650
+ $this->end_controls_section();
651
+ }
652
+
653
+ /**
654
+ * Style > Grid options.
655
+ */
656
+ private function grid_options_style_section() {
657
+ // Tab.
658
+ $this->start_controls_section(
659
+ 'section_grid_style',
660
+ [
661
+ 'label' => __( 'Grid Options', 'themeisle-companion' ),
662
+ 'tab' => Controls_Manager::TAB_STYLE,
663
+ ]
664
+ );
665
+
666
+ // Columns margin.
667
+ $this->add_control(
668
+ 'grid_style_columns_margin',
669
+ [
670
+ 'label' => __( 'Columns margin', 'themeisle-companion' ),
671
+ 'type' => Controls_Manager::SLIDER,
672
+ 'default' => [
673
+ 'size' => 15,
674
+ ],
675
+ 'range' => [
676
+ 'px' => [
677
+ 'min' => 0,
678
+ 'max' => 100,
679
+ ],
680
+ ],
681
+ 'selectors' => [
682
+ '{{WRAPPER}} .obfx-grid-wrapper' => 'padding-right: calc( {{SIZE}}{{UNIT}} ); padding-left: calc( {{SIZE}}{{UNIT}} );',
683
+ '{{WRAPPER}} .obfx-grid-container' => 'margin-left: calc( -{{SIZE}}{{UNIT}} ); margin-right: calc( -{{SIZE}}{{UNIT}} );',
684
+ ],
685
+ ]
686
+ );
687
+
688
+ // Row margin.
689
+ $this->add_control(
690
+ 'grid_style_rows_margin',
691
+ [
692
+ 'label' => __( 'Rows margin', 'themeisle-companion' ),
693
+ 'type' => Controls_Manager::SLIDER,
694
+ 'default' => [
695
+ 'size' => 30,
696
+ ],
697
+ 'range' => [
698
+ 'px' => [
699
+ 'min' => 0,
700
+ 'max' => 100,
701
+ ],
702
+ ],
703
+ 'selectors' => [
704
+ '{{WRAPPER}} .obfx-grid-wrapper' => 'padding-bottom: {{SIZE}}{{UNIT}};',
705
+ ],
706
+ ]
707
+ );
708
+
709
+ // Background.
710
+ $this->add_group_control(
711
+ Group_Control_Background::get_type(),
712
+ [
713
+ 'name' => 'grid_style_background',
714
+ 'types' => [ 'classic', 'gradient' ],
715
+ 'selector' => '{{WRAPPER}} .obfx-grid',
716
+ ]
717
+ );
718
+
719
+ // Items options.
720
+ $this->add_control(
721
+ 'grid_items_style_heading',
722
+ [
723
+ 'label' => __( 'Items', 'themeisle-companion' ),
724
+ 'type' => Controls_Manager::HEADING,
725
+ 'separator' => 'before',
726
+ ]
727
+ );
728
+
729
+ // Items internal padding.
730
+ $this->add_control(
731
+ 'grid_items_style_padding',
732
+ [
733
+ 'label' => __( 'Padding', 'themeisle-companion' ),
734
+ 'type' => Controls_Manager::DIMENSIONS,
735
+ 'size_units' => [ 'px', '%' ],
736
+ 'selectors' => [
737
+ '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
738
+ ],
739
+ ]
740
+ );
741
+
742
+ // Items border radius.
743
+ $this->add_control(
744
+ 'grid_items_style_border_radius',
745
+ [
746
+ 'label' => __( 'Border Radius', 'themeisle-companion' ),
747
+ 'type' => Controls_Manager::DIMENSIONS,
748
+ 'size_units' => [ 'px', '%' ],
749
+ 'selectors' => [
750
+ '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
751
+ ],
752
+ ]
753
+ );
754
+
755
+ // Items box shadow.
756
+ $this->add_group_control(
757
+ Group_Control_Box_Shadow::get_type(),
758
+ [
759
+ 'name' => 'grid_items_style_box_shadow',
760
+ 'selector' => '{{WRAPPER}} .obfx-grid-col',
761
+ 'separator' => '',
762
+ ]
763
+ );
764
+
765
+ // Background for items options.
766
+ $this->add_group_control(
767
+ Group_Control_Background::get_type(),
768
+ [
769
+ 'name' => 'grid_items_style_background',
770
+ 'types' => [ 'classic', 'gradient' ],
771
+ 'selector' => '{{WRAPPER}} .obfx-grid-col',
772
+ ]
773
+ );
774
+
775
+ $this->end_controls_section();
776
+ }
777
+
778
+ /**
779
+ * Style > Image.
780
+ */
781
+ private function grid_image_style_section() {
782
+ // Tab.
783
+ $this->start_controls_section(
784
+ 'section_grid_image_style',
785
+ [
786
+ 'label' => __( 'Image', 'themeisle-companion' ),
787
+ 'tab' => Controls_Manager::TAB_STYLE,
788
+ 'condition' => [
789
+ 'section_grid_image.grid_image_hide' => '',
790
+ ],
791
+ ]
792
+ );
793
+
794
+ // Image border radius.
795
+ $this->add_control(
796
+ 'grid_image_style_border_radius',
797
+ [
798
+ 'label' => __( 'Border Radius', 'themeisle-companion' ),
799
+ 'type' => Controls_Manager::DIMENSIONS,
800
+ 'size_units' => [ 'px', '%' ],
801
+ 'selectors' => [
802
+ '{{WRAPPER}} .obfx-grid-col-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
803
+ ],
804
+ 'condition' => [
805
+ 'section_grid_image.grid_image_hide' => '',
806
+ ],
807
+ ]
808
+ );
809
+
810
+ // Image box shadow.
811
+ $this->add_group_control(
812
+ Group_Control_Box_Shadow::get_type(),
813
+ [
814
+ 'name' => 'grid_image_style_box_shadow',
815
+ 'selector' => '{{WRAPPER}} .obfx-grid-col-image',
816
+ 'separator' => '',
817
+ 'condition' => [
818
+ 'section_grid_image.grid_image_hide' => '',
819
+ ],
820
+ ]
821
+ );
822
+
823
+ // Image margin.
824
+ $this->add_control(
825
+ 'grid_image_style_margin',
826
+ [
827
+ 'label' => __( 'Margin', 'themeisle-companion' ),
828
+ 'type' => Controls_Manager::DIMENSIONS,
829
+ 'size_units' => [ 'px' ],
830
+ 'selectors' => [
831
+ '{{WRAPPER}} .obfx-grid-col-image' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
832
+ ],
833
+ 'condition' => [
834
+ 'section_grid_image.grid_image_hide' => '',
835
+ ],
836
+ ]
837
+ );
838
+
839
+ $this->end_controls_section();
840
+ }
841
+
842
+ /**
843
+ * Style > Title.
844
+ */
845
+ private function grid_title_style_section() {
846
+ // Tab.
847
+ $this->start_controls_section(
848
+ 'section_grid_title_style',
849
+ [
850
+ 'label' => __( 'Title', 'themeisle-companion' ),
851
+ 'tab' => Controls_Manager::TAB_STYLE,
852
+ 'condition' => [
853
+ 'section_grid_title.grid_title_hide' => '',
854
+ ],
855
+ ]
856
+ );
857
+
858
+ // Title typography.
859
+ $this->add_group_control(
860
+ Group_Control_Typography::get_type(),
861
+ [
862
+ 'name' => 'grid_title_style_typography',
863
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
864
+ 'selector' => '{{WRAPPER}} .obfx-grid-title',
865
+ ]
866
+ );
867
+
868
+ // Title color.
869
+ $this->add_control(
870
+ 'grid_title_style_color',
871
+ [
872
+ 'type' => Controls_Manager::COLOR,
873
+ 'label' => __( 'Color', 'themeisle-companion' ),
874
+ 'scheme' => [
875
+ 'type' => Scheme_Color::get_type(),
876
+ 'value' => Scheme_Color::COLOR_1,
877
+ ],
878
+ 'selectors' => [
879
+ '{{WRAPPER}} .obfx-grid-title' => 'color: {{VALUE}};',
880
+ '{{WRAPPER}} .obfx-grid-title a' => 'color: {{VALUE}};',
881
+ ],
882
+ ]
883
+ );
884
+
885
+ // Title margin.
886
+ $this->add_control(
887
+ 'grid_title_style_margin',
888
+ [
889
+ 'label' => __( 'Margin', 'themeisle-companion' ),
890
+ 'type' => Controls_Manager::DIMENSIONS,
891
+ 'size_units' => [ 'px' ],
892
+ 'selectors' => [
893
+ '{{WRAPPER}} .obfx-grid-title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
894
+ ],
895
+ ]
896
+ );
897
+
898
+ $this->end_controls_section();
899
+ }
900
+
901
+ /**
902
+ * Style > Meta.
903
+ */
904
+ private function grid_meta_style_section() {
905
+ // Tab.
906
+ $this->start_controls_section(
907
+ 'section_grid_meta_style',
908
+ [
909
+ 'label' => __( 'Meta', 'themeisle-companion' ),
910
+ 'tab' => Controls_Manager::TAB_STYLE,
911
+ 'condition' => [
912
+ 'section_grid_meta.grid_meta_hide' => '',
913
+ ],
914
+ ]
915
+ );
916
+
917
+ // Meta typography.
918
+ $this->add_group_control(
919
+ Group_Control_Typography::get_type(),
920
+ [
921
+ 'name' => 'grid_meta_style_typography',
922
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
923
+ 'selector' => '{{WRAPPER}} .obfx-grid-meta',
924
+ ]
925
+ );
926
+
927
+ // Meta color.
928
+ $this->add_control(
929
+ 'grid_meta_style_color',
930
+ [
931
+ 'type' => Controls_Manager::COLOR,
932
+ 'label' => __( 'Color', 'themeisle-companion' ),
933
+ 'scheme' => [
934
+ 'type' => Scheme_Color::get_type(),
935
+ 'value' => Scheme_Color::COLOR_1,
936
+ ],
937
+ 'selectors' => [
938
+ '{{WRAPPER}} .obfx-grid-meta' => 'color: {{VALUE}};',
939
+ '{{WRAPPER}} .obfx-grid-meta span' => 'color: {{VALUE}};',
940
+ '{{WRAPPER}} .obfx-grid-meta a' => 'color: {{VALUE}};',
941
+ ],
942
+ ]
943
+ );
944
+
945
+ // Meta margin.
946
+ $this->add_control(
947
+ 'grid_meta_style_margin',
948
+ [
949
+ 'label' => __( 'Margin', 'themeisle-companion' ),
950
+ 'type' => Controls_Manager::DIMENSIONS,
951
+ 'size_units' => [ 'px' ],
952
+ 'selectors' => [
953
+ '{{WRAPPER}} .obfx-grid-meta' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
954
+ ],
955
+ ]
956
+ );
957
+
958
+ $this->end_controls_section();
959
+ }
960
+
961
+ /**
962
+ * Style > Content.
963
+ */
964
+ private function grid_content_style_section() {
965
+ // Tab.
966
+ $this->start_controls_section(
967
+ 'section_grid_content_style',
968
+ [
969
+ 'label' => __( 'Content', 'themeisle-companion' ),
970
+ 'tab' => Controls_Manager::TAB_STYLE,
971
+ ]
972
+ );
973
+
974
+ // Content typography.
975
+ $this->add_group_control(
976
+ Group_Control_Typography::get_type(),
977
+ [
978
+ 'name' => 'grid_content_style_typography',
979
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
980
+ 'selector' => '{{WRAPPER}} .obfx-grid-content',
981
+ 'condition' => [
982
+ 'section_grid_content.grid_content_hide' => '',
983
+ ],
984
+ ]
985
+ );
986
+
987
+ // Content color.
988
+ $this->add_control(
989
+ 'grid_content_style_color',
990
+ [
991
+ 'type' => Controls_Manager::COLOR,
992
+ 'label' => __( 'Color', 'themeisle-companion' ),
993
+ 'scheme' => [
994
+ 'type' => Scheme_Color::get_type(),
995
+ 'value' => Scheme_Color::COLOR_1,
996
+ ],
997
+ 'selectors' => [
998
+ '{{WRAPPER}} .obfx-grid-content' => 'color: {{VALUE}};',
999
+ ],
1000
+ 'condition' => [
1001
+ 'section_grid_content.grid_content_hide' => '',
1002
+ ],
1003
+ ]
1004
+ );
1005
+
1006
+ // Content margin
1007
+ $this->add_control(
1008
+ 'grid_content_style_margin',
1009
+ [
1010
+ 'label' => __( 'Margin', 'themeisle-companion' ),
1011
+ 'type' => Controls_Manager::DIMENSIONS,
1012
+ 'size_units' => [ 'px' ],
1013
+ 'selectors' => [
1014
+ '{{WRAPPER}} .obfx-grid-content' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1015
+ ],
1016
+ 'condition' => [
1017
+ 'section_grid_content.grid_content_hide' => '',
1018
+ ],
1019
+ ]
1020
+ );
1021
+
1022
+ // Heading for price options.
1023
+ $this->add_control(
1024
+ 'grid_content_price_style_heading',
1025
+ [
1026
+ 'label' => __( 'Price', 'themeisle-companion' ),
1027
+ 'type' => Controls_Manager::HEADING,
1028
+ 'separator' => 'before',
1029
+ 'condition' => [
1030
+ 'section_grid_content.grid_content_price' => 'yes',
1031
+ 'section_grid.grid_post_type' => 'product',
1032
+ ],
1033
+ ]
1034
+ );
1035
+
1036
+ // Price typography.
1037
+ $this->add_group_control(
1038
+ Group_Control_Typography::get_type(),
1039
+ [
1040
+ 'name' => 'grid_content_price_style_typography',
1041
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1042
+ 'selector' => '{{WRAPPER}} .obfx-grid-price',
1043
+ 'condition' => [
1044
+ 'section_grid_content.grid_content_price' => 'yes',
1045
+ 'section_grid.grid_post_type' => 'product',
1046
+ ],
1047
+ ]
1048
+ );
1049
+
1050
+ // Price color.
1051
+ $this->add_control(
1052
+ 'grid_content_price_style_color',
1053
+ [
1054
+ 'type' => Controls_Manager::COLOR,
1055
+ 'label' => __( 'Color', 'themeisle-companion' ),
1056
+ 'scheme' => [
1057
+ 'type' => Scheme_Color::get_type(),
1058
+ 'value' => Scheme_Color::COLOR_1,
1059
+ ],
1060
+ 'selectors' => [
1061
+ '{{WRAPPER}} .obfx-grid-price' => 'color: {{VALUE}};',
1062
+ ],
1063
+ 'condition' => [
1064
+ 'section_grid_content.grid_content_price' => 'yes',
1065
+ 'section_grid.grid_post_type' => 'product',
1066
+ ],
1067
+ ]
1068
+ );
1069
+
1070
+ // Price bottom margin.
1071
+ $this->add_control(
1072
+ 'grid_content_price_style_margin',
1073
+ [
1074
+ 'label' => __( 'Margin', 'themeisle-companion' ),
1075
+ 'type' => Controls_Manager::DIMENSIONS,
1076
+ 'size_units' => [ 'px' ],
1077
+ 'selectors' => [
1078
+ '{{WRAPPER}} .obfx-grid-price' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1079
+ ],
1080
+ 'condition' => [
1081
+ 'section_grid_content.grid_content_price' => 'yes',
1082
+ 'section_grid.grid_post_type' => 'product',
1083
+ ],
1084
+ ]
1085
+ );
1086
+
1087
+ // Buttons options.
1088
+ $this->grid_content_style_button();
1089
+
1090
+ $this->end_controls_section();
1091
+ }
1092
+
1093
+ /**
1094
+ * Tabs for the Style > Button section.
1095
+ */
1096
+ private function grid_content_style_button() {
1097
+ // Heading for button options.
1098
+ $this->add_control(
1099
+ 'grid_button_style_heading',
1100
+ [
1101
+ 'label' => __( 'Button', 'themeisle-companion' ),
1102
+ 'type' => Controls_Manager::HEADING,
1103
+ 'separator' => 'before',
1104
+ 'condition' => [
1105
+ 'section_grid_content.grid_content_default_btn!' => '',
1106
+ 'section_grid_content.grid_content_product_btn!' => '',
1107
+ ],
1108
+ ]
1109
+ );
1110
+
1111
+ // Content typography.
1112
+ $this->add_group_control(
1113
+ Group_Control_Typography::get_type(),
1114
+ [
1115
+ 'name' => 'grid_button_style_typography',
1116
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1117
+ 'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1118
+ 'condition' => [
1119
+ 'section_grid_content.grid_content_default_btn!' => '',
1120
+ 'section_grid_content.grid_content_product_btn!' => '',
1121
+ ],
1122
+ ]
1123
+ );
1124
+
1125
+ $this->start_controls_tabs( 'grid_button_style' );
1126
+
1127
+ // Normal tab.
1128
+ $this->start_controls_tab(
1129
+ 'grid_button_style_normal',
1130
+ [
1131
+ 'label' => __( 'Normal', 'themeisle-companion' ),
1132
+ 'condition' => [
1133
+ 'section_grid_content.grid_content_default_btn!' => '',
1134
+ 'section_grid_content.grid_content_product_btn!' => '',
1135
+ ],
1136
+ ]
1137
+ );
1138
+
1139
+ // Normal text color.
1140
+ $this->add_control(
1141
+ 'grid_button_style_normal_text_color',
1142
+ [
1143
+ 'type' => Controls_Manager::COLOR,
1144
+ 'label' => __( 'Text Color', 'themeisle-companion' ),
1145
+ 'scheme' => [
1146
+ 'type' => Scheme_Color::get_type(),
1147
+ 'value' => Scheme_Color::COLOR_1,
1148
+ ],
1149
+ 'separator' => '',
1150
+ 'selectors' => [
1151
+ '{{WRAPPER}} .obfx-grid-footer a' => 'color: {{VALUE}};',
1152
+ ],
1153
+ 'condition' => [
1154
+ 'section_grid_content.grid_content_default_btn!' => '',
1155
+ 'section_grid_content.grid_content_product_btn!' => '',
1156
+ ],
1157
+ ]
1158
+ );
1159
+
1160
+ // Normal background color.
1161
+ $this->add_control(
1162
+ 'grid_button_style_normal_bg_color',
1163
+ [
1164
+ 'type' => Controls_Manager::COLOR,
1165
+ 'label' => __( 'Background Color', 'themeisle-companion' ),
1166
+ 'scheme' => [
1167
+ 'type' => Scheme_Color::get_type(),
1168
+ 'value' => Scheme_Color::COLOR_1,
1169
+ ],
1170
+ 'separator' => '',
1171
+ 'selectors' => [
1172
+ '{{WRAPPER}} .obfx-grid-footer a' => 'background-color: {{VALUE}};',
1173
+ ],
1174
+ 'condition' => [
1175
+ 'section_grid_content.grid_content_default_btn!' => '',
1176
+ 'section_grid_content.grid_content_product_btn!' => '',
1177
+ ],
1178
+ ]
1179
+ );
1180
+
1181
+ // Normal box shadow.
1182
+ $this->add_group_control(
1183
+ Group_Control_Box_Shadow::get_type(),
1184
+ [
1185
+ 'name' => 'grid_button_style_normal_box_shadow',
1186
+ 'selector' => '{{WRAPPER}} .obfx-grid-footer a',
1187
+ 'separator' => '',
1188
+ 'condition' => [
1189
+ 'section_grid_content.grid_content_default_btn!' => '',
1190
+ 'section_grid_content.grid_content_product_btn!' => '',
1191
+ ],
1192
+ ]
1193
+ );
1194
+
1195
+ $this->end_controls_tab();
1196
+
1197
+ // Hover tab.
1198
+ $this->start_controls_tab(
1199
+ 'grid_button_style_hover',
1200
+ [
1201
+ 'label' => __( 'Hover', 'themeisle-companion' ),
1202
+ 'condition' => [
1203
+ 'section_grid_content.grid_content_default_btn!' => '',
1204
+ 'section_grid_content.grid_content_product_btn!' => '',
1205
+ ],
1206
+ ]
1207
+ );
1208
+
1209
+ // Hover text color.
1210
+ $this->add_control(
1211
+ 'grid_button_style_hover_text_color',
1212
+ [
1213
+ 'type' => Controls_Manager::COLOR,
1214
+ 'label' => __( 'Text Color', 'themeisle-companion' ),
1215
+ 'scheme' => [
1216
+ 'type' => Scheme_Color::get_type(),
1217
+ 'value' => Scheme_Color::COLOR_1,
1218
+ ],
1219
+ 'separator' => '',
1220
+ 'selectors' => [
1221
+ '{{WRAPPER}} .obfx-grid-footer a:hover' => 'color: {{VALUE}};',
1222
+ ],
1223
+ 'condition' => [
1224
+ 'section_grid_content.grid_content_default_btn!' => '',
1225
+ 'section_grid_content.grid_content_product_btn!' => '',
1226
+ ],
1227
+ ]
1228
+ );
1229
+
1230
+ // Hover background color.
1231
+ $this->add_control(
1232
+ 'grid_button_style_hover_bg_color',
1233
+ [
1234
+ 'type' => Controls_Manager::COLOR,
1235
+ 'label' => __( 'Background Color', 'themeisle-companion' ),
1236
+ 'scheme' => [
1237
+ 'type' => Scheme_Color::get_type(),
1238
+ 'value' => Scheme_Color::COLOR_1,
1239
+ ],
1240
+ 'separator' => '',
1241
+ 'selectors' => [
1242
+ '{{WRAPPER}} .obfx-grid-footer a:hover' => 'background-color: {{VALUE}};',
1243
+ ],
1244
+ 'condition' => [
1245
+ 'section_grid_content.grid_content_default_btn!' => '',
1246
+ 'section_grid_content.grid_content_product_btn!' => '',
1247
+ ],
1248
+ ]
1249
+ );
1250
+
1251
+ // Hover box shadow.
1252
+ $this->add_group_control(
1253
+ Group_Control_Box_Shadow::get_type(),
1254
+ [
1255
+ 'name' => 'grid_button_style_hover_box_shadow',
1256
+ 'selector' => '{{WRAPPER}} .obfx-grid-footer a:hover',
1257
+ 'separator' => '',
1258
+ 'condition' => [
1259
+ 'section_grid_content.grid_content_default_btn!' => '',
1260
+ 'section_grid_content.grid_content_product_btn!' => '',
1261
+ ],
1262
+ ]
1263
+ );
1264
+
1265
+ $this->end_controls_tab();
1266
+
1267
+ $this->end_controls_tabs();
1268
+
1269
+ // Button padding.
1270
+ $this->add_control(
1271
+ 'grid_button_style_padding',
1272
+ [
1273
+ 'label' => __( 'Button padding', 'themeisle-companion' ),
1274
+ 'type' => Controls_Manager::DIMENSIONS,
1275
+ 'size_units' => [ 'px' ],
1276
+ 'selectors' => [
1277
+ '{{WRAPPER}} .obfx-grid-footer a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1278
+ ],
1279
+ 'condition' => [
1280
+ 'section_grid_content.grid_content_default_btn!' => '',
1281
+ 'section_grid_content.grid_content_product_btn!' => '',
1282
+ ],
1283
+ ]
1284
+ );
1285
+
1286
+ // Button border radius.
1287
+ $this->add_control(
1288
+ 'grid_button_style_border_radius',
1289
+ [
1290
+ 'label' => __( 'Button border radius', 'themeisle-companion' ),
1291
+ 'type' => Controls_Manager::DIMENSIONS,
1292
+ 'size_units' => [ 'px', '%' ],
1293
+ 'selectors' => [
1294
+ '{{WRAPPER}} .obfx-grid-footer a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1295
+ ],
1296
+ 'condition' => [
1297
+ 'section_grid_content.grid_content_default_btn!' => '',
1298
+ 'section_grid_content.grid_content_product_btn!' => '',
1299
+ ],
1300
+ ]
1301
+ );
1302
+ }
1303
+
1304
+ /**
1305
+ * Style > Pagination.
1306
+ */
1307
+ private function grid_pagination_style_section() {
1308
+ // Tab.
1309
+ $this->start_controls_section(
1310
+ 'section_grid_pagination_style',
1311
+ [
1312
+ 'label' => __( 'Pagination', 'themeisle-companion' ),
1313
+ 'tab' => Controls_Manager::TAB_STYLE,
1314
+ 'condition' => [
1315
+ 'section_grid.grid_pagination' => 'yes',
1316
+ ],
1317
+ ]
1318
+ );
1319
+
1320
+ // Image margin.
1321
+ $this->add_control(
1322
+ 'grid_pagination_style_margin',
1323
+ [
1324
+ 'label' => __( 'Margin', 'themeisle-companion' ),
1325
+ 'type' => Controls_Manager::DIMENSIONS,
1326
+ 'size_units' => [ 'px' ],
1327
+ 'selectors' => [
1328
+ '{{WRAPPER}} .obfx-grid-pagination .pagination' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1329
+ ],
1330
+ ]
1331
+ );
1332
+
1333
+ $this->end_controls_section();
1334
+ }
1335
+
1336
+ /**
1337
+ * Display categories in meta section.
1338
+ */
1339
+ protected function metaGridCategories() {
1340
+ $settings = $this->get_settings();
1341
+ $post_type_category = get_the_category();
1342
+ $maxCategories = $settings['grid_meta_categories_max'] ? $settings['grid_meta_categories_max'] : '-1';
1343
+ $i = 0; // counter
1344
+
1345
+ if ( $post_type_category ) { ?>
1346
+ <span class="obfx-grid-categories">
1347
+ <?php
1348
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-bookmark"></i>' : '';
1349
+
1350
+ foreach ( $post_type_category as $category ) {
1351
+ if ( $i == $maxCategories ) {
1352
+ break;
1353
+ }
1354
+ ?>
1355
+ <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>
1356
+ <?php
1357
+ $i++;
1358
+ }
1359
+ ?>
1360
+ </span>
1361
+ <?php
1362
+ }
1363
+ }
1364
+
1365
+ /**
1366
+ * Display tags in meta section.
1367
+ */
1368
+ protected function metaGridTags() {
1369
+ $settings = $this->get_settings();
1370
+ $post_type_tags = get_the_tags();
1371
+ $maxTags = $settings['grid_meta_tags_max'] ? $settings['grid_meta_tags_max'] : '-1';
1372
+ $i = 0; // counter
1373
+
1374
+ if ( $post_type_tags ) {
1375
+ ?>
1376
+ <span class="obfx-grid-tags">
1377
+ <?php
1378
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-tags"></i>' : '';
1379
+
1380
+ foreach ( $post_type_tags as $tag ) {
1381
+ if ( $i == $maxTags ) {
1382
+ break;
1383
+ }
1384
+ ?>
1385
+ <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>
1386
+ <?php
1387
+ $i++;
1388
+ }
1389
+ ?>
1390
+ </span>
1391
+ <?php
1392
+ }
1393
+ }
1394
+
1395
+ /**
1396
+ * Render image of post type.
1397
+ */
1398
+ protected function renderImage() {
1399
+ $settings = $this->get_settings();
1400
+
1401
+ // Only in editor.
1402
+ if ( $settings['grid_image_hide'] !== 'yes' ) {
1403
+ // Check if post type has featured image.
1404
+ if ( has_post_thumbnail() ) {
1405
+
1406
+ if ( $settings['grid_image_link'] == 'yes' ) {
1407
+ ?>
1408
+ <div class="obfx-grid-col-image">
1409
+ <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
1410
+ <?php
1411
+ the_post_thumbnail(
1412
+ 'full', array(
1413
+ 'class' => 'img-responsive',
1414
+ 'alt' => get_the_title( get_post_thumbnail_id() ),
1415
+ )
1416
+ );
1417
+ ?>
1418
+ </a>
1419
+ </div>
1420
+ <?php } else { ?>
1421
+ <div class="obfx-grid-col-image">
1422
+ <?php
1423
+ the_post_thumbnail(
1424
+ 'full', array(
1425
+ 'class' => 'img-responsive',
1426
+ 'alt' => get_the_title( get_post_thumbnail_id() ),
1427
+ )
1428
+ );
1429
+ ?>
1430
+ </div>
1431
+ <?php
1432
+ }
1433
+ }
1434
+ }
1435
+ }
1436
+
1437
+ /**
1438
+ * Render title of post type.
1439
+ */
1440
+ protected function renderTitle() {
1441
+ $settings = $this->get_settings();
1442
+
1443
+ if ( $settings['grid_title_hide'] !== 'yes' ) {
1444
+ ?>
1445
+ <<?php echo $settings['grid_title_tag']; ?> class="entry-title obfx-grid-title">
1446
+ <?php if ( $settings['grid_title_link'] == 'yes' ) { ?>
1447
+ <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
1448
+ <?php
1449
+ the_title();
1450
+ ?>
1451
+ </a>
1452
+ <?php
1453
+ } else {
1454
+ the_title();
1455
+ }
1456
+ ?>
1457
+ </<?php echo $settings['grid_title_tag']; ?>>
1458
+ <?php
1459
+ }
1460
+ }
1461
+
1462
+ /**
1463
+ * Render meta of post type.
1464
+ */
1465
+ protected function renderMeta() {
1466
+ $settings = $this->get_settings();
1467
+
1468
+ if ( $settings['grid_meta_hide'] !== 'yes' ) {
1469
+ if ( ! empty( $settings['grid_meta_display'] ) ) {
1470
+ ?>
1471
+ <div class="entry-meta obfx-grid-meta">
1472
+
1473
+ <?php
1474
+ foreach ( $settings['grid_meta_display'] as $meta ) {
1475
+
1476
+ switch ( $meta ) :
1477
+ // Author
1478
+ case 'author':
1479
+ ?>
1480
+ <span class="obfx-grid-author">
1481
+ <?php
1482
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-user"></i>' : '';
1483
+
1484
+ echo get_the_author();
1485
+ ?>
1486
+ </span>
1487
+ <?php
1488
+ // Date
1489
+ break; case 'date':
1490
+ ?>
1491
+ <span class="obfx-grid-date">
1492
+ <?php
1493
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-calendar"></i>' : '';
1494
+
1495
+ echo get_the_date();
1496
+ ?>
1497
+ </span>
1498
+ <?php
1499
+ // Category
1500
+ break; case 'category':
1501
+ $this->metaGridCategories();
1502
+
1503
+ // Tags
1504
+ break; case 'tags':
1505
+ $this->metaGridTags();
1506
+
1507
+ // Comments/Reviews
1508
+ break; case 'comments':
1509
+ ?>
1510
+ <span class="obfx-grid-comments">
1511
+ <?php
1512
+ echo ( $settings['grid_meta_remove_icons'] == '' ) ? '<i class="fa fa-comment"></i>' : '';
1513
+
1514
+ if ( $settings['grid_post_type'] == 'product' ) {
1515
+ echo comments_number( __( 'No reviews', 'themeisle-companion' ), __( '1 review', 'themeisle-companion' ), __( '% reviews', 'themeisle-companion' ) );
1516
+ } else {
1517
+ echo comments_number( __( 'No comments', 'themeisle-companion' ), __( '1 comment', 'themeisle-companion' ), __( '% comments', 'themeisle-companion' ) );
1518
+ }
1519
+ ?>
1520
+ </span>
1521
+ <?php
1522
+ break;
1523
+ endswitch;
1524
+ } // end foreach
1525
+ ?>
1526
+
1527
+ </div>
1528
+ <?php
1529
+ }
1530
+ }
1531
+ }
1532
+
1533
+ /**
1534
+ * Display price if post type is product.
1535
+ */
1536
+ protected function renderPrice() {
1537
+ $settings = $this->get_settings();
1538
+ $product = wc_get_product( get_the_ID() );
1539
+
1540
+ if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_price'] == 'yes' ) {
1541
+ ?>
1542
+ <div class="obfx-grid-price">
1543
+ <?php
1544
+ $price = $product->get_price_html();
1545
+ if ( ! empty( $price ) ) {
1546
+ echo wp_kses(
1547
+ $price, array(
1548
+ 'span' => array(
1549
+ 'class' => array(),
1550
+ ),
1551
+ 'del' => array(),
1552
+ )
1553
+ );
1554
+ }
1555
+ ?>
1556
+ </div>
1557
+ <?php
1558
+ }
1559
+ }
1560
+
1561
+ /**
1562
+ * Display Add to Cart button.
1563
+ */
1564
+ protected function renderAddToCart() {
1565
+ $product = wc_get_product( get_the_ID() );
1566
+
1567
+ echo apply_filters(
1568
+ 'woocommerce_loop_add_to_cart_link',
1569
+ sprintf(
1570
+ '<a href="%s" title="%s" rel="nofollow">%s</a>',
1571
+ esc_url( $product->add_to_cart_url() ),
1572
+ esc_attr( $product->add_to_cart_text() ),
1573
+ esc_html( $product->add_to_cart_text() )
1574
+ ), $product
1575
+ );
1576
+ }
1577
+
1578
+ /**
1579
+ * Render content of post type.
1580
+ */
1581
+ protected function renderContent() {
1582
+ $settings = $this->get_settings();
1583
+
1584
+ if ( $settings['grid_content_hide'] !== 'yes' ) {
1585
+ ?>
1586
+ <div class="entry-content obfx-grid-content">
1587
+ <?php
1588
+ if ( empty( $settings['grid_content_length'] ) ) {
1589
+ the_excerpt();
1590
+ } else {
1591
+ echo wp_trim_words( get_the_excerpt(), $settings['grid_content_length'] );
1592
+ }
1593
+ ?>
1594
+ </div>
1595
+ <?php
1596
+ }
1597
+ }
1598
+
1599
+ /**
1600
+ * Render button of post type.
1601
+ */
1602
+ protected function renderButton() {
1603
+ $settings = $this->get_settings();
1604
+
1605
+ if ( $settings['grid_post_type'] == 'product' && $settings['grid_content_product_btn'] == 'yes' ) {
1606
+ ?>
1607
+ <div class="obfx-grid-footer">
1608
+ <?php $this->renderAddToCart(); ?>
1609
+ </div>
1610
+ <?php } elseif ( $settings['grid_content_default_btn'] == 'yes' && ! empty( $settings['grid_content_default_btn_text'] ) ) { ?>
1611
+ <div class="obfx-grid-footer">
1612
+ <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>
1613
+ </div>
1614
+ <?php
1615
+ }
1616
+ }
1617
+
1618
+ /**
1619
+ * Render function to output the post type grid.
1620
+ */
1621
+ protected function render() {
1622
+ // Get settings.
1623
+ $settings = $this->get_settings();
1624
+
1625
+ // Output.
1626
+ echo '<div class="obfx-grid">';
1627
+ 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'] : '' ) . '">';
1628
+
1629
+ // Arguments for query.
1630
+ $args = array();
1631
+
1632
+ // Display only published posts.
1633
+ $args['post_status'] = 'publish';
1634
+
1635
+ // Ignore sticky posts.
1636
+ $args['ignore_sticky_posts'] = 1;
1637
+
1638
+ // Check if post type exists.
1639
+ if ( ! empty( $settings['grid_post_type'] ) && post_type_exists( $settings['grid_post_type'] ) ) {
1640
+ $args['post_type'] = $settings['grid_post_type'];
1641
+ }
1642
+
1643
+ // Display posts in category.
1644
+ if ( ! empty( $settings['grid_post_categories'] ) && $settings['grid_post_type'] == 'post' ) {
1645
+ $args['category_name'] = $settings['grid_post_categories'];
1646
+ }
1647
+
1648
+ // Display products in category.
1649
+ if ( ! empty( $settings['grid_product_categories'] ) && $settings['grid_post_type'] == 'product' ) {
1650
+ $args['tax_query'] = array(
1651
+ 'relation' => 'AND',
1652
+ array(
1653
+ 'taxonomy' => 'product_cat',
1654
+ 'field' => 'slug',
1655
+ 'terms' => $settings['grid_product_categories'],
1656
+ ),
1657
+ );
1658
+ }
1659
+
1660
+ // Items to display.
1661
+ if ( ! empty( $settings['grid_items'] ) && intval( $settings['grid_items'] ) == $settings['grid_items'] ) {
1662
+ $args['posts_per_page'] = $settings['grid_items'];
1663
+ }
1664
+
1665
+ // Order by.
1666
+ if ( ! empty( $settings['grid_order_by'] ) ) {
1667
+ $args['orderby'] = $settings['grid_order_by'];
1668
+ }
1669
+
1670
+ // Pagination.
1671
+ if ( ! empty( $settings['grid_pagination'] ) ) {
1672
+ $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
1673
+ $args['paged'] = $paged;
1674
+ }
1675
+
1676
+ // Query.
1677
+ $query = new \WP_Query( $args );
1678
+
1679
+ // Query results.
1680
+ if ( $query->have_posts() ) {
1681
+ while ( $query->have_posts() ) {
1682
+ $query->the_post();
1683
+
1684
+ echo '<div class="obfx-grid-wrapper">';
1685
+ echo '<article class="obfx-grid-col' . ( $settings['grid_image_hide'] == 'yes' || ! has_post_thumbnail() ? ' obfx-no-image' : '' ) . '">';
1686
+
1687
+ // Image.
1688
+ $this->renderImage();
1689
+
1690
+ echo '<div class="obfx-grid-col-content">';
1691
+ // Title.
1692
+ $this->renderTitle();
1693
+
1694
+ // Meta.
1695
+ $this->renderMeta();
1696
+
1697
+ // Content.
1698
+ $this->renderContent();
1699
+
1700
+ // Price.
1701
+ if ( class_exists( 'WooCommerce' ) ) {
1702
+ $this->renderPrice();
1703
+ }
1704
+
1705
+ // Button.
1706
+ $this->renderButton();
1707
+
1708
+ echo '</div><!-- .obfx-grid-col-content -->';
1709
+ echo '</article>';
1710
+ echo '</div>';
1711
+
1712
+ } // end while;
1713
+
1714
+ // Pagination.
1715
+ if ( ! empty( $settings['grid_pagination'] ) ) {
1716
+ ?>
1717
+ <div class="obfx-grid-pagination">
1718
+ <?php
1719
+ $big = 999999999;
1720
+ $totalpages = $query->max_num_pages;
1721
+ $current = max( 1, $paged );
1722
+ $paginate_args = array(
1723
+ 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
1724
+ 'format' => '?paged=%#%',
1725
+ 'current' => $current,
1726
+ 'total' => $totalpages,
1727
+ 'show_all' => false,
1728
+ 'end_size' => 1,
1729
+ 'mid_size' => 3,
1730
+ 'prev_next' => true,
1731
+ 'prev_text' => esc_html__( 'Previous', 'themeisle-companion' ),
1732
+ 'next_text' => esc_html__( 'Next', 'themeisle-companion' ),
1733
+ 'type' => 'plain',
1734
+ 'add_args' => false,
1735
+ );
1736
+
1737
+ $pagination = paginate_links( $paginate_args );
1738
+ ?>
1739
+ <nav class="pagination">
1740
+ <?php echo $pagination; ?>
1741
+ </nav>
1742
+ </div>
1743
+ <?php
1744
+ }
1745
+ } // end if;
1746
+
1747
+ // Restore original data.
1748
+ wp_reset_postdata();
1749
+
1750
+ echo '</div><!-- .obfx-grid-container -->';
1751
+
1752
+ echo '</div><!-- .obfx-grid -->';
1753
+ }
1754
+ }
1755
+
obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-pricing-table.php ADDED
@@ -0,0 +1,1056 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ } // Exit if accessed directly
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.
26
+ *
27
+ * @return string
28
+ */
29
+ public function get_title() {
30
+ return __( 'Pricing Table', 'themeisle-companion' );
31
+ }
32
+
33
+ /**
34
+ * Widget icon.
35
+ *
36
+ * @return string
37
+ */
38
+ public function get_icon() {
39
+ return 'eicon-price-table';
40
+ }
41
+
42
+ /**
43
+ * Widget name.
44
+ *
45
+ * @return string
46
+ */
47
+ public function get_name() {
48
+ return 'obfx-pricing-table';
49
+ }
50
+
51
+ /**
52
+ * Widget Category
53
+ *
54
+ * @return array
55
+ */
56
+ public function get_categories() {
57
+ return [ 'obfx-elementor-widgets' ];
58
+ }
59
+
60
+ /**
61
+ * Register Elementor Controls
62
+ */
63
+ protected function _register_controls() {
64
+ $this->plan_title_section();
65
+
66
+ $this->plan_price_tag_section();
67
+
68
+ $this->features_section();
69
+
70
+ $this->button_section();
71
+
72
+ $this->header_style_section();
73
+
74
+ $this->price_tag_style_section();
75
+
76
+ $this->features_style_section();
77
+
78
+ $this->button_style_section();
79
+ }
80
+
81
+ /**
82
+ * Content > Title section.
83
+ */
84
+ private function plan_title_section() {
85
+ $this->start_controls_section(
86
+ 'section_title',
87
+ [
88
+ 'label' => __( 'Plan Title', 'themeisle-companion' ),
89
+ ]
90
+ );
91
+
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' ),
99
+ ]
100
+ );
101
+
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' => [
109
+ 'h1' => __( 'h1', 'themeisle-companion' ),
110
+ 'h2' => __( 'h2', 'themeisle-companion' ),
111
+ 'h3' => __( 'h3', 'themeisle-companion' ),
112
+ 'h4' => __( 'h4', 'themeisle-companion' ),
113
+ 'h5' => __( 'h5', 'themeisle-companion' ),
114
+ 'h6' => __( 'h6', 'themeisle-companion' ),
115
+ 'p' => __( 'p', 'themeisle-companion' ),
116
+ ],
117
+ ]
118
+ );
119
+
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' ),
127
+ ]
128
+ );
129
+
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' => [
137
+ 'h1' => __( 'h1', 'themeisle-companion' ),
138
+ 'h2' => __( 'h2', 'themeisle-companion' ),
139
+ 'h3' => __( 'h3', 'themeisle-companion' ),
140
+ 'h4' => __( 'h4', 'themeisle-companion' ),
141
+ 'h5' => __( 'h5', 'themeisle-companion' ),
142
+ 'h6' => __( 'h6', 'themeisle-companion' ),
143
+ 'p' => __( 'p', 'themeisle-companion' ),
144
+ ],
145
+ ]
146
+ );
147
+ $this->end_controls_section(); // end section-title
148
+ }
149
+
150
+ /**
151
+ * Content > Price Tag section.
152
+ */
153
+ private function plan_price_tag_section() {
154
+ $this->start_controls_section(
155
+ 'section_price_tag',
156
+ [
157
+ 'label' => __( 'Price Tag', 'themeisle-companion' ),
158
+ ]
159
+ );
160
+
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' ),
168
+ 'separator' => 'after',
169
+ ]
170
+ );
171
+
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' ),
179
+ ]
180
+ );
181
+
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' => [
189
+ 'left' => __( 'Before', 'themeisle-companion' ),
190
+ 'right' => __( 'After', 'themeisle-companion' ),
191
+ ],
192
+ ]
193
+ );
194
+
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' ),
202
+ 'separator' => 'before',
203
+ ]
204
+ );
205
+ $this->end_controls_section(); // end section-price-tag
206
+ }
207
+
208
+ /**
209
+ * Content > Features section.
210
+ */
211
+ private function features_section() {
212
+ $this->start_controls_section(
213
+ 'section_features',
214
+ [
215
+ 'label' => __( 'Features', 'themeisle-companion' ),
216
+ ]
217
+ );
218
+
219
+ $this->add_control(
220
+ 'feature_list',
221
+ [
222
+ 'label' => __( 'Plan Features', 'themeisle-companion' ),
223
+ 'type' => Controls_Manager::REPEATER,
224
+ 'default' => [
225
+ [
226
+ 'accent' => __( 'First', 'themeisle-companion' ),
227
+ 'text' => __( 'Feature', 'themeisle-companion' ),
228
+ ],
229
+ [
230
+ 'accent' => __( 'Second', 'themeisle-companion' ),
231
+ 'text' => __( 'Feature', 'themeisle-companion' ),
232
+ ],
233
+ [
234
+ 'accent' => __( 'Third', 'themeisle-companion' ),
235
+ 'text' => __( 'Feature', 'themeisle-companion' ),
236
+ ],
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' ),
244
+ 'label_block' => true,
245
+ 'default' => __( 'Accent', 'themeisle-companion' ),
246
+ ],
247
+ [
248
+ 'type' => Controls_Manager::TEXT,
249
+ 'name' => 'text',
250
+ 'label' => __( 'Text', 'themeisle-companion' ),
251
+ 'label_block' => true,
252
+ 'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
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,
260
+ 'default' => 'fa fa-star',
261
+ ],
262
+ ],
263
+ 'title_field' => '{{ accent + " " + text }}',
264
+ ]
265
+ );
266
+
267
+ $this->add_responsive_control(
268
+ 'features_align',
269
+ [
270
+ 'label' => __( 'Alignment', 'themeisle-companion' ),
271
+ 'type' => Controls_Manager::CHOOSE,
272
+ 'options' => [
273
+ 'left' => [
274
+ 'title' => __( 'Left', 'themeisle-companion' ),
275
+ 'icon' => 'fa fa-align-left',
276
+ ],
277
+ 'center' => [
278
+ 'title' => __( 'Center', 'themeisle-companion' ),
279
+ 'icon' => 'fa fa-align-center',
280
+ ],
281
+ 'right' => [
282
+ 'title' => __( 'Right', 'themeisle-companion' ),
283
+ 'icon' => 'fa fa-align-right',
284
+ ],
285
+ 'justify' => [
286
+ 'title' => __( 'Justified', 'themeisle-companion' ),
287
+ 'icon' => 'fa fa-align-justify',
288
+ ],
289
+ ],
290
+ 'default' => 'center',
291
+ 'selectors' => [
292
+ '{{WRAPPER}} .obfx-feature-list' => 'text-align: {{VALUE}};',
293
+ ],
294
+ ]
295
+ );
296
+
297
+ $this->end_controls_section(); // end section-features
298
+ }
299
+
300
+ /**
301
+ * Content > Button section.
302
+ */
303
+ private function button_section() {
304
+ $this->start_controls_section(
305
+ 'section_button',
306
+ [
307
+ 'label' => __( 'Button', 'themeisle-companion' ),
308
+ ]
309
+ );
310
+
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' ),
318
+ ]
319
+ );
320
+
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
+ ]
328
+ );
329
+
330
+ $this->add_control(
331
+ 'button_icon',
332
+ [
333
+ 'type' => Controls_Manager::ICON,
334
+ 'label' => __( 'Icon', 'themeisle-companion' ),
335
+ 'label_block' => true,
336
+ 'default' => '',
337
+ ]
338
+ );
339
+
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' => [
347
+ 'left' => __( 'Before', 'themeisle-companion' ),
348
+ 'right' => __( 'After', 'themeisle-companion' ),
349
+ ],
350
+ 'condition' => [
351
+ 'button_icon!' => '',
352
+ ],
353
+ ]
354
+ );
355
+
356
+ $this->add_control(
357
+ 'button_icon_indent',
358
+ [
359
+ 'type' => Controls_Manager::SLIDER,
360
+ 'label' => __( 'Icon Spacing', 'themeisle-companion' ),
361
+ 'range' => [
362
+ 'px' => [
363
+ 'max' => 50,
364
+ ],
365
+ ],
366
+ 'condition' => [
367
+ 'button_icon!' => '',
368
+ ],
369
+ 'selectors' => [
370
+ '{{WRAPPER}} .obfx-button-icon-align-right i' => 'margin-left: {{SIZE}}{{UNIT}};',
371
+ '{{WRAPPER}} .obfx-button-icon-align-left i' => 'margin-right: {{SIZE}}{{UNIT}};',
372
+ ],
373
+ ]
374
+ );
375
+ $this->end_controls_section(); // end section_button
376
+ }
377
+
378
+ /**
379
+ * Style > Header section.
380
+ */
381
+ private function header_style_section() {
382
+ $this->start_controls_section(
383
+ 'section_header_style',
384
+ [
385
+ 'label' => __( 'Header', 'themeisle-companion' ),
386
+ 'tab' => Controls_Manager::TAB_STYLE,
387
+ ]
388
+ );
389
+
390
+ $this->add_responsive_control(
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}};',
398
+ ],
399
+ ]
400
+ );
401
+
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' => [
413
+ '{{WRAPPER}} .obfx-pricing-table-title' => 'color: {{VALUE}};',
414
+ ],
415
+ ]
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
+ );
426
+
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' => [
438
+ '{{WRAPPER}} .obfx-pricing-table-subtitle' => 'color: {{VALUE}};',
439
+ ],
440
+ ]
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' ),
457
+ 'types' => [ 'classic', 'gradient' ],
458
+ 'selector' => '{{WRAPPER}} .obfx-title-wrapper',
459
+ ]
460
+ );
461
+ $this->end_controls_section(); // end section_header_style
462
+ }
463
+
464
+ /**
465
+ * Style > Price Tag section.
466
+ */
467
+ private function price_tag_style_section() {
468
+ $this->start_controls_section(
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' => [
483
+ '{{WRAPPER}} .obfx-price-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
484
+ ],
485
+ ]
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' ),
493
+ 'types' => [ 'classic', 'gradient' ],
494
+ 'selector' => '{{WRAPPER}} .obfx-price-wrapper',
495
+ ]
496
+ );
497
+
498
+ $this->add_control(
499
+ 'price_tag_heading_currency',
500
+ [
501
+ 'label' => __( 'Currency', 'themeisle-companion' ),
502
+ 'type' => Controls_Manager::HEADING,
503
+ 'separator' => 'before',
504
+ ]
505
+ );
506
+
507
+ $this->add_control(
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' => [
518
+ '{{WRAPPER}} .obfx-price-currency' => 'color: {{VALUE}};',
519
+ ],
520
+ ]
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
+ );
531
+
532
+ $this->add_control(
533
+ 'price_tag_heading_price',
534
+ [
535
+ 'label' => __( 'Price', 'themeisle-companion' ),
536
+ 'type' => Controls_Manager::HEADING,
537
+ 'separator' => 'before',
538
+ ]
539
+ );
540
+
541
+ $this->add_control(
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' => [
552
+ '{{WRAPPER}} .obfx-price' => 'color: {{VALUE}};',
553
+ ],
554
+ ]
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
+ );
565
+
566
+ $this->add_control(
567
+ 'price_tag_heading_period',
568
+ [
569
+ 'label' => __( 'Period', 'themeisle-companion' ),
570
+ 'type' => Controls_Manager::HEADING,
571
+ 'separator' => 'before',
572
+ ]
573
+ );
574
+
575
+ $this->add_control(
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' => [
586
+ '{{WRAPPER}} .obfx-pricing-period' => 'color: {{VALUE}};',
587
+ ],
588
+ ]
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
+ );
599
+ $this->end_controls_section(); // end pricing-section
600
+ }
601
+
602
+ /**
603
+ * Style > Features section.
604
+ */
605
+ private function features_style_section() {
606
+ $this->start_controls_section(
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' ),
619
+ 'types' => [ 'classic', 'gradient' ],
620
+ 'selector' => '{{WRAPPER}} .obfx-feature-list',
621
+ ]
622
+ );
623
+
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' => [
631
+ '{{WRAPPER}} .obfx-feature-list' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
632
+ ],
633
+ ]
634
+ );
635
+
636
+ $this->add_control(
637
+ 'features_accented_heading',
638
+ [
639
+ 'label' => __( 'Accented', 'themeisle-companion' ),
640
+ 'type' => Controls_Manager::HEADING,
641
+ 'separator' => 'before',
642
+ ]
643
+ );
644
+
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' => [
656
+ '{{WRAPPER}} .obfx-pricing-table-accented' => 'color: {{VALUE}};',
657
+ ],
658
+ ]
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
+ );
669
+
670
+ $this->add_control(
671
+ 'features_features_heading',
672
+ [
673
+ 'label' => __( 'Features', 'themeisle-companion' ),
674
+ 'type' => Controls_Manager::HEADING,
675
+ 'separator' => 'before',
676
+ ]
677
+ );
678
+
679
+ $this->add_control(
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' => [
690
+ '{{WRAPPER}} .obfx-pricing-table-feature' => 'color: {{VALUE}};',
691
+ ],
692
+ ]
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
+ );
703
+
704
+ $this->add_control(
705
+ 'features_icons_heading',
706
+ [
707
+ 'label' => __( 'Icons', 'themeisle-companion' ),
708
+ 'type' => Controls_Manager::HEADING,
709
+ 'separator' => 'before',
710
+ ]
711
+ );
712
+
713
+ $this->add_control(
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' => [
724
+ '{{WRAPPER}} .obfx-pricing-table-feature-icon' => 'color: {{VALUE}};',
725
+ ],
726
+ ]
727
+ );
728
+
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,
736
+ ],
737
+ 'range' => [
738
+ 'px' => [
739
+ 'max' => 50,
740
+ ],
741
+ ],
742
+ 'selectors' => [
743
+ '{{WRAPPER}} i.obfx-pricing-table-feature-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
744
+ ],
745
+ ]
746
+ );
747
+
748
+ $this->end_controls_section(); // end section_features_style
749
+ }
750
+
751
+ /**
752
+ * Style > Button section.
753
+ */
754
+ private function button_style_section() {
755
+ $this->start_controls_section(
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' ],
768
+ 'selector' => '{{WRAPPER}} .obfx-pricing-table-button-wrapper',
769
+ ]
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
+ );
781
+
782
+ $this->add_control(
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}};',
790
+ ],
791
+ ]
792
+ );
793
+
794
+ $this->add_control(
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}};',
802
+ ],
803
+ ]
804
+ );
805
+
806
+ // Add the tabbed control.
807
+ $this->tabbed_button_controls();
808
+
809
+ $this->end_controls_section(); // end section_button_style
810
+ }
811
+
812
+ /**
813
+ * Tabs for the Style > Button section.
814
+ */
815
+ private function tabbed_button_controls() {
816
+ $this->start_controls_tabs( 'tabs_background' );
817
+
818
+ $this->start_controls_tab(
819
+ 'tab_background_normal',
820
+ [
821
+ 'label' => __( 'Normal', 'themeisle-companion' ),
822
+ ]
823
+ );
824
+
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' => [
836
+ '{{WRAPPER}} .obfx-pricing-table-button' => 'color: {{VALUE}};',
837
+ ],
838
+ ]
839
+ );
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' => [
851
+ '{{WRAPPER}} .obfx-pricing-table-button' => 'background-color: {{VALUE}};',
852
+ ],
853
+ ]
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',
861
+ 'separator' => '',
862
+ ]
863
+ );
864
+
865
+ $this->end_controls_tab();
866
+
867
+ $this->start_controls_tab(
868
+ 'tab_background_hover',
869
+ [
870
+ 'label' => __( 'Hover', 'themeisle-companion' ),
871
+ ]
872
+ );
873
+
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' => [
885
+ '{{WRAPPER}} .obfx-pricing-table-button:hover' => 'color: {{VALUE}};',
886
+ ],
887
+ ]
888
+ );
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' => [
900
+ '{{WRAPPER}} .obfx-pricing-table-button:hover' => 'background-color: {{VALUE}};',
901
+ ],
902
+ ]
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',
910
+ 'separator' => '',
911
+ ]
912
+ );
913
+
914
+ $this->add_control(
915
+ 'background_hover_transition',
916
+ [
917
+ 'label' => __( 'Transition Duration', 'themeisle-companion' ),
918
+ 'type' => Controls_Manager::SLIDER,
919
+ 'default' => [
920
+ 'size' => 0.3,
921
+ ],
922
+ 'range' => [
923
+ 'px' => [
924
+ 'max' => 3,
925
+ 'step' => 0.1,
926
+ ],
927
+ ],
928
+ 'render_type' => 'ui',
929
+ 'selectors' => [
930
+ '{{WRAPPER}} .obfx-pricing-table-button' => 'transition: all {{SIZE}}s ease;',
931
+ ],
932
+ ]
933
+ );
934
+
935
+ $this->end_controls_tab();
936
+
937
+ $this->end_controls_tabs();
938
+ }
939
+
940
+ /**
941
+ * Render function to output the pricing table.
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' );
948
+ $this->add_render_attribute( 'button_icon', 'class', $settings['button_icon'] );
949
+ $this->add_render_attribute( 'button_icon_align', 'class', 'obfx-button-icon-align-' . $settings['button_icon_align'] );
950
+ if ( ! empty( $settings['link']['url'] ) ) {
951
+ $this->add_render_attribute( 'button', 'href', $settings['link']['url'] );
952
+
953
+ if ( ! empty( $settings['link']['is_external'] ) ) {
954
+ $this->add_render_attribute( 'button', 'target', '_blank' );
955
+ }
956
+ }
957
+
958
+ $output = '';
959
+
960
+ $output .= '<div class="obfx-pricing-table-wrapper">';
961
+
962
+ if ( ! empty( $settings['title'] ) || ! empty( $settings['subtitle'] ) ) {
963
+ $output .= '<div class="obfx-title-wrapper">';
964
+ if ( ! empty( $settings['title'] ) ) {
965
+ // Start of title tag.
966
+ $output .= '<' . esc_html( $settings['title_tag'] ) . ' ' . $this->get_render_attribute_string( 'title' ) . '>';
967
+
968
+ // Title string.
969
+ $output .= esc_html( $settings['title'] );
970
+
971
+ // End of title tag.
972
+ $output .= '</' . esc_html( $settings['title_tag'] ) . '>';
973
+ }
974
+ if ( ! empty( $settings['subtitle'] ) ) {
975
+ // Start of subtitle tag.
976
+ $output .= '<' . esc_html( $settings['subtitle_tag'] ) . ' ' . $this->get_render_attribute_string( 'subtitle' ) . '>';
977
+
978
+ // Subtitle string.
979
+ $output .= esc_html( $settings['subtitle'] );
980
+
981
+ // End of subtitle tag.
982
+ $output .= '</' . esc_html( $settings['subtitle_tag'] ) . '>';
983
+
984
+ }
985
+
986
+ $output .= '</div> <!-- /.obfx-title-wrapper -->';
987
+ }
988
+
989
+ if ( ! empty( $settings['price_tag_text'] ) || ! empty( $settings['price_tag_currency'] ) || ! empty( $settings['price_tag_period'] ) ) {
990
+ $output .= '<div class="obfx-price-wrapper">';
991
+
992
+ if ( ! empty( $settings['price_tag_currency'] ) && ( $settings['price_tag_currency_position'] == 'left' ) ) {
993
+ $output .= '<span class="obfx-price-currency">' . esc_html( $settings['price_tag_currency'] ) . '</span>';
994
+ }
995
+
996
+ if ( ( isset( $settings['price_tag_text'] ) && $settings['price_tag_text'] === '0' ) || ! empty( $settings['price_tag_text'] ) ) {
997
+ $output .= '<span class="obfx-price">' . esc_html( $settings['price_tag_text'] ) . '</span>';
998
+ }
999
+
1000
+ if ( ! empty( $settings['price_tag_currency'] ) && ( $settings['price_tag_currency_position'] == 'right' ) ) {
1001
+ $output .= '<span class="obfx-price-currency">' . esc_html( $settings['price_tag_currency'] ) . '</span>';
1002
+ }
1003
+
1004
+ if ( ! empty( $settings['price_tag_period'] ) ) {
1005
+ $output .= '<span class="obfx-pricing-period">' . esc_html( $settings['price_tag_period'] ) . '</span>';
1006
+ }
1007
+
1008
+ $output .= '</div> <!-- /.obfx-price-wrapper -->';
1009
+ }
1010
+
1011
+ if ( count( $settings['feature_list'] ) ) {
1012
+ $output .= '<ul class="obfx-feature-list">';
1013
+ foreach ( $settings['feature_list'] as $feature ) {
1014
+ $output .= '<li>';
1015
+ if ( ! empty( $feature['feature_icon'] ) ) {
1016
+ $output .= '<i class="obfx-pricing-table-feature-icon ' . esc_attr( $feature['feature_icon'] ) . '"></i>';
1017
+ }
1018
+ if ( ! empty( $feature['accent'] ) ) {
1019
+ $output .= '<span class="obfx-pricing-table-accented">' . esc_html( $feature['accent'] ) . '</span>';
1020
+ $output .= ' ';
1021
+ }
1022
+ if ( ! empty( $feature['text'] ) ) {
1023
+ $output .= '<span class="obfx-pricing-table-feature">' . esc_html( $feature['text'] ) . '</span>';
1024
+ }
1025
+ $output .= '</li>';
1026
+ }
1027
+ $output .= '</ul>';
1028
+ }
1029
+
1030
+ if ( ! empty( $settings['button_text'] ) ) {
1031
+ $output .= '<div class="obfx-pricing-table-button-wrapper">';
1032
+
1033
+ $output .= '<a ' . $this->get_render_attribute_string( 'button' ) . '>';
1034
+
1035
+ if ( ! empty( $settings['button_icon'] ) && ( $settings['button_icon_align'] == 'left' ) ) {
1036
+ $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1037
+ $output .= '<i ' . $this->get_render_attribute_string( 'button_icon' ) . '></i>';
1038
+ }
1039
+
1040
+ $output .= '<span class="elementor-button-text">' . esc_html( $settings['button_text'] ) . '</span>';
1041
+
1042
+ if ( ! empty( $settings['button_icon'] ) && ( $settings['button_icon_align'] == 'right' ) ) {
1043
+ $output .= '<span ' . $this->get_render_attribute_string( 'button_icon_align' ) . ' >';
1044
+ $output .= '<i ' . $this->get_render_attribute_string( 'button_icon' ) . '></i>';
1045
+ }
1046
+
1047
+ $output .= '</a>';
1048
+ $output .= '</div> <!-- /.obfx-pricing-table-button-wrapper -->';
1049
+
1050
+ }
1051
+ $output .= '</div> <!-- /.obfx-pricing-table-wrapper -->';
1052
+
1053
+ echo $output;
1054
+ }
1055
+ }
1056
+
obfx_modules/elementor-widgets/widgets/class-obfx-elementor-widget-services.php ADDED
@@ -0,0 +1,615 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ } // Exit if accessed directly
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.
26
+ *
27
+ * @return string
28
+ */
29
+ public function get_name() {
30
+ return 'obfx-services';
31
+ }
32
+
33
+ /**
34
+ * Widget title.
35
+ *
36
+ * @return string
37
+ */
38
+ public function get_title() {
39
+ return __( 'Services', 'themeisle-companion' );
40
+ }
41
+
42
+ /**
43
+ * Widget icon.
44
+ *
45
+ * @return string
46
+ */
47
+ public function get_icon() {
48
+ return 'fa fa-diamond';
49
+ }
50
+
51
+
52
+ /**
53
+ * Widget Category
54
+ *
55
+ * @return array
56
+ */
57
+ public function get_categories() {
58
+ return [ 'obfx-elementor-widgets' ];
59
+ }
60
+
61
+ /**
62
+ * Register Elementor Controls
63
+ */
64
+ protected function _register_controls() {
65
+ $this->services_content();
66
+ $this->style_icon();
67
+ $this->style_grid_options();
68
+ }
69
+
70
+ /**
71
+ * Content controls
72
+ */
73
+ private function services_content() {
74
+ $this->start_controls_section(
75
+ 'section_content',
76
+ [
77
+ 'label' => __( 'Services', 'themeisle-companion' ),
78
+ ]
79
+ );
80
+
81
+ $this->add_control(
82
+ 'services_list',
83
+ [
84
+ 'label' => __( 'Services', 'themeisle-companion' ),
85
+ 'type' => Controls_Manager::REPEATER,
86
+ 'default' => [
87
+ [
88
+ 'title' => __( 'Responsive', 'themeisle-companion' ),
89
+ 'text' => __( 'A lot of text here', 'themeisle-companion' ),
90
+ 'icon' => 'fa fa-star',
91
+ 'color' => '#333333',
92
+ ],
93
+ [
94
+ 'title' => __( 'Responsive', 'themeisle-companion' ),
95
+ 'text' => __( 'A lot of text here', 'themeisle-companion' ),
96
+ 'icon' => 'fa fa-star',
97
+ 'color' => '#333333',
98
+ ],
99
+ [
100
+ 'title' => __( 'Responsive', 'themeisle-companion' ),
101
+ 'text' => __( 'A lot of text here', 'themeisle-companion' ),
102
+ 'icon' => 'fa fa-star',
103
+ 'color' => '#333333',
104
+ ],
105
+ ],
106
+ 'fields' => [
107
+ [
108
+ 'type' => Controls_Manager::TEXT,
109
+ 'name' => 'title',
110
+ 'label_block' => true,
111
+ 'label' => __( 'Title & Description', 'themeisle-companion' ),
112
+ 'default' => __( 'Service Title', 'themeisle-companion' ),
113
+ ],
114
+ [
115
+ 'type' => Controls_Manager::TEXTAREA,
116
+ 'name' => 'text',
117
+ 'placeholder' => __( 'Plan Features', 'themeisle-companion' ),
118
+ 'default' => __( 'Feature', 'themeisle-companion' ),
119
+ ],
120
+ [
121
+ 'type' => Controls_Manager::ICON,
122
+ 'name' => 'icon',
123
+ 'label' => __( 'Icon', 'themeisle-companion' ),
124
+ 'default' => 'fa fa-star',
125
+ ],
126
+ [
127
+ 'type' => Controls_Manager::COLOR,
128
+ 'name' => 'color',
129
+ 'label_block' => false,
130
+ 'label' => __( 'Icon Color', 'themeisle-companion' ),
131
+ 'default' => '#5764c6',
132
+ ],
133
+ [
134
+ 'type' => Controls_Manager::URL,
135
+ 'name' => 'link',
136
+ 'label' => __( 'Link to', 'themeisle-companion' ),
137
+ 'separator' => 'before',
138
+ 'placeholder' => __( 'https://example.com', 'themeisle-companion' ),
139
+ ],
140
+ ],
141
+ 'title_field' => '<i style="color:{{color}}" class="{{icon}}"></i> {{title}}',
142
+ ]
143
+ );
144
+
145
+ $this->add_control(
146
+ 'align',
147
+ [
148
+ 'label' => '<i class="fa fa-arrows"></i> ' . __( 'Icon Position', 'themeisle-companion' ),
149
+ 'type' => Controls_Manager::CHOOSE,
150
+ 'options' => [
151
+ 'left' => [
152
+ 'title' => __( 'Left', 'themeisle-companion' ),
153
+ 'icon' => 'fa fa-angle-left',
154
+ ],
155
+ 'top' => [
156
+ 'title' => __( 'Top', 'themeisle-companion' ),
157
+ 'icon' => 'fa fa-angle-up',
158
+ ],
159
+ 'right' => [
160
+ 'title' => __( 'Right', 'themeisle-companion' ),
161
+ 'icon' => 'fa fa-angle-right',
162
+ ],
163
+ ],
164
+ 'default' => 'top',
165
+ 'prefix_class' => 'obfx-position-',
166
+ 'toggle' => false,
167
+ ]
168
+ );
169
+
170
+ // Columns.
171
+ $this->add_responsive_control(
172
+ 'grid_columns',
173
+ [
174
+ 'type' => Controls_Manager::SELECT,
175
+ 'label' => '<i class="fa fa-columns"></i> ' . __( 'Columns', 'themeisle-companion' ),
176
+ 'default' => 3,
177
+ 'tablet_default' => 2,
178
+ 'mobile_default' => 1,
179
+ 'options' => [
180
+ 1 => 1,
181
+ 2 => 2,
182
+ 3 => 3,
183
+ 4 => 4,
184
+ 5 => 5,
185
+ ],
186
+ ]
187
+ );
188
+ $this->end_controls_section();
189
+ }
190
+
191
+ /**
192
+ * Icon Style Controls
193
+ */
194
+ private function style_icon() {
195
+ $this->start_controls_section(
196
+ 'section_style_icon',
197
+ [
198
+ 'label' => __( 'Icon', 'themeisle-companion' ),
199
+ 'tab' => Controls_Manager::TAB_STYLE,
200
+ ]
201
+ );
202
+ $this->add_control(
203
+ 'icon_space',
204
+ [
205
+ 'label' => __( 'Spacing', 'themeisle-companion' ),
206
+ 'type' => Controls_Manager::SLIDER,
207
+ 'default' => [
208
+ 'size' => 15,
209
+ ],
210
+ 'range' => [
211
+ 'px' => [
212
+ 'min' => 0,
213
+ 'max' => 300,
214
+ ],
215
+ ],
216
+ 'selectors' => [
217
+ '{{WRAPPER}}.obfx-position-right .obfx-icon' => 'margin-left: {{SIZE}}{{UNIT}};',
218
+ '{{WRAPPER}}.obfx-position-left .obfx-icon' => 'margin-right: {{SIZE}}{{UNIT}};',
219
+ '{{WRAPPER}}.obfx-position-top .obfx-icon' => 'margin-bottom: {{SIZE}}{{UNIT}};',
220
+ ],
221
+ ]
222
+ );
223
+ $this->add_control(
224
+ 'icon_size',
225
+ [
226
+ 'label' => __( 'Size', 'themeisle-companion' ),
227
+ 'type' => Controls_Manager::SLIDER,
228
+ 'range' => [
229
+ 'px' => [
230
+ 'min' => 6,
231
+ 'max' => 300,
232
+ ],
233
+ ],
234
+ 'default' => [
235
+ 'size' => 35,
236
+ ],
237
+ 'selectors' => [
238
+ '{{WRAPPER}} .obfx-icon' => 'font-size: {{SIZE}}{{UNIT}};',
239
+ ],
240
+ ]
241
+ );
242
+ $this->end_controls_section();
243
+ $this->start_controls_section(
244
+ 'section_style_content',
245
+ [
246
+ 'label' => __( 'Content', 'themeisle-companion' ),
247
+ 'tab' => Controls_Manager::TAB_STYLE,
248
+ ]
249
+ );
250
+
251
+ $this->add_responsive_control(
252
+ 'text_align',
253
+ [
254
+ 'label' => __( 'Alignment', 'themeisle-companion' ),
255
+ 'type' => Controls_Manager::CHOOSE,
256
+ 'toggle' => false,
257
+ 'default' => 'center',
258
+ 'options' => [
259
+ 'left' => [
260
+ 'title' => __( 'Left', 'themeisle-companion' ),
261
+ 'icon' => 'fa fa-align-left',
262
+ ],
263
+ 'center' => [
264
+ 'title' => __( 'Center', 'themeisle-companion' ),
265
+ 'icon' => 'fa fa-align-center',
266
+ ],
267
+ 'right' => [
268
+ 'title' => __( 'Right', 'themeisle-companion' ),
269
+ 'icon' => 'fa fa-align-right',
270
+ ],
271
+ ],
272
+ 'selectors' => [
273
+ '{{WRAPPER}} .obfx-grid .obfx-grid-container .obfx-grid-wrapper .obfx-service-box' => 'text-align: {{VALUE}}; justify-content: {{VALUE}};',
274
+ '{{WRAPPER}} .obfx-grid .obfx-grid-container .obfx-grid-wrapper .obfx-service-box .obfx-service-text' => 'text-align: {{VALUE}};',
275
+ ],
276
+ ]
277
+ );
278
+
279
+ $this->add_control(
280
+ 'heading_title',
281
+ [
282
+ 'label' => __( 'Title', 'themeisle-companion' ),
283
+ 'type' => Controls_Manager::HEADING,
284
+ 'separator' => 'before',
285
+ ]
286
+ );
287
+
288
+ $this->add_responsive_control(
289
+ 'title_bottom_space',
290
+ [
291
+ 'label' => __( 'Spacing', 'themeisle-companion' ),
292
+ 'type' => Controls_Manager::SLIDER,
293
+ 'range' => [
294
+ 'px' => [
295
+ 'min' => 0,
296
+ 'max' => 300,
297
+ ],
298
+ ],
299
+ 'selectors' => [
300
+ '{{WRAPPER}} .obfx-service-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
301
+ ],
302
+ ]
303
+ );
304
+
305
+ $this->add_control(
306
+ 'title_color',
307
+ [
308
+ 'label' => __( 'Color', 'themeisle-companion' ),
309
+ 'type' => Controls_Manager::COLOR,
310
+ 'default' => '',
311
+ 'selectors' => [
312
+ '{{WRAPPER}} .obfx-service-title' => 'color: {{VALUE}};',
313
+ ],
314
+ ]
315
+ );
316
+
317
+ $this->add_group_control(
318
+ Group_Control_Typography::get_type(),
319
+ [
320
+ 'name' => 'title_typography',
321
+ 'selector' => '{{WRAPPER}} .obfx-service-title',
322
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
323
+ ]
324
+ );
325
+
326
+ $this->add_control(
327
+ 'heading_description',
328
+ [
329
+ 'label' => __( 'Description', 'themeisle-companion' ),
330
+ 'type' => Controls_Manager::HEADING,
331
+ 'separator' => 'before',
332
+ ]
333
+ );
334
+
335
+ $this->add_control(
336
+ 'description_color',
337
+ [
338
+ 'label' => __( 'Color', 'themeisle-companion' ),
339
+ 'type' => Controls_Manager::COLOR,
340
+ 'default' => '',
341
+ 'selectors' => [
342
+ '{{WRAPPER}} .obfx-service-text' => 'color: {{VALUE}};',
343
+ ],
344
+ 'scheme' => [
345
+ 'type' => Scheme_Color::get_type(),
346
+ 'value' => Scheme_Color::COLOR_3,
347
+ ],
348
+ ]
349
+ );
350
+
351
+ $this->add_group_control(
352
+ Group_Control_Typography::get_type(),
353
+ [
354
+ 'name' => 'description_typography',
355
+ 'selector' => '{{WRAPPER}} .obfx-service-text',
356
+ 'scheme' => Scheme_Typography::TYPOGRAPHY_3,
357
+ ]
358
+ );
359
+
360
+ $this->end_controls_section();
361
+ }
362
+
363
+ /**
364
+ * Grid Style Controls
365
+ */
366
+ private function style_grid_options() {
367
+ $this->start_controls_section(
368
+ 'section_grid_style',
369
+ [
370
+ 'label' => __( 'Grid', 'themeisle-companion' ),
371
+ 'tab' => Controls_Manager::TAB_STYLE,
372
+ ]
373
+ );
374
+
375
+ // Columns margin.
376
+ $this->add_control(
377
+ 'grid_style_columns_margin',
378
+ [
379
+ 'label' => __( 'Columns margin', 'themeisle-companion' ),
380
+ 'type' => Controls_Manager::SLIDER,
381
+ 'default' => [
382
+ 'size' => 15,
383
+ ],
384
+ 'range' => [
385
+ 'px' => [
386
+ 'min' => 0,
387
+ 'max' => 100,
388
+ ],
389
+ ],
390
+ 'selectors' => [
391
+ '{{WRAPPER}} .obfx-grid-wrapper' => 'padding-right: calc( {{SIZE}}{{UNIT}} ); padding-left: calc( {{SIZE}}{{UNIT}} );',
392
+ '{{WRAPPER}} .obfx-grid-container' => 'margin-left: calc( -{{SIZE}}{{UNIT}} ); margin-right: calc( -{{SIZE}}{{UNIT}} );',
393
+ ],
394
+ ]
395
+ );
396
+
397
+ // Row margin.
398
+ $this->add_control(
399
+ 'grid_style_rows_margin',
400
+ [
401
+ 'label' => __( 'Rows margin', 'themeisle-companion' ),
402
+ 'type' => Controls_Manager::SLIDER,
403
+ 'default' => [
404
+ 'size' => 30,
405
+ ],
406
+ 'range' => [
407
+ 'px' => [
408
+ 'min' => 0,
409
+ 'max' => 100,
410
+ ],
411
+ ],
412
+ 'selectors' => [
413
+ '{{WRAPPER}} .obfx-grid-wrapper' => 'padding-bottom: {{SIZE}}{{UNIT}};',
414
+ ],
415
+ ]
416
+ );
417
+
418
+ // Background.
419
+ $this->add_group_control(
420
+ Group_Control_Background::get_type(),
421
+ [
422
+ 'name' => 'grid_style_background',
423
+ 'types' => [ 'classic', 'gradient' ],
424
+ 'selector' => '{{WRAPPER}} .obfx-grid',
425
+ ]
426
+ );
427
+
428
+ // Items options.
429
+ $this->add_control(
430
+ 'grid_items_style_heading',
431
+ [
432
+ 'label' => __( 'Items', 'themeisle-companion' ),
433
+ 'type' => Controls_Manager::HEADING,
434
+ 'separator' => 'before',
435
+ ]
436
+ );
437
+
438
+ // Items internal padding.
439
+ $this->add_control(
440
+ 'grid_items_style_padding',
441
+ [
442
+ 'label' => __( 'Padding', 'themeisle-companion' ),
443
+ 'type' => Controls_Manager::DIMENSIONS,
444
+ 'size_units' => [ 'px', '%' ],
445
+ 'selectors' => [
446
+ '{{WRAPPER}} .obfx-grid-col' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
447
+ ],
448
+ ]
449
+ );
450
+
451
+ // Items border radius.
452
+ $this->add_control(
453
+ 'grid_items_style_border_radius',
454
+ [
455
+ 'label' => __( 'Border Radius', 'themeisle-companion' ),
456
+ 'type' => Controls_Manager::DIMENSIONS,
457
+ 'size_units' => [ 'px', '%' ],
458
+ 'selectors' => [
459
+ '{{WRAPPER}} .obfx-grid-col' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
460
+ ],
461
+ ]
462
+ );
463
+
464
+ $this->items_style_tabs();
465
+ $this->end_controls_section();
466
+ }
467
+
468
+ /**
469
+ * Items Style Controls
470
+ */
471
+ private function items_style_tabs() {
472
+ $this->start_controls_tabs( 'tabs_background' );
473
+
474
+ $this->start_controls_tab(
475
+ 'tab_background_normal',
476
+ [
477
+ 'label' => __( 'Normal', 'themeisle-companion' ),
478
+ ]
479
+ );
480
+
481
+ $this->add_group_control(
482
+ Group_Control_Background::get_type(),
483
+ [
484
+ 'name' => 'grid_items_background',
485
+ 'types' => [ 'classic', 'gradient' ],
486
+ 'selector' => '{{WRAPPER}} .obfx-service-box',
487
+ ]
488
+ );
489
+
490
+ $this->add_group_control(
491
+ Group_Control_Box_Shadow::get_type(),
492
+ [
493
+ 'name' => 'grid_items_box_shadow',
494
+ 'selector' => '{{WRAPPER}} .obfx-service-box',
495
+ ]
496
+ );
497
+
498
+ $this->end_controls_tab();
499
+
500
+ $this->start_controls_tab(
501
+ 'tab_background_hover',
502
+ [
503
+ 'label' => __( 'Hover', 'themeisle-companion' ),
504
+ ]
505
+ );
506
+
507
+ $this->add_group_control(
508
+ Group_Control_Background::get_type(),
509
+ [
510
+ 'name' => 'grid_items_background_hover',
511
+ 'types' => [ 'classic', 'gradient' ],
512
+ 'selector' => '{{WRAPPER}} .obfx-service-box:hover',
513
+ ]
514
+ );
515
+
516
+ $this->add_group_control(
517
+ Group_Control_Box_Shadow::get_type(),
518
+ [
519
+ 'name' => 'grid_items_box_shadow_hover',
520
+ 'selector' => '{{WRAPPER}} .obfx-service-box:hover',
521
+ ]
522
+ );
523
+
524
+ $this->add_control(
525
+ 'hover_transition',
526
+ [
527
+ 'label' => __( 'Transition Duration', 'themeisle-companion' ),
528
+ 'type' => Controls_Manager::SLIDER,
529
+ 'default' => [
530
+ 'size' => 0.3,
531
+ ],
532
+ 'range' => [
533
+ 'px' => [
534
+ 'max' => 3,
535
+ 'step' => 0.1,
536
+ ],
537
+ ],
538
+ 'selectors' => [
539
+ '{{WRAPPER}} .obfx-service-box' => 'transition: all {{SIZE}}s ease;',
540
+ ],
541
+ ]
542
+ );
543
+ $this->end_controls_tab();
544
+
545
+ $this->end_controls_tabs();
546
+ }
547
+
548
+ /**
549
+ * Render function to output the pricing table.
550
+ */
551
+ protected function render() {
552
+ $settings = $this->get_settings();
553
+
554
+ 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'] : '' ) . '">';
555
+ foreach ( $settings['services_list'] as $service ) {
556
+ $icon_tag = 'span';
557
+
558
+ if ( ! empty( $service['link']['url'] ) ) {
559
+ $this->add_render_attribute( 'link', 'href', $settings['link']['url'] );
560
+ $icon_tag = 'a';
561
+
562
+ if ( $service['link']['is_external'] ) {
563
+ $this->add_render_attribute( 'link', 'target', '_blank' );
564
+ }
565
+
566
+ if ( $service['link']['nofollow'] ) {
567
+ $this->add_render_attribute( 'link', 'rel', 'nofollow' );
568
+ }
569
+ } ?>
570
+ <div class="obfx-grid-wrapper">
571
+ <?php
572
+ if ( ! empty( $service['link']['url'] ) ) {
573
+ $link_props = ' href="' . esc_url( $service['link']['url'] ) . '" ';
574
+ if ( $service['link']['is_external'] === 'on' ) {
575
+ $link_props .= ' target="_blank" ';
576
+ }
577
+ if ( $service['link']['nofollow'] === 'on' ) {
578
+ $link_props .= ' rel="nofollow" ';
579
+ }
580
+ echo '<a' . $link_props . '>';
581
+ }
582
+ ?>
583
+ <div class="obfx-service-box obfx-grid-col">
584
+ <?php
585
+ if ( ! empty( $service['icon'] ) ) {
586
+ ?>
587
+ <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>
588
+ <?php
589
+ }
590
+ if ( ! empty( $service['title'] ) || ! empty( $service['text'] ) ) {
591
+ ?>
592
+ <div class="obfx-service-box-content">
593
+ <?php if ( ! empty( $service['title'] ) ) { ?>
594
+ <h4 class="obfx-service-title"><?php echo esc_attr( $service['title'] ); ?></h4>
595
+ <?php
596
+ }
597
+ if ( ! empty( $service['text'] ) ) {
598
+ ?>
599
+ <p class="obfx-service-text"><?php echo esc_attr( $service['text'] ); ?></p>
600
+ <?php } ?>
601
+ </div><!-- /.obfx-service-box-content -->
602
+ <?php } ?>
603
+ </div><!-- /.obfx-service-box -->
604
+ <?php
605
+ if ( ! empty( $service['link'] ) ) {
606
+ echo '</a>';
607
+ }
608
+ ?>
609
+ </div><!-- /.obfx-grid-wrapper -->
610
+ <?php
611
+ }
612
+ echo '</div></div>';
613
+
614
+ }
615
+ }
obfx_modules/menu-icons/init.php CHANGED
@@ -32,6 +32,7 @@ class Menu_Icons_OBFX_Module extends Orbit_Fox_Module_Abstract {
32
  parent::__construct();
33
  $this->name = __( 'Menu Icons', 'themeisle-companion' );
34
  $this->description = __( 'Module to define menu icons for navigation.', 'themeisle-companion' );
 
35
  }
36
 
37
 
32
  parent::__construct();
33
  $this->name = __( 'Menu Icons', 'themeisle-companion' );
34
  $this->description = __( 'Module to define menu icons for navigation.', 'themeisle-companion' );
35
+ $this->active_default = true;
36
  }
37
 
38
 
obfx_modules/menu-icons/js/admin.js CHANGED
@@ -7,83 +7,83 @@
7
  * @author ThemeIsle
8
  */
9
 
10
- /* global menu_icons */
11
 
12
  var obfx_menuicons_module_admin = function( $, menu_icons ) {
13
  'use strict';
14
 
15
- var default_icon = menu_icons.icon_default;
16
-
17
- function get_prefix(icon){
18
- if(icon.match(/^fa-/)){
19
- return 'fa ';
20
- }else if(icon.match(/^dashicons-/)){
21
- return 'dashicons ';
22
- }else if(icon.match(/glyphicon-/)){
23
- return 'glyphicon ';
24
- }
25
- }
26
-
27
- // lets observe for new li tags added to the ul for when items are added to the menu.
28
- function listen_for_new_items(){
29
- var mutateObserver = new MutationObserver(function(records) {
30
- records.forEach(function(record) {
31
- $(record.addedNodes).each(function(i, x){
32
- // process only the li elements.
33
- if($(x).prop('tagName') === 'LI'){
34
- add_icon(x);
35
- }
36
- });
37
- });
38
- });
39
-
40
- mutateObserver.observe($('ul#menu-to-edit').get(0), {childList: true});
41
- }
42
-
43
- function add_icon(el){
44
- var item_id = $(el).find('input.menu-item-data-db-id').val();
45
- var icon = $('#menu-item-icon-' + item_id).val();
46
- var no_icon_class = '';
47
- if('' === icon){
48
- icon = default_icon;
49
- no_icon_class = 'obfx-menu-icon-none';
50
- }
51
- var prefix = get_prefix(icon);
52
-
53
- $(el).find('.menu-item-bar .menu-item-handle .item-title').prepend($(
54
- '<div class="input-group obfx-menu-icon-container" style="display: inline-block"><input class="form-control obfx-menu-icon ' + no_icon_class + '" value="' + icon + '" style="display: none" type="text" data-menu-item-id="' + item_id + '"><span class="input-group-addon" style="cursor: pointer"><i class="' + prefix + icon + '"></i></span></div>'
55
- ));
56
-
57
- // ensure the popover comes over the menu bar.
58
- $(el).find('.menu-item-bar .menu-item-handle').css('overflow', 'initial');
59
-
60
- $(el).find('.obfx-menu-icon').iconpicker({
61
- // added blank icon for deselection.
62
- icons: $.merge([default_icon], $.merge(menu_icons.icons, $.iconpicker.defaultOptions.icons)),
63
- fullClassFormatter: function(val){
64
- return get_prefix(val) + val;
65
- },
66
- hideOnSelect: true,
67
- placement: 'bottomLeft',
68
- selectedCustomClass: 'obfx-menu-icon-selected'
69
- });
70
-
71
- // add the selected icon to the hidden element.
72
- $(el).find('.obfx-menu-icon').on('iconpickerSelected', function(e) {
73
- var icon = e.iconpickerValue;
74
- var id = $(this).attr('data-menu-item-id');
75
- $('#menu-item-icon-' + id).val(icon);
76
- });
77
-
78
- }
79
 
80
  $( function() {
81
- // add the existing menu item id to the dropdown as an attribute.
82
- $('li.menu-item').each(function(i, x){
83
- add_icon(x);
84
- });
85
 
86
- listen_for_new_items();
87
  } );
88
 
89
  };
7
  * @author ThemeIsle
8
  */
9
 
10
+ /* global menu_icons */
11
 
12
  var obfx_menuicons_module_admin = function( $, menu_icons ) {
13
  'use strict';
14
 
15
+ var default_icon = menu_icons.icon_default;
16
+
17
+ function get_prefix(icon){
18
+ if (icon.match( /^fa-/ )) {
19
+ return 'fa ';
20
+ } else if (icon.match( /^dashicons-/ )) {
21
+ return 'dashicons ';
22
+ } else if (icon.match( /glyphicon-/ )) {
23
+ return 'glyphicon ';
24
+ }
25
+ }
26
+
27
+ // lets observe for new li tags added to the ul for when items are added to the menu.
28
+ function listen_for_new_items(){
29
+ var mutateObserver = new MutationObserver(function(records) {
30
+ records.forEach(function(record) {
31
+ $( record.addedNodes ).each(function(i, x){
32
+ // process only the li elements.
33
+ if ($( x ).prop( 'tagName' ) === 'LI') {
34
+ add_icon( x );
35
+ }
36
+ });
37
+ });
38
+ });
39
+
40
+ mutateObserver.observe( $( 'ul#menu-to-edit' ).get( 0 ), {childList: true} );
41
+ }
42
+
43
+ function add_icon(el){
44
+ var item_id = $( el ).find( 'input.menu-item-data-db-id' ).val();
45
+ var icon = $( '#menu-item-icon-' + item_id ).val();
46
+ var no_icon_class = '';
47
+ if ('' === icon) {
48
+ icon = default_icon;
49
+ no_icon_class = 'obfx-menu-icon-none';
50
+ }
51
+ var prefix = get_prefix( icon );
52
+
53
+ $( el ).find( '.menu-item-bar .menu-item-handle .item-title' ).prepend($(
54
+ '<div class="input-group obfx-menu-icon-container" style="display: inline-block"><input class="form-control obfx-menu-icon ' + no_icon_class + '" value="' + icon + '" style="display: none" type="text" data-menu-item-id="' + item_id + '"><span class="input-group-addon" style="cursor: pointer"><i class="' + prefix + icon + '"></i></span></div>'
55
+ ));
56
+
57
+ // ensure the popover comes over the menu bar.
58
+ $( el ).find( '.menu-item-bar .menu-item-handle' ).css( 'overflow', 'initial' );
59
+
60
+ $( el ).find( '.obfx-menu-icon' ).iconpicker({
61
+ // added blank icon for deselection.
62
+ icons: $.merge( [default_icon], $.merge( menu_icons.icons, $.iconpicker.defaultOptions.icons ) ),
63
+ fullClassFormatter: function(val){
64
+ return get_prefix( val ) + val;
65
+ },
66
+ hideOnSelect: true,
67
+ placement: 'bottomLeft',
68
+ selectedCustomClass: 'obfx-menu-icon-selected'
69
+ });
70
+
71
+ // add the selected icon to the hidden element.
72
+ $( el ).find( '.obfx-menu-icon' ).on('iconpickerSelected', function(e) {
73
+ var icon = e.iconpickerValue;
74
+ var id = $( this ).attr( 'data-menu-item-id' );
75
+ $( '#menu-item-icon-' + id ).val( icon );
76
+ });
77
+
78
+ }
79
 
80
  $( function() {
81
+ // add the existing menu item id to the dropdown as an attribute.
82
+ $( 'li.menu-item' ).each(function(i, x){
83
+ add_icon( x );
84
+ });
85
 
86
+ listen_for_new_items();
87
  } );
88
 
89
  };
obfx_modules/mystock-import/css/media.css CHANGED
@@ -8,7 +8,7 @@
8
  margin: 0;
9
  padding: 2px 8px 8px;
10
  outline: 0;
11
-
12
  -webkit-overflow-scrolling: touch;
13
  }
14
 
@@ -164,12 +164,21 @@
164
  }
165
 
166
  .obfx_spinner {
167
- background: url('/wp-admin/images/wpspin_light.gif') no-repeat;
168
- background-size: 16px 16px;
169
  display: none;
170
- opacity: .7;
 
 
 
 
 
171
  filter: alpha(opacity=70);
172
- width: 16px;
173
- height: 16px;
174
- margin: 5px 35%;
175
- }
 
 
 
 
 
 
8
  margin: 0;
9
  padding: 2px 8px 8px;
10
  outline: 0;
11
+ opacity: 1;
12
  -webkit-overflow-scrolling: touch;
13
  }
14
 
164
  }
165
 
166
  .obfx_spinner {
 
 
167
  display: none;
168
+ width: 32px;
169
+ height: 32px;
170
+ margin: 25% auto 0;
171
+ opacity: 0.9;
172
+ background: url("/wp-admin/images/wpspin_light-2x.gif") no-repeat;
173
+ background-size: 32px 32px;
174
  filter: alpha(opacity=70);
175
+ }
176
+
177
+ .obfx-image-list.obfx_loading {
178
+ opacity: .5;
179
+ filter: alpha(opacity=50);
180
+ }
181
+
182
+ .left-side {
183
+ width: 70%;
184
+ }
obfx_modules/mystock-import/inc/photos.php CHANGED
@@ -7,33 +7,35 @@
7
 
8
  ?>
9
  <div id='obfx-mystock' data-pagenb="1">
10
- <ul class='obfx-image-list'>
11
- <?php
12
- if ( ! empty( $urls ) ) {
13
- foreach ( $urls as $photo ) {
14
- $pid = $photo['id'];
15
- if ( ! empty( $pid ) ) {
16
- $thumb = $photo['url_m'];
17
- ?>
18
- <li class='obfx-image' data-page="1" data-pid="<?php echo esc_attr( $pid ); ?>">
19
- <div class="obfx-preview">
20
- <div class="thumbnail">
21
- <div class="centered">
22
- <img src='<?php echo esc_url( $thumb ); ?>'>
 
 
23
  </div>
24
  </div>
25
- </div>
26
- <button type="button" class="check obfx-image-check" tabindex="0">
27
- <span class="media-modal-icon"></span>
28
- <span class="screen-reader-text"><?php esc_html_e( 'Deselect', 'themeisle-companion' ); ?></span>
29
- </button>
30
- </li>
31
- <?php
32
  }
33
  }
34
- }
35
- ?>
36
- </ul>
37
- <div class="obfx_spinner"></div>
38
- <div class="media-sidebar"></div>
39
  </div>
7
 
8
  ?>
9
  <div id='obfx-mystock' data-pagenb="1">
10
+ <div class="left-side">
11
+ <ul class='obfx-image-list'>
12
+ <?php
13
+ if ( ! empty( $urls ) ) {
14
+ foreach ( $urls as $photo ) {
15
+ $pid = $photo['id'];
16
+ if ( ! empty( $pid ) ) {
17
+ $thumb = $photo['url_m'];
18
+ ?>
19
+ <li class='obfx-image' data-page="1" data-pid="<?php echo esc_attr( $pid ); ?>">
20
+ <div class="obfx-preview">
21
+ <div class="thumbnail">
22
+ <div class="centered">
23
+ <img src='<?php echo esc_url( $thumb ); ?>'>
24
+ </div>
25
  </div>
26
  </div>
27
+ <button type="button" class="check obfx-image-check" tabindex="0">
28
+ <span class="media-modal-icon"></span>
29
+ <span class="screen-reader-text"><?php esc_html_e( 'Deselect', 'themeisle-companion' ); ?></span>
30
+ </button>
31
+ </li>
32
+ <?php
33
+ }
34
  }
35
  }
36
+ ?>
37
+ </ul>
38
+ <div class="obfx_spinner"></div>
39
+ <div class="media-sidebar"></div>
40
+ </div>
41
  </div>
obfx_modules/mystock-import/init.php CHANGED
@@ -48,6 +48,7 @@ class Mystock_Import_OBFX_Module extends Orbit_Fox_Module_Abstract {
48
  parent::__construct();
49
  $this->name = __( 'Mystock Import', 'themeisle-companion' );
50
  $this->description = __( 'Module to import images directly from', 'themeisle-companion' ) . sprintf( ' <a href="%s" target="_blank">mystock.photos</a>', 'https://mystock.photos' );
 
51
  }
52
 
53
 
@@ -112,6 +113,10 @@ class Mystock_Import_OBFX_Module extends Orbit_Fox_Module_Abstract {
112
  if ( $user && isset( $user['nsid'] ) ) {
113
  $photos = $api->people_getPublicPhotos( $user['nsid'], null, 'url_sq, url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l, url_o', self::MAX_IMAGES, $page );
114
  if ( ! empty( $photos ) ) {
 
 
 
 
115
  $photos = $photos['photos']['photo'];
116
  }
117
  }
@@ -208,7 +213,8 @@ class Mystock_Import_OBFX_Module extends Orbit_Fox_Module_Abstract {
208
  $photo = array_filter( $data, function ( $e ) use ( $photo_id ) {
209
  return $e['id'] === $photo_id;
210
  }, true );
211
- $photo = array_pop( array_reverse( $photo ) );
 
212
  if ( empty( $photo ) ) {
213
  wp_die();
214
  }
@@ -288,7 +294,8 @@ class Mystock_Import_OBFX_Module extends Orbit_Fox_Module_Abstract {
288
  'load_more' => esc_html__( 'Loading more photos...', 'themeisle-companion' ),
289
  'tab_name' => esc_html__( 'MyStock Library', 'themeisle-companion' ),
290
  ),
291
- 'slug' => $this->slug,
 
292
  ),
293
  );
294
 
48
  parent::__construct();
49
  $this->name = __( 'Mystock Import', 'themeisle-companion' );
50
  $this->description = __( 'Module to import images directly from', 'themeisle-companion' ) . sprintf( ' <a href="%s" target="_blank">mystock.photos</a>', 'https://mystock.photos' );
51
+ $this->active_default = true;
52
  }
53
 
54
 
113
  if ( $user && isset( $user['nsid'] ) ) {
114
  $photos = $api->people_getPublicPhotos( $user['nsid'], null, 'url_sq, url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l, url_o', self::MAX_IMAGES, $page );
115
  if ( ! empty( $photos ) ) {
116
+ $pages = get_transient( $this->slug . 'photos_' . self::MAX_IMAGES . '_pages' );
117
+ if ( false === $pages ) {
118
+ set_transient( $this->slug . 'photos_' . self::MAX_IMAGES . '_pages', $photos['photos']['pages'], self::CACHE_DAYS * DAY_IN_SECONDS );
119
+ }
120
  $photos = $photos['photos']['photo'];
121
  }
122
  }
213
  $photo = array_filter( $data, function ( $e ) use ( $photo_id ) {
214
  return $e['id'] === $photo_id;
215
  }, true );
216
+ $photo = array_reverse( $photo );
217
+ $photo = array_pop( $photo );
218
  if ( empty( $photo ) ) {
219
  wp_die();
220
  }
294
  'load_more' => esc_html__( 'Loading more photos...', 'themeisle-companion' ),
295
  'tab_name' => esc_html__( 'MyStock Library', 'themeisle-companion' ),
296
  ),
297
+ 'slug' => $this->slug,
298
+ 'pages' => get_transient( $this->slug . 'photos_' . self::MAX_IMAGES . '_pages' ),
299
  ),
300
  );
301
 
obfx_modules/mystock-import/js/admin.js CHANGED
@@ -52,6 +52,9 @@
52
  });
53
  };
54
 
 
 
 
55
  media.view.RemotePhotos = media.View.extend({
56
  tagName: 'div',
57
  className: 'obfx-attachments-browser',
@@ -68,9 +71,11 @@
68
  },
69
 
70
  showSpinner: function(container) {
 
71
  $(container).find('.obfx_spinner').show();
72
  },
73
  hideSpinner: function(container) {
 
74
  $(container).find('.obfx_spinner').hide();
75
  },
76
  loadContent: function(container, frame){
@@ -107,6 +112,14 @@
107
  infiniteScroll : function (container, frame) {
108
  $('#obfx-mystock .obfx-image-list').on('scroll',function() {
109
  if($(this).scrollTop() + $(this).innerHeight() + 10 >= $(this)[0].scrollHeight) {
 
 
 
 
 
 
 
 
110
  frame.showSpinner(container);
111
  $.ajax({
112
  type : 'POST',
@@ -117,11 +130,11 @@
117
  },
118
  url : mystock_import.ajaxurl,
119
  success : function(response) {
 
120
  if( response ) {
121
  var imageList = $('.obfx-image-list');
122
  var listWrapper = $('#obfx-mystock');
123
- var page = listWrapper.data('pagenb');
124
- var nextPage = parseInt(page) + 1;
125
  listWrapper.data('pagenb', nextPage);
126
  imageList.append(response);
127
  }
52
  });
53
  };
54
 
55
+ // ensure only one scroll request is sent at one time.
56
+ var scroll_called = false;
57
+
58
  media.view.RemotePhotos = media.View.extend({
59
  tagName: 'div',
60
  className: 'obfx-attachments-browser',
71
  },
72
 
73
  showSpinner: function(container) {
74
+ $(container).find('.obfx-image-list').addClass('obfx_loading');
75
  $(container).find('.obfx_spinner').show();
76
  },
77
  hideSpinner: function(container) {
78
+ $(container).find('.obfx-image-list').removeClass('obfx_loading');
79
  $(container).find('.obfx_spinner').hide();
80
  },
81
  loadContent: function(container, frame){
112
  infiniteScroll : function (container, frame) {
113
  $('#obfx-mystock .obfx-image-list').on('scroll',function() {
114
  if($(this).scrollTop() + $(this).innerHeight() + 10 >= $(this)[0].scrollHeight) {
115
+ var current_page = parseInt($('#obfx-mystock').data('pagenb'));
116
+ if(parseInt(mystock_import.pages) === current_page){
117
+ return;
118
+ }
119
+ if(scroll_called){
120
+ return;
121
+ }
122
+ scroll_called = true;
123
  frame.showSpinner(container);
124
  $.ajax({
125
  type : 'POST',
130
  },
131
  url : mystock_import.ajaxurl,
132
  success : function(response) {
133
+ scroll_called = false;
134
  if( response ) {
135
  var imageList = $('.obfx-image-list');
136
  var listWrapper = $('#obfx-mystock');
137
+ var nextPage = parseInt(current_page) + 1;
 
138
  listWrapper.data('pagenb', nextPage);
139
  imageList.append(response);
140
  }
obfx_modules/social-sharing/js/admin.js CHANGED
@@ -10,20 +10,26 @@
10
  var obfx_sharing_module_admin = function( $ ) {
11
  'use strict';
12
 
13
- $( function() {
14
- $( '.network-toggle input:checkbox:not(:checked)' ).each( function () {
15
- $( this ).parents( '.obfx-row' ).find( '.show input' ).attr( 'disabled', true ).parent().addClass( 'obfxHiddenOption' );
16
- } );
 
 
 
17
 
18
- $( '.network-toggle input' ).on( 'change', function () {
19
- if ( $( this ).is( ':checked' ) ) {
20
- $( this ).parents( '.obfx-row' ).find( '.show input' ).attr( 'disabled', false ).parent().removeClass( 'obfxHiddenOption' );
21
- } else {
22
- $( this ).parents( '.obfx-row' ).find( '.show input' ).attr( 'disabled', true ).parent().addClass( 'obfxHiddenOption' );
23
- }
24
- } );
 
 
25
 
26
- } );
 
27
 
28
  };
29
 
10
  var obfx_sharing_module_admin = function( $ ) {
11
  'use strict';
12
 
13
+ $(
14
+ function() {
15
+ $( '.network-toggle input:checkbox:not(:checked)' ).each(
16
+ function () {
17
+ $( this ).parents( '.obfx-row' ).find( '.show input' ).attr( 'disabled', true ).parent().addClass( 'obfxHiddenOption' );
18
+ }
19
+ );
20
 
21
+ $( '.network-toggle input' ).on(
22
+ 'change', function () {
23
+ if ( $( this ).is( ':checked' ) ) {
24
+ $( this ).parents( '.obfx-row' ).find( '.show input' ).attr( 'disabled', false ).parent().removeClass( 'obfxHiddenOption' );
25
+ } else {
26
+ $( this ).parents( '.obfx-row' ).find( '.show input' ).attr( 'disabled', true ).parent().addClass( 'obfxHiddenOption' );
27
+ }
28
+ }
29
+ );
30
 
31
+ }
32
+ );
33
 
34
  };
35
 
obfx_modules/social-sharing/js/public.js CHANGED
@@ -10,15 +10,19 @@
10
  var obfx_sharing_module = function( $ ) {
11
  'use strict';
12
 
13
- $( function() {
14
- $( '.obfx-sharing a, .obfx-sharing-inline a' ).not( '.whatsapp, .mail, .viber' ).on( 'click', function(e) {
15
- e.preventDefault();
16
- var link = $( this ).attr( 'href' );
 
 
17
 
18
- window.open( link, 'obfxShareWindow', 'height=450, width=550, top=' + ( $( window ).height() / 2 - 275 ) + ', left=' + ( $( window ).width() / 2 - 225 ) + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0' );
19
- return true;
20
- } );
21
- } );
 
 
22
  };
23
 
24
  obfx_sharing_module( jQuery );
10
  var obfx_sharing_module = function( $ ) {
11
  'use strict';
12
 
13
+ $(
14
+ function() {
15
+ $( '.obfx-sharing a, .obfx-sharing-inline a' ).not( '.whatsapp, .mail, .viber' ).on(
16
+ 'click', function(e) {
17
+ e.preventDefault();
18
+ var link = $( this ).attr( 'href' );
19
 
20
+ window.open( link, 'obfxShareWindow', 'height=450, width=550, top=' + ( $( window ).height() / 2 - 275 ) + ', left=' + ( $( window ).width() / 2 - 225 ) + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0' );
21
+ return true;
22
+ }
23
+ );
24
+ }
25
+ );
26
  };
27
 
28
  obfx_sharing_module( jQuery );
obfx_modules/social-sharing/views/hestia-social-sharing-tpl.php CHANGED
@@ -33,12 +33,7 @@ if ( ! empty( $social_links_array ) ) { ?>
33
  }
34
  ?>
35
  <li class="<?php echo esc_attr( $class ); ?>">
36
- <a rel="tooltip"
37
- data-original-title="<?php echo esc_attr( __( 'Share on ', 'themeisle-companion' ) . $network_data['nicename'] ); ?>"
38
- class = "btn btn-just-icon btn-round btn-<?php echo esc_attr( $network_data['icon'] ); ?>"
39
- <?php echo ( isset( $network_data['target'] ) && $network_data['target'] != '0' ) ? 'target="_blank"' : ''; ?>
40
- href="<?php echo esc_url( $network_data['link'] ); ?>">
41
- <i class="socicon-<?php echo esc_attr( $network_data['icon'] ); ?>"></i>
42
  </a>
43
  </li>
44
  <?php } ?>
33
  }
34
  ?>
35
  <li class="<?php echo esc_attr( $class ); ?>">
36
+ <a rel="tooltip" data-original-title="<?php echo esc_attr( __( 'Share on ', 'themeisle-companion' ) . $network_data['nicename'] ); ?>" class = "btn btn-just-icon btn-round btn-<?php echo esc_attr( $network_data['icon'] ); ?>" <?php echo ( isset( $network_data['target'] ) && $network_data['target'] != '0' ) ? 'target="_blank"' : ''; ?> href="<?php echo esc_url( $network_data['link'] ); ?>"> <i class="socicon-<?php echo esc_attr( $network_data['icon'] ); ?>"></i>
 
 
 
 
 
37
  </a>
38
  </li>
39
  <?php } ?>
obfx_modules/social-sharing/views/social-sharing-tpl.php CHANGED
@@ -35,8 +35,7 @@ if ( ! empty( $social_links_array ) ) { ?>
35
  ?>
36
  <li class="<?php echo esc_attr( $class ); ?>">
37
  <a class = "<?php echo esc_attr( $network_data['icon'] ); ?>"
38
- <?php echo ( isset( $network_data['target'] ) && $network_data['target'] != '0' ) ? 'target="_blank"' : ''; ?>
39
- href="<?php echo esc_url( $network_data['link'] ); ?>">
40
  <i class="socicon-<?php echo esc_attr( $network_data['icon'] ); ?>"></i>
41
  <?php
42
  if ( $show_name ) {
35
  ?>
36
  <li class="<?php echo esc_attr( $class ); ?>">
37
  <a class = "<?php echo esc_attr( $network_data['icon'] ); ?>"
38
+ <?php echo ( isset( $network_data['target'] ) && $network_data['target'] != '0' ) ? 'target="_blank"' : ''; ?> href="<?php echo esc_url( $network_data['link'] ); ?>">
 
39
  <i class="socicon-<?php echo esc_attr( $network_data['icon'] ); ?>"></i>
40
  <?php
41
  if ( $show_name ) {
obfx_modules/stats/js/stats.js CHANGED
@@ -11,53 +11,61 @@
11
  /* global console, Chart, jQuery */
12
  var stats_module = function( $ ) {
13
  'use strict';
14
- $( function() {
15
- if ( $( '#obfxChart' ).length ) {
16
- var myChart;
17
- var ctx = document.getElementById( 'obfxChart' ).getContext( '2d' );
18
- var posts_data = $( '#obfxChart' ).data( 'posts' );
19
- var comments_data = $( '#obfxChart' ).data( 'comments' );
 
20
 
21
- var dataset = [];
22
- if ( typeof posts_data !== 'undefined' ) {
23
- dataset.push( {
24
- label: '# of Posts',
25
- data: posts_data,
26
- backgroundColor: 'rgba( 3, 169, 244, 0.5 )',
27
- borderColor: 'rgba( 3, 169, 244, 1 )',
28
- borderWidth: 1
29
- } );
30
- }
31
-
32
- if ( typeof comments_data !== 'undefined' ) {
33
- dataset.push( {
34
- label: '# of Comments',
35
- data: comments_data,
36
- backgroundColor: 'rgba( 255, 152, 0, 0.5 )',
37
- borderColor: 'rgba( 255, 152, 0, 1 )',
38
- borderWidth: 1
39
- } );
40
- }
41
 
42
- console.log( ctx );
43
- myChart = new Chart(ctx, {
44
- type: 'bar',
45
- data: {
46
- labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
47
- datasets: dataset
48
- },
49
- options: {
50
- scales: {
51
- yAxes: [{
52
- ticks: {
53
- beginAtZero: true
54
  }
55
- }]
56
- }
57
  }
58
- });
59
- }// End if().
60
- } );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  };
63
  stats_module( jQuery );
11
  /* global console, Chart, jQuery */
12
  var stats_module = function( $ ) {
13
  'use strict';
14
+ $(
15
+ function() {
16
+ if ( $( '#obfxChart' ).length ) {
17
+ var myChart;
18
+ var ctx = document.getElementById( 'obfxChart' ).getContext( '2d' );
19
+ var posts_data = $( '#obfxChart' ).data( 'posts' );
20
+ var comments_data = $( '#obfxChart' ).data( 'comments' );
21
 
22
+ var dataset = [];
23
+ if ( typeof posts_data !== 'undefined' ) {
24
+ dataset.push(
25
+ {
26
+ label: '# of Posts',
27
+ data: posts_data,
28
+ backgroundColor: 'rgba( 3, 169, 244, 0.5 )',
29
+ borderColor: 'rgba( 3, 169, 244, 1 )',
30
+ borderWidth: 1
31
+ }
32
+ );
33
+ }
 
 
 
 
 
 
 
 
34
 
35
+ if ( typeof comments_data !== 'undefined' ) {
36
+ dataset.push(
37
+ {
38
+ label: '# of Comments',
39
+ data: comments_data,
40
+ backgroundColor: 'rgba( 255, 152, 0, 0.5 )',
41
+ borderColor: 'rgba( 255, 152, 0, 1 )',
42
+ borderWidth: 1
 
 
 
 
43
  }
44
+ );
 
45
  }
46
+
47
+ console.log( ctx );
48
+ myChart = new Chart(
49
+ ctx, {
50
+ type: 'bar',
51
+ data: {
52
+ labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
53
+ datasets: dataset
54
+ },
55
+ options: {
56
+ scales: {
57
+ yAxes: [{
58
+ ticks: {
59
+ beginAtZero: true
60
+ }
61
+ }]
62
+ }
63
+ }
64
+ }
65
+ );
66
+ }// End if().
67
+ }
68
+ );
69
 
70
  };
71
  stats_module( jQuery );
obfx_modules/template-directory/css/admin.css ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .obfx-template-browser {
2
+ padding: 35px 0 0;
3
+ }
4
+
5
+ .obfx-template-browser .template-name {
6
+ margin: 0;
7
+ padding: 15px;
8
+ font-size: 16px;
9
+ font-weight: 600;
10
+ }
11
+
12
+ .obfx-template {
13
+ float: left;
14
+ position: relative;
15
+ box-sizing: border-box;
16
+ width: 22.7%;
17
+ margin: 0 3% 3% 0;
18
+ border: 1px solid #ddd;
19
+ background: #fff;
20
+ box-shadow: 0 1px 1px -1px rgba(0, 0, 0, 0.1);
21
+ }
22
+
23
+ .obfx-template:nth-child(4n) {
24
+ margin-right: 0;
25
+ }
26
+
27
+ .obfx-template-actions {
28
+ float: right;
29
+ padding: 10px;
30
+ }
31
+
32
+ .obfx-template-actions .button .dashicons {
33
+ line-height: 27px;
34
+ }
35
+
36
+ .obfx-template-actions .button {
37
+ margin-left: 5px;
38
+ }
39
+
40
+ .obfx-template-screenshot {
41
+ display: inline-block;
42
+ overflow: hidden;
43
+ position: relative;
44
+ border: 1px solid #ddd;
45
+ border-right: none;
46
+ border-left: none;
47
+ }
48
+
49
+ .obfx-template img {
50
+ float: left;
51
+ max-width: 100%;
52
+ }
53
+
54
+ .obfx-template-browser.customizer {
55
+ display: block !important;
56
+ padding: 10px 20px 60px;
57
+ }
58
+
59
+ .obfx-custom-customizer #customize-header-actions input.save {
60
+ display: none;
61
+ }
62
+
63
+ .obfx-custom-customizer .control-panel-widgets {
64
+ display: none !important;
65
+ }
66
+
67
+ .obfx-next-prev {
68
+ position: absolute;
69
+ left: 45px;
70
+ }
71
+
72
+ .obfx-next-prev span:hover {
73
+ border-color: #ccc;
74
+ outline: 0;
75
+ color: #000;
76
+ background: #ddd;
77
+ box-shadow: none;
78
+ }
79
+
80
+ .obfx-next-prev .previous-template,
81
+ .obfx-next-prev .next-template {
82
+ display: block;
83
+ float: left;
84
+ position: relative;
85
+ width: 45px;
86
+ height: 45px;
87
+ padding-right: 2px;
88
+ border: none;
89
+ border-right: 1px solid #ddd;
90
+ color: #444;
91
+ background: #eee;
92
+ text-decoration: none;
93
+ cursor: pointer;
94
+ -webkit-transition: color 0.1s ease-in-out,background 0.1s ease-in-out;
95
+ transition: color 0.1s ease-in-out,background 0.1s ease-in-out;
96
+ }
97
+
98
+ .obfx-next-prev .previous-template {
99
+ border-left: 1px solid #ddd;
100
+ }
101
+
102
+ .obfx-next-prev .next-template:before {
103
+ position: relative;
104
+ top: 6px;
105
+ left: 14px;
106
+ font: 400 20px/1 dashicons;
107
+ content: "\f345";
108
+ }
109
+
110
+ .obfx-next-prev .previous-template:before {
111
+ position: relative;
112
+ top: 6px;
113
+ left: 14px;
114
+ font: 400 20px/1 dashicons;
115
+ content: "\f341";
116
+ }
117
+
118
+ .obfx-custom-customizer {
119
+ background: #fff;
120
+ }
121
+
122
+ .obfx-template-browser.customizer .obfx-template {
123
+ display: none;
124
+ float: none;
125
+ width: 100%;
126
+ margin: 0 0 20px 0;
127
+ border: none;
128
+ cursor: default;
129
+ }
130
+
131
+ #customize-controls .obfx-template-actions {
132
+ padding: 0;
133
+ }
134
+
135
+ .obfx-template-browser.customizer .obfx-template.active {
136
+ display: inline-block;
137
+ }
138
+
139
+ .customize-controls-preview-toggle {
140
+ float: left;
141
+ position: relative;
142
+ left: 120px;
143
+ }
144
+
145
+ .obfx-template-browser.customizer .template-name {
146
+ padding-left: 0;
147
+ }
148
+
149
+ .obfx-template-browser.customizer .obfx-template-screenshot {
150
+ border: 1px solid #ddd;
151
+ }
152
+
153
+ .obfx-hide {
154
+ display: none;
155
+ }
156
+
157
+ .obfx-import-elementor-hidden-form {
158
+ display: inline-block;
159
+ }
160
+
161
+ .obfx-done-import {
162
+ margin: 0 10px;
163
+ color: green;
164
+ }
165
+
166
+ .obfx-done-import .dashicons {
167
+ font-size: 30px;
168
+ }
169
+
170
+ #customize-controls .obfx-done-import .dashicons {
171
+ line-height: 50px;
172
+ }
173
+
174
+ .obfx-updating.updating-message.button.button-primary {
175
+ padding: 0 4px 0 10px;
176
+ }
177
+
178
+ #customize-header-actions .button.obfx-import-template,
179
+ #customize-header-actions .button.obfx-updating {
180
+ float: right;
181
+ margin-top: 8px;
182
+ }
183
+
184
+ .obfx-no-elementor-modal-wrapper {
185
+ display: none;
186
+ position: fixed;
187
+ z-index: 900000;
188
+ top: 0;
189
+ right: 0;
190
+ bottom: 0;
191
+ left: 0;
192
+ margin: 0 auto;
193
+ background: rgba(0, 0, 0, 0.8);
194
+ }
195
+
196
+ .obfx-no-elementor-modal {
197
+ position: relative;
198
+ top: 50%;
199
+ width: auto;
200
+ max-width: 550px;
201
+ margin: 0 auto;
202
+ padding: 20px;
203
+ background-color: #fff;
204
+ text-align: right;
205
+ -webkit-transform: translateY(-50%);
206
+ -ms-transform: translateY(-50%);
207
+ transform: translateY(-50%);
208
+ }
209
+
210
+ .obfx-no-elementor-modal p {
211
+ margin: 30px 0 20px;
212
+ text-align: left;
213
+ }
214
+
215
+ .obfx-no-elementor-modal .modal-header {
216
+ display: inline-block;
217
+ position: absolute;
218
+ top: 0;
219
+ left: 0;
220
+ width: 100%;
221
+ height: 30px;
222
+ border-bottom: 1px solid #d4d4d4;
223
+ background: #e6e6e6;
224
+ }
225
+
226
+ .obfx-close-modal {
227
+ float: right;
228
+ position: absolute;
229
+ top: 5px;
230
+ right: 5px;
231
+ color: #7b7b7b;
232
+ cursor: pointer;
233
+ }
obfx_modules/template-directory/inc/class-obfx-template-directory-customizer-section.php ADDED
@@ -0,0 +1,122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Orbit fox template directory customizer section.
4
+ *
5
+ * @package Orbit_Fox_Modules
6
+ * @subpackage Orbit_Fox_Modules/template-directory
7
+ */
8
+
9
+ /**
10
+ * The Orbit Fox Template Directory Customizer Section.
11
+ *
12
+ * @link https://themeisle.com
13
+ * @since 1.0.0
14
+ *
15
+ * @package Template_Directory_OBFX_Module
16
+ */
17
+ class OBFX_Template_Directory_Customizer_Section extends WP_Customize_Section {
18
+
19
+ /**
20
+ * The type of customize section being rendered.
21
+ *
22
+ * @since 1.0.0
23
+ * @access public
24
+ * @var string
25
+ */
26
+ public $type = 'obfx-template-directory-section';
27
+
28
+ /**
29
+ * OBFX Module Directory
30
+ *
31
+ * @since 1.0.0
32
+ * @access private
33
+ *
34
+ * @var string
35
+ */
36
+ private $module_dir = '';
37
+
38
+ /**
39
+ * Templates list.
40
+ *
41
+ * @var array
42
+ */
43
+ private $templates = array();
44
+
45
+ /**
46
+ * The previewed template slug.
47
+ *
48
+ * @var string
49
+ */
50
+ private $called_template = '';
51
+
52
+ /**
53
+ * The tempalte to render required plugins install button.
54
+ *
55
+ * @var string
56
+ */
57
+ private $required_plugins = '';
58
+
59
+ /**
60
+ * Hestia_Hiding_Section constructor.
61
+ *
62
+ * @param WP_Customize_Manager $manager Customizer Manager.
63
+ * @param string $id Control id.
64
+ * @param array $args Arguments.
65
+ */
66
+ public function __construct( WP_Customize_Manager $manager, $id, array $args = array() ) {
67
+ parent::__construct( $manager, $id, $args );
68
+ $this->module_dir = $args['module_directory'];
69
+
70
+ add_action( 'customize_controls_init', array( $this, 'enqueue' ) );
71
+
72
+ if ( ! empty( $args['templates'] ) ) {
73
+ $this->templates = $args['templates'];
74
+ }
75
+ if ( ! empty( $args['requires_plugins'] ) ) {
76
+ $this->required_plugins = $args['requires_plugins'];
77
+ }
78
+
79
+ $this->called_template = isset( $_GET['obfx_template_id'] ) ? $_GET['obfx_template_id'] : '';
80
+ }
81
+
82
+ /**
83
+ * Enqueue scripts designated for this control.
84
+ */
85
+ public function enqueue() {
86
+ wp_enqueue_script( 'obfx-template-dir-script', $this->module_dir . 'template-directory/js/customizer.js', array( 'jquery', 'customize-preview' ), '1.0.0', true );
87
+ }
88
+
89
+ /**
90
+ * Outputs the Underscore.js template.
91
+ *
92
+ * @since 1.1.47
93
+ * @access public
94
+ * @return void
95
+ */
96
+ protected function render() {
97
+ $html = '';
98
+ if ( ! empty( $this->templates ) ) {
99
+ $html .= '<div class="obfx-template-browser customizer">';
100
+ foreach ( $this->templates as $template => $properties ) {
101
+ $active = '';
102
+ if ( $template === $this->called_template ) {
103
+ $active = ' active';
104
+ }
105
+ $html .= '<div class="obfx-template' . esc_attr( $active ) . '" data-demo-url="' . esc_url( $properties['demo_url'] ) . '" data-slug="' . $template . '" data-template-file="' . esc_url( $properties['import_file'] ) . '">';
106
+ $html .= '<h2 class="template-name template-header">' . esc_html( $properties['title'] ) . '</h2>';
107
+ $html .= '<div class="obfx-template-screenshot">';
108
+ $html .= '<img src="' . esc_url( $properties['screenshot'] ) . '" alt="' . esc_html( $properties['title'] ) . '">';
109
+ $html .= '</div>';
110
+ $html .= '<div class="obfx-template-details">';
111
+ $html .= '<p>' . esc_html( $properties['description'] ) . '</p>';
112
+ $html .= '</div>'; // .obfx-template-details
113
+ $html .= '</div>'; // .obfx-template
114
+ }
115
+ if ( ! empty( $this->required_plugins ) ) {
116
+ $html .= $this->required_plugins;
117
+ }
118
+ $html .= '</div>'; // .obfx-template-browser
119
+ }
120
+ echo $html;
121
+ }
122
+ }
obfx_modules/template-directory/init.php ADDED
@@ -0,0 +1,475 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * The Orbit Fox Template Directory Module.
5
+ *
6
+ * @link https://themeisle.com
7
+ * @since 1.0.0
8
+ *
9
+ * @package Template_Directory_OBFX_Module
10
+ */
11
+
12
+ use Elementor\TemplateLibrary\Classes;
13
+
14
+ /**
15
+ * The class defines a new module to be used by Orbit Fox plugin.
16
+ *
17
+ * @package Template_Directory_OBFX_Module
18
+ * @author Themeisle <friends@themeisle.com>
19
+ */
20
+ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
21
+
22
+ /**
23
+ * Template_Directory_OBFX_Module constructor.
24
+ *
25
+ * @since 1.0.0
26
+ * @access public
27
+ */
28
+ public function __construct() {
29
+ parent::__construct();
30
+ $this->name = __( 'Template Directory Module', 'themeisle-companion' );
31
+ $this->description = __( 'The awesome template directory is aiming to provide a wide range of templates that you can import straight into your website.', 'themeisle-companion' );
32
+ $this->active_default = true;
33
+ }
34
+
35
+ /**
36
+ * Determine if module should be loaded.
37
+ *
38
+ * @since 1.0.0
39
+ * @access public
40
+ * @return bool
41
+ */
42
+ public function enable_module() {
43
+ return true;
44
+ }
45
+
46
+ /**
47
+ * The loading logic for the module.
48
+ *
49
+ * @since 1.0.0
50
+ * @access public
51
+ */
52
+ public function load() {
53
+ return true;
54
+ }
55
+
56
+ /**
57
+ * Method to define hooks needed.
58
+ *
59
+ * @since 1.0.0
60
+ * @access public
61
+ */
62
+ public function hooks() {
63
+ $this->loader->add_action( 'rest_api_init', $this, 'register_endpoints' );
64
+ //Add dashboard menu page.
65
+ $this->loader->add_action( 'admin_menu', $this, 'add_menu_page', 100 );
66
+ //Add rewrite endpoint.
67
+ $this->loader->add_action( 'init', $this, 'demo_listing_register' );
68
+ //Add template redirect.
69
+ $this->loader->add_action( 'template_redirect', $this, 'demo_listing' );
70
+ //Remove customizer controls.
71
+ $this->loader->add_action( 'customize_register', $this, 'adjust_customizer', 1000 );
72
+ //Enqueue admin scripts.
73
+ $this->loader->add_action( 'admin_enqueue_scripts', $this, 'enqueue_template_dir_scripts' );
74
+ $this->loader->add_action( 'customize_controls_enqueue_scripts', $this, 'enqueue_template_dir_scripts' );
75
+ }
76
+
77
+ /**
78
+ * Enqueue the scripts for the dashboard page of the
79
+ */
80
+ public function enqueue_template_dir_scripts() {
81
+ $current_screen = get_current_screen();
82
+ if ( $current_screen->id == 'orbit-fox_page_obfx_template_dir' || $this->is_template_dir_customize() ) {
83
+ $script_handle = $this->slug . '-script';
84
+ if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
85
+ wp_enqueue_script( 'plugin-install' );
86
+ wp_enqueue_script( 'updates' );
87
+ }
88
+ wp_register_script( $script_handle, plugin_dir_url( $this->get_dir() ) . $this->slug . '/js/script.js', array( 'jquery' ), $this->version );
89
+ wp_localize_script( $script_handle, 'importer_endpoint',
90
+ array(
91
+ 'url' => $this->get_endpoint_url( '/import_elementor' ),
92
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
93
+ ) );
94
+ wp_enqueue_script( $script_handle );
95
+ }
96
+ }
97
+
98
+ /**
99
+ *
100
+ *
101
+ * @param string $path
102
+ *
103
+ * @return string
104
+ */
105
+ public function get_endpoint_url( $path = '' ) {
106
+ return rest_url( $this->slug . $path );
107
+ }
108
+
109
+ /**
110
+ * Method that returns an array of scripts and styles to be loaded
111
+ * for the front end part.
112
+ *
113
+ * @since 1.0.0
114
+ * @access public
115
+ * @return array
116
+ */
117
+ public function public_enqueue() {
118
+ return array();
119
+ }
120
+
121
+ /**
122
+ * Method that returns an array of scripts and styles to be loaded
123
+ * for the admin part.
124
+ *
125
+ * @since 1.0.0
126
+ * @access public
127
+ * @return array|boolean
128
+ */
129
+ public function admin_enqueue() {
130
+ $current_screen = get_current_screen();
131
+ if ( ! isset( $current_screen->id ) ) {
132
+ return array();
133
+ }
134
+
135
+ if ( ! ( $current_screen->id == 'orbit-fox_page_obfx_template_dir' ) && ( ! $current_screen == 'customize' ) ) {
136
+ return array();
137
+ }
138
+
139
+ $enqueue = array(
140
+ 'css' => array(
141
+ 'admin' => array(),
142
+ ),
143
+ );
144
+
145
+ if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
146
+ $enqueue['js'] = array(
147
+ 'plugin-install-helper' => array( 'jquery' ),
148
+ );
149
+ }
150
+
151
+ return $enqueue;
152
+ }
153
+
154
+ /**
155
+ * Register Rest endpoint for requests.
156
+ */
157
+ public function register_endpoints() {
158
+ register_rest_route( $this->slug, '/import_elementor', array(
159
+ 'methods' => 'POST',
160
+ 'callback' => array( $this, 'import_elementor' ),
161
+ ) );
162
+ }
163
+
164
+ /**
165
+ * Remove the customizer controls and add the template listing control.
166
+ */
167
+ public function adjust_customizer( $wp_customize ) {
168
+
169
+ if ( ! $this->is_template_dir_customize() ) {
170
+ return;
171
+ }
172
+ add_filter( 'customize_loaded_components', '__return_empty_array' );
173
+
174
+ //Remove all customizer sections and panels except 'obfx-templates'.
175
+ foreach ( $wp_customize->sections() as $section ) {
176
+ if ( $section->id !== 'obfx-templates' ) {
177
+ $wp_customize->remove_section( $section->id );
178
+ }
179
+ }
180
+ foreach ( $wp_customize->panels() as $panel ) {
181
+ if ( $panel->id !== 'widgets' && $panel->id !== 'nav_menus' ) {
182
+ $wp_customize->remove_panel( $panel->id );
183
+ }
184
+ }
185
+
186
+ //Get the module directory to later pass it for scripts enqueueing in the Orbit Fox customizer section.
187
+ $module_directory = $this->get_dir();
188
+
189
+ //Include the customizer section custom class and add the section.
190
+ require_once( $module_directory . '/inc/class-obfx-template-directory-customizer-section.php' );
191
+ if ( class_exists( 'OBFX_Template_Directory_Customizer_Section' ) ) {
192
+ $wp_customize->add_section(
193
+ new OBFX_Template_Directory_Customizer_Section(
194
+ $wp_customize, 'obfx-templates', array(
195
+ 'priority' => 0,
196
+ 'module_directory' => plugin_dir_url( $this->get_dir() ),
197
+ 'templates' => $this->templates_list(),
198
+ 'requires_plugins' => $this->render_view( 'template-plugin-install' ),
199
+ )
200
+ )
201
+ );
202
+ }
203
+
204
+ }
205
+
206
+ /**
207
+ * Utility method to check if it's the customizer instance for the Template Directory Preview.
208
+ *
209
+ * @return bool
210
+ */
211
+ public function is_template_dir_customize() {
212
+ //Check the URL parameter and bail if not on 'obfx_templates'.
213
+ $current = urldecode( isset( $_GET['url'] ) ? $_GET['url'] : '' );
214
+ $flag = add_query_arg( 'obfx_templates', '', trailingslashit( home_url() ) );
215
+ $current = str_replace( '/', '', $current );
216
+ $flag = str_replace( '/', '', $flag );
217
+ if ( $flag !== $current ) {
218
+ return false;
219
+ }
220
+
221
+ return true;
222
+ }
223
+
224
+ /**
225
+ * The templates list.
226
+ *
227
+ * @return array
228
+ */
229
+ public function templates_list() {
230
+ $repository_raw_url = 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/';
231
+ $defaults_if_empty = array(
232
+ 'title' => __( 'A new Orbit Fox Template', 'themeisle-companion' ),
233
+ 'screenshot' => esc_url( 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/placeholder.png' ),
234
+ 'description' => __( 'This is an awesome Orbit Fox Template.', 'themeisle-companion' ),
235
+ 'demo_url' => esc_url( 'https://demo.themeisle.com/hestia-pro-demo-content/demo-placeholder/' ),
236
+ 'import_file' => '',
237
+ );
238
+
239
+ $templates_list = array(
240
+ 'about-our-business-elementor' => array(
241
+ 'title' => __( 'About Our Business', 'themeisle-companion' ),
242
+ 'description' => __( 'A fancy description here', 'themeisle-companion' ),
243
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/about-our-business-elementor/',
244
+ 'screenshot' => esc_url( $repository_raw_url . 'about-our-business-elementor/screenshot.png' ),
245
+ 'import_file' => esc_url( $repository_raw_url . 'about-our-business-elementor/template.json' ),
246
+ ),
247
+ 'contact-us-elementor' => array(
248
+ 'title' => __( 'Contact Us', 'themeisle-companion' ),
249
+ 'description' => __( 'A fancy description here', 'themeisle-companion' ),
250
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/contact-us-elementor/',
251
+ 'screenshot' => esc_url( $repository_raw_url . 'contact-us-elementor/screenshot.png' ),
252
+ 'import_file' => esc_url( $repository_raw_url . 'contact-us-elementor/template.json' ),
253
+ ),
254
+ 'pricing-elementor' => array(
255
+ 'title' => __( 'Pricing', 'themeisle-companion' ),
256
+ 'description' => __( 'A fancy description here', 'themeisle-companion' ),
257
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pricing-elementor/',
258
+ 'screenshot' => esc_url( $repository_raw_url . 'pricing-elementor/screenshot.png' ),
259
+ 'import_file' => esc_url( $repository_raw_url . 'pricing-elementor/template.json' ),
260
+ ),
261
+ );
262
+
263
+ foreach ( $templates_list as $template => $properties ) {
264
+ $templates_list[ $template ] = wp_parse_args( $properties, $defaults_if_empty );
265
+ }
266
+
267
+ return $templates_list;
268
+ }
269
+
270
+ /**
271
+ * Register endpoint for themes page.
272
+ */
273
+ public function demo_listing_register() {
274
+ add_rewrite_endpoint( 'obfx_templates', EP_ROOT );
275
+ }
276
+
277
+ /**
278
+ * Return template preview in customizer.
279
+ *
280
+ * @return bool|string
281
+ */
282
+ public function demo_listing() {
283
+ $flag = get_query_var( 'obfx_templates', false );
284
+
285
+ if ( $flag !== '' ) {
286
+ return false;
287
+ }
288
+ if ( ! current_user_can( 'customize' ) ) {
289
+ return false;
290
+ }
291
+ if ( ! is_customize_preview() ) {
292
+ return false;
293
+ }
294
+
295
+ return $this->render_view( 'template-directory-render-template' );
296
+ }
297
+
298
+ /**
299
+ * Add the 'Template Directory' page to the dashboard menu.
300
+ */
301
+ public function add_menu_page() {
302
+ add_submenu_page(
303
+ 'obfx_companion', __( 'Orbit Fox Template Directory', 'themeisle-companion' ), __( 'Template Directory', 'themeisle-companion' ), 'manage_options', 'obfx_template_dir',
304
+ array( $this, 'render_admin_page' )
305
+ );
306
+ }
307
+
308
+ /**
309
+ * Render the template directory admin page.
310
+ */
311
+ public function render_admin_page() {
312
+ $data = array(
313
+ 'templates_array' => $this->templates_list(),
314
+ 'requires_plugins' => $this->render_view( 'template-plugin-install' )
315
+ );
316
+ echo $this->render_view( 'template-directory-page', $data );
317
+ }
318
+
319
+ /**
320
+ * Utility method to call Elementor import routine.
321
+ */
322
+ public function import_elementor() {
323
+ if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
324
+ return 'no-elementor';
325
+ }
326
+
327
+ require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
328
+ require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
329
+
330
+ $template = download_url( esc_url( $_POST['template_url'] ) );
331
+ $_FILES['file']['tmp_name'] = $template;
332
+ $elementor = new Elementor\TemplateLibrary\Source_Local;
333
+ $elementor->import_template();
334
+ unlink( $template );
335
+
336
+ $args = array(
337
+ 'post_type' => 'elementor_library',
338
+ 'nopaging' => true,
339
+ 'posts_per_page' => '1',
340
+ 'orderby' => 'date',
341
+ 'order' => 'DESC',
342
+ 'suppress_filters' => true,
343
+ );
344
+
345
+ $query = new WP_Query( $args );
346
+
347
+ $last_template_added = $query->posts[0];
348
+ //get template id
349
+ $template_id = $last_template_added->ID;
350
+
351
+ wp_reset_query();
352
+ wp_reset_postdata();
353
+
354
+ //page content
355
+ $page_content = $last_template_added->post_content;
356
+ //meta fields
357
+ $elementor_data_meta = get_post_meta( $template_id, '_elementor_data' );
358
+ $elementor_ver_meta = get_post_meta( $template_id, '_elementor_version' );
359
+ $elementor_edit_mode_meta = get_post_meta( $template_id, '_elementor_edit_mode' );
360
+ $elementor_css_meta = get_post_meta( $template_id, '_elementor_css' );
361
+
362
+ $elementor_metas = array(
363
+ '_elementor_data' => ! empty( $elementor_data_meta[0] ) ? wp_slash( $elementor_data_meta[0] ) : '',
364
+ '_elementor_version' => ! empty( $elementor_ver_meta[0] ) ? $elementor_ver_meta[0] : '',
365
+ '_elementor_edit_mode' => ! empty( $elementor_edit_mode_meta[0] ) ? $elementor_edit_mode_meta[0] : '',
366
+ '_elementor_css' => $elementor_css_meta,
367
+ );
368
+
369
+ // Create post object
370
+ $new_template_page = array(
371
+ 'post_type' => 'page',
372
+ 'post_title' => $_POST['template_name'],
373
+ 'post_status' => 'publish',
374
+ 'post_content' => $page_content,
375
+ 'meta_input' => $elementor_metas,
376
+ );
377
+
378
+ $current_theme = wp_get_theme();
379
+ switch ( $current_theme->get_template() ) {
380
+ case 'hestia-pro':
381
+ case 'hestia':
382
+ $new_template_page['page_template'] = 'page-templates/template-pagebuilder-full-width.php';
383
+ break;
384
+ case 'zerif-lite':
385
+ case 'zerif-pro':
386
+ $new_template_page['page_template'] = 'template-fullwidth-no-title.php';
387
+ break;
388
+ }
389
+
390
+ $post_id = wp_insert_post( $new_template_page );
391
+
392
+ $redirect_url = add_query_arg( array(
393
+ 'post' => $post_id,
394
+ 'action' => 'elementor',
395
+ ), admin_url( 'post.php' ) );
396
+
397
+ return ( $redirect_url );
398
+
399
+ die();
400
+ }
401
+
402
+ /**
403
+ * Options array for the Orbit Fox module.
404
+ *
405
+ * @return array
406
+ */
407
+ public function options() {
408
+ return array();
409
+ }
410
+
411
+ /**
412
+ * Generate action button html.
413
+ *
414
+ * @param string $slug plugin slug.
415
+ *
416
+ * @return string
417
+ */
418
+ public function get_button_html( $slug ) {
419
+ $button = '';
420
+ $state = $this->check_plugin_state( $slug );
421
+ if ( ! empty( $slug ) ) {
422
+ switch ( $state ) {
423
+ case 'install':
424
+ $nonce = wp_nonce_url(
425
+ add_query_arg(
426
+ array(
427
+ 'action' => 'install-plugin',
428
+ 'from' => 'import',
429
+ 'plugin' => $slug,
430
+ ),
431
+ network_admin_url( 'update.php' )
432
+ ),
433
+ 'install-plugin_' . $slug
434
+ );
435
+ $button .= '<a data-slug="' . $slug . '" class="install-now obfx-install-plugin button button-primary" href="' . esc_url( $nonce ) . '" data-name="' . $slug . '" aria-label="Install ' . $slug . '">' . __( 'Install and activate', 'themeisle-companion' ) . '</a>';
436
+ break;
437
+ case 'activate':
438
+ $plugin_link_suffix = $slug . '/' . $slug . '.php';
439
+ $nonce = add_query_arg(
440
+ array(
441
+ 'action' => 'activate',
442
+ 'plugin' => rawurlencode( $plugin_link_suffix ),
443
+ 'plugin_status' => 'all',
444
+ 'paged' => '1',
445
+ '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_link_suffix ),
446
+ ), network_admin_url( 'plugins.php' )
447
+ );
448
+ $button .= '<a data-slug="' . $slug . '" class="activate-now button button-primary" href="' . esc_url( $nonce ) . '" aria-label="Activate ' . $slug . '">' . __( 'Activate', 'themeisle-companion' ) . '</a>';
449
+ break;
450
+ }// End switch().
451
+ }// End if().
452
+ return $button;
453
+ }
454
+
455
+ /**
456
+ * Check plugin state.
457
+ *
458
+ * @param string $slug plugin slug.
459
+ *
460
+ * @return bool
461
+ */
462
+ public function check_plugin_state( $slug ) {
463
+ if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/' . $slug . '.php' ) || file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/index.php' ) ) {
464
+ require_once( ABSPATH . 'wp-admin' . '/includes/plugin.php' );
465
+ $needs = ( is_plugin_active( $slug . '/' . $slug . '.php' ) ||
466
+ is_plugin_active( $slug . '/index.php' ) ) ?
467
+ 'deactivate' : 'activate';
468
+
469
+ return $needs;
470
+ } else {
471
+ return 'install';
472
+ }
473
+ }
474
+
475
+ }
obfx_modules/template-directory/js/customizer.js ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*exported obfxHandleChange */
2
+
3
+ /**
4
+ * Template Directory Customizer Public Script
5
+ *
6
+ * This handles the customizer.
7
+ *
8
+ * @since 1.0.0
9
+ * @package obfx_modules/template-directory/js
10
+ *
11
+ * @author ThemeIsle
12
+ */
13
+
14
+ var obfx_template_directory_previewer = function( $ ) {
15
+ 'use strict';
16
+
17
+ $(
18
+ function () {
19
+ $( 'head title' ).html( 'Orbit Fox Template Preview' );
20
+ $( '.wp-full-overlay-sidebar' ).addClass( 'obfx-custom-customizer' );
21
+ var importBtn = '<span class="obfx-import-template button button-primary" href="#">Import</span>';
22
+ $( '.customize-controls-preview-toggle .controls' ).html( 'Templates' );
23
+ // Remove Save Button
24
+ $( 'input.save, .customize-info, #accordion-panel-widgets, .customize-save-button-wrapper, .customize-control-notifications-container' ).remove();
25
+ $( '.wp-full-overlay-sidebar-content' ).removeAttr('style');
26
+ $( '#customize-header-actions' ).prepend( importBtn ).append( '<div class="obfx-next-prev"><span onclick="obfxHandleChange(\'prev\');" class="previous-template"></span><span onclick="obfxHandleChange(\'next\');" class="next-template"></span></div>' );
27
+ $( '#customize-preview' ).remove();
28
+ var previewUrl = $( '.obfx-template.active' ).data( 'demo-url' );
29
+ var newFrame = '<div id="customize-preview" class="wp-full-overlay-main"><iframe src="' + previewUrl + '" title="OBFX Template Preview" name="customize-preview-obfx-template"></iframe></div>';
30
+ $( '.obfx-custom-customizer' ).after( newFrame );
31
+ changeButtonProps();
32
+ }
33
+ );
34
+ };
35
+
36
+ obfx_template_directory_previewer( jQuery );
37
+
38
+ function obfxHandleChange(direction) {
39
+ 'use strict';
40
+ var active = jQuery( '.obfx-template.active' ).removeClass( 'active' );
41
+ direction = direction || 'next';
42
+ if (direction === 'next') {
43
+ if (active.next() && active.next().length) {
44
+ active.next().addClass( 'active' );
45
+ } else {
46
+ active.siblings( ':first' ).addClass( 'active' );
47
+ }
48
+ }
49
+ if (direction === 'prev') {
50
+ if (active.prev() && active.prev().length) {
51
+ active.prev().addClass( 'active' );
52
+ } else {
53
+ active.siblings( ':last' ).addClass( 'active' );
54
+ }
55
+ }
56
+ changePreviewSource();
57
+ }
58
+
59
+ function changePreviewSource() {
60
+ var previewUrl = jQuery( '.obfx-template.active' ).data( 'demo-url' );
61
+ jQuery( '#customize-preview iframe' ).attr( 'src', previewUrl );
62
+ changeButtonProps();
63
+ }
64
+
65
+ function changeButtonProps() {
66
+ var templateFileUrl = jQuery( '.obfx-template.active' ).data( 'template-file' );
67
+ var importBtn = '<span class="obfx-import-template button button-primary" href="#">Import</span>';
68
+
69
+ jQuery( '.obfx-done-import' ).replaceWith( importBtn );
70
+ jQuery( '.obfx-import-template.button' ).attr( 'data-template-file', templateFileUrl );
71
+ }
obfx_modules/template-directory/js/plugin-install-helper.js ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ var obfx_plugin_install_helper = function( $ ) {
2
+ 'use strict';
3
+ $(
4
+ function () {
5
+
6
+ $( 'body' ).on(
7
+ 'click', ' .obfx-install-plugin ', function () {
8
+ var slug = $( this ).attr( 'data-slug' );
9
+ wp.updates.installPlugin(
10
+ {
11
+ slug: slug
12
+ }
13
+ );
14
+ return false;
15
+ }
16
+ );
17
+
18
+ $( '.obfx-close-modal' ).on(
19
+ 'click', function () {
20
+ $( '.obfx-no-elementor-modal-wrapper' ).fadeOut();
21
+ }
22
+ );
23
+ }
24
+ );
25
+
26
+ // Remove activate button and replace with activation in progress button.
27
+ $( document ).on(
28
+ 'DOMNodeInserted','.activate-now', function () {
29
+ var activateButton = $( '.obfx-no-elementor-modal-wrapper .activate-now' );
30
+ if (activateButton.length) {
31
+ var url = $( activateButton ).attr( 'href' );
32
+ if (typeof url !== 'undefined') {
33
+ // Request plugin activation.
34
+ $.ajax(
35
+ {
36
+ beforeSend: function () {
37
+ $( activateButton ).replaceWith( '<a class="button updating-message">Activating...</a>' );
38
+ },
39
+ async: true,
40
+ type: 'GET',
41
+ url: url,
42
+ success: function () {
43
+ $( '.obfx-no-elementor-modal-wrapper' ).fadeOut();
44
+ $( '.obfx-import-queue' ).trigger( 'click' );
45
+
46
+ }
47
+ }
48
+ );
49
+ }
50
+ }
51
+ }
52
+ );
53
+ };
54
+
55
+ obfx_plugin_install_helper( jQuery );
obfx_modules/template-directory/js/script.js ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global importer_endpoint, console */
2
+
3
+ /**
4
+ * Template Directory Customizer Admin Dashboard Script
5
+ *
6
+ * This handles the template directory.
7
+ *
8
+ * @since 1.0.0
9
+ * @package obfx_modules/template-directory/js
10
+ *
11
+ * @author ThemeIsle
12
+ */
13
+
14
+ var obfx_template_directory = function( $ ) {
15
+ 'use strict';
16
+
17
+ $(
18
+ function () {
19
+ $( '.obfx-template-actions, #customize-header-actions' ).on(
20
+ 'click', '.obfx-import-template', function () {
21
+ $( this ).addClass( 'obfx-import-queue' );
22
+ var template_url = $( this ).data( 'template-file' );
23
+ var template_name = get_the_template_name( this );
24
+ $( this ).hide().after( '<span class="button button-primary obfx-updating updating-message"></span>' );
25
+ $.ajax(
26
+ {
27
+ url: importer_endpoint.url,
28
+ beforeSend: function ( xhr ) {
29
+ xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
30
+ },
31
+ async: true,
32
+ data: {
33
+ template_url: template_url,
34
+ template_name: template_name
35
+ },
36
+ type: 'POST',
37
+ success: function ( data ) {
38
+ if (data !== 'no-elementor') {
39
+ $( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import" style="float:right"><i class="dashicons-yes dashicons"></i></span>' );
40
+ location.href = data;
41
+ } else {
42
+ $( '.obfx-import-template' ).show();
43
+ $( '.obfx-updating' ).remove();
44
+ $( '.obfx-no-elementor-modal-wrapper' ).fadeIn();
45
+ }
46
+ },
47
+ error: function ( error ) {
48
+ console.error( error );
49
+ }
50
+ }, 'json'
51
+ );
52
+ }
53
+ );
54
+ }
55
+ );
56
+ };
57
+
58
+ obfx_template_directory( jQuery );
59
+
60
+ function get_the_template_name( button ) {
61
+ if ( jQuery( 'body' ).hasClass( 'tools_page_obfx_template_dir' ) ) {
62
+ return jQuery( button ).parent().prev().prev().text();
63
+ }
64
+ return jQuery( '.obfx-template.active .template-name' ).text();
65
+ }
obfx_modules/template-directory/views/template-directory-page-tpl.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The View for Rendering the Template Directory Main Dashboard Page.
4
+ *
5
+ * @link https://themeisle.com
6
+ * @since 2.0.0
7
+ *
8
+ * @package Orbit_Fox_Modules
9
+ * @subpackage Orbit_Fox_Modules/template-directory
10
+ * @codeCoverageIgnore
11
+ */
12
+
13
+ $preview_url = add_query_arg( 'obfx_templates', '', home_url() ); // Define query arg for custom endpoint.
14
+
15
+ $html = '';
16
+
17
+ if ( is_array( $templates_array ) ) {
18
+ $html .= '<div class="obfx-template-dir wrap">';
19
+ $html .= '<h1 class="wp-heading-inline">' . __( 'Orbit Fox Template Directory', 'themeisle-companion' ) . '</h1>';
20
+ $html .= '<div class="obfx-template-browser">';
21
+
22
+ foreach ( $templates_array as $template => $properties ) {
23
+ $admin_url = admin_url() . 'customize.php';
24
+ $customizer_url = add_query_arg(
25
+ array(
26
+ 'url' => urlencode( $preview_url ),
27
+ 'return' => admin_url() . 'admin.php?page=obfx_template_dir',
28
+ 'obfx_template_id' => esc_html( $template ),
29
+ ), $admin_url
30
+ );
31
+
32
+ $html .= '<div class="obfx-template">';
33
+ $html .= '<h2 class="template-name template-header">' . esc_html( $properties['title'] ) . '</h2>';
34
+ $html .= '<div class="obfx-template-screenshot">';
35
+ $html .= '<img src="' . esc_url( $properties['screenshot'] ) . '" alt="' . esc_html( $properties['title'] ) . '" >';
36
+ $html .= '</div>'; // .obfx-template-screenshot
37
+
38
+ $html .= '<div class="obfx-template-actions">';
39
+ if ( ! empty( $properties['demo_url'] ) ) {
40
+ $html .= '<a class="button obfx-preview-template" href="' . esc_url( $customizer_url ) . '" >' . __( 'Preview', 'themeisle-companion' ) . '</a>';
41
+ }
42
+
43
+ if ( ! empty( $properties['import_file'] ) ) {
44
+ $html .= '<a class="button button-primary obfx-import-template" data-template-file="' . esc_url( $properties['import_file'] ) . '"> ' . __( 'Import', 'themeisle-companion' ) . '</a>';
45
+ }
46
+ $html .= '</div>'; // .obfx-template-actions
47
+ $html .= '</div>'; // .obfx-template
48
+ }
49
+ $html .= '</div>'; // .obfx-template-browser
50
+ $html .= '</div>'; // .obfx-template-dir
51
+ $html .= '<div class="wp-clearfix clearfix"></div>';
52
+ if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
53
+ $html .= $requires_plugins;
54
+ }
55
+ }
56
+
57
+ echo $html;
obfx_modules/template-directory/views/template-directory-render-template-tpl.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The View for Rendering the Template Directory Main Dashboard Page.
4
+ *
5
+ * @link https://themeisle.com
6
+ * @since 2.0.0
7
+ *
8
+ * @package Orbit_Fox_Modules
9
+ * @subpackage Orbit_Fox_Modules/template-directory
10
+ * @codeCoverageIgnore
11
+ */
12
+
13
+ die();
obfx_modules/template-directory/views/template-plugin-install-tpl.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The View for Rendering the Plugin install modal.
4
+ *
5
+ * @link https://themeisle.com
6
+ * @since 2.0.0
7
+ *
8
+ * @package Orbit_Fox_Modules
9
+ * @subpackage Orbit_Fox_Modules/template-directory
10
+ * @codeCoverageIgnore
11
+ */
12
+
13
+ if ( ( $this->check_plugin_state( 'elementor' ) === 'activate' ) || ( $this->check_plugin_state( 'elementor' ) === 'install' ) ) {
14
+ $html = '';
15
+ $button = $this->get_button_html( 'elementor' );
16
+ $html .= '<div class="obfx-no-elementor-modal-wrapper"><div class="obfx-no-elementor-modal plugin-card-elementor">';
17
+ $html .= '<div class="modal-header"><span class="obfx-close-modal"><i class="dashicons dashicons-no"></i></span></div>';
18
+ $html .= '<p>' . __( 'In order to import this template, you must have Elementor Page Builder installed. Click the button below to install and activate now.', 'themeisle-companion' ) . '</p>';
19
+ $html .= $button;
20
+ $html .= '</div>';
21
+
22
+ echo $html;
23
+ }
readme.md CHANGED
@@ -86,6 +86,15 @@ Activating the Orbit Fox Companion plugin is just like any other plugin. If you'
86
  3. Screenshot 3. How reports module is looking
87
 
88
  ## Changelog ##
 
 
 
 
 
 
 
 
 
89
  ### 2.1.1 - 2017-11-16 ###
90
 
91
  * Adds compatibility with WordPress 4.9.
86
  3. Screenshot 3. How reports module is looking
87
 
88
  ## Changelog ##
89
+ ### 2.2.0 - 2017-11-23 ###
90
+
91
+ * - Added new Elementor Widgets module;
92
+ * - Added new Template Directory module;
93
+ * - Bug fixes for the Photos Import Module;
94
+ * - Bug fixes for the Social Sharing module backend interface;
95
+ * - Moved Orbit Fox Companion out of Tools Menu;
96
+
97
+
98
  ### 2.1.1 - 2017-11-16 ###
99
 
100
  * Adds compatibility with WordPress 4.9.
readme.txt CHANGED
@@ -86,6 +86,15 @@ Activating the Orbit Fox Companion plugin is just like any other plugin. If you'
86
  3. Screenshot 3. How reports module is looking
87
 
88
  == Changelog ==
 
 
 
 
 
 
 
 
 
89
  = 2.1.1 - 2017-11-16 =
90
 
91
  * Adds compatibility with WordPress 4.9.
86
  3. Screenshot 3. How reports module is looking
87
 
88
  == Changelog ==
89
+ = 2.2.0 - 2017-11-23 =
90
+
91
+ * - Added new Elementor Widgets module;
92
+ * - Added new Template Directory module;
93
+ * - Bug fixes for the Photos Import Module;
94
+ * - Bug fixes for the Social Sharing module backend interface;
95
+ * - Moved Orbit Fox Companion out of Tools Menu;
96
+
97
+
98
  = 2.1.1 - 2017-11-16 =
99
 
100
  * Adds compatibility with WordPress 4.9.
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: Enhances ThemeIsle's themes with extra functionality.
18
- * Version: 2.1.1
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: Enhances ThemeIsle's themes with extra functionality.
18
+ * Version: 2.2.0
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit86304f41e0559d2363e0934cd9f8f1bb::getLoader();
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php CHANGED
@@ -60,7 +60,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
60
  /**
61
  * @var array $allowed_authors The allowed authors.
62
  */
63
- private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com' );
64
  /**
65
  * @var bool $requires_license Either user needs to activate it with license.
66
  */
60
  /**
61
  * @var array $allowed_authors The allowed authors.
62
  */
63
+ private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com', 'cssigniter.com' );
64
  /**
65
  * @var bool $requires_license Either user needs to activate it with license.
66
  */
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -11,7 +11,7 @@
11
  */
12
 
13
  // Current SDK version and path.
14
- $themeisle_sdk_version = '1.9.1';
15
  $themeisle_sdk_path = dirname( __FILE__ );
16
 
17
  global $themeisle_sdk_max_version;
11
  */
12
 
13
  // Current SDK version and path.
14
+ $themeisle_sdk_version = '1.9.2';
15
  $themeisle_sdk_path = dirname( __FILE__ );
16
 
17
  global $themeisle_sdk_max_version;
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequire3e22e0262c213607de4c7ae45810e79f($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequire3e22e0262c213607de4c7ae45810e79f($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 ComposerAutoloaderInit86304f41e0559d2363e0934cd9f8f1bb
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit86304f41e0559d2363e0934cd9f8f1bb', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit86304f41e0559d2363e0934cd9f8f1bb', '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
+ composerRequire86304f41e0559d2363e0934cd9f8f1bb($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequire86304f41e0559d2363e0934cd9f8f1bb($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
vendor/composer/installed.json CHANGED
@@ -6,15 +6,15 @@
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
9
- "reference": "a05ab89594381a935573300f0aafdae8c28cefe5"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/a05ab89594381a935573300f0aafdae8c28cefe5",
14
- "reference": "a05ab89594381a935573300f0aafdae8c28cefe5",
15
  "shasum": ""
16
  },
17
- "time": "2017-11-13 10:52:46",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
9
+ "reference": "1933233168091b9e72df9df60b234b7650d6b00b"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/1933233168091b9e72df9df60b234b7650d6b00b",
14
+ "reference": "1933233168091b9e72df9df60b234b7650d6b00b",
15
  "shasum": ""
16
  },
17
+ "time": "2017-11-23 13:26:34",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {