Orbit Fox by ThemeIsle - Version 2.4.5

Version Description

  • 2018-03-29
Download this release

Release Info

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

Code changes from version 2.4.4 to 2.4.5

Files changed (45) hide show
  1. CHANGELOG.md +7 -1
  2. core/app/helpers/class-orbit-fox-render-helper.php +3 -0
  3. core/assets/css/orbit-fox-admin.css +1 -1
  4. core/includes/class-orbit-fox.php +1 -1
  5. obfx_modules/companion-legacy/inc/hestia/common-functions.php +138 -10
  6. obfx_modules/companion-legacy/init.php +12 -0
  7. obfx_modules/google-analytics/init.php +7 -1
  8. obfx_modules/google-analytics/js/script.js +6 -2
  9. obfx_modules/template-directory/init.php +29 -325
  10. obfx_modules/template-directory/views/template-directory-page-tpl.php +0 -128
  11. obfx_modules/uptime-monitor/init.php +3 -3
  12. readme.md +8 -1
  13. readme.txt +8 -1
  14. themeisle-companion.php +1 -1
  15. themeisle-hash.json +1 -1
  16. vendor/autoload.php +1 -1
  17. vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php +104 -19
  18. vendor/codeinwp/elementor-extra-widgets/composer.json +1 -1
  19. vendor/codeinwp/elementor-extra-widgets/css/admin.css +15 -0
  20. vendor/codeinwp/elementor-extra-widgets/js/obfx-grid.js +3 -3
  21. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/flipcard.php +27 -0
  22. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/review-box.php +23 -0
  23. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/share-buttons.php +23 -0
  24. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/typed-headline.php +23 -0
  25. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php +34 -7
  26. vendor/codeinwp/elementor-extra-widgets/widgets/elementor/premium-placeholder.php +111 -0
  27. vendor/codeinwp/templates-directory/LICENSE +201 -0
  28. vendor/codeinwp/templates-directory/class-page-templates-directory.php +571 -0
  29. vendor/codeinwp/templates-directory/composer.json +28 -0
  30. {obfx_modules/template-directory → vendor/codeinwp/templates-directory}/css/admin.css +31 -2
  31. {obfx_modules/template-directory → vendor/codeinwp/templates-directory}/js/script.js +41 -8
  32. vendor/codeinwp/templates-directory/load.php +11 -0
  33. vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php +150 -0
  34. {obfx_modules/template-directory → vendor/codeinwp/templates-directory}/views/template-directory-render-template-tpl.php +2 -2
  35. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-base.php +1 -1
  36. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-contact.php +1 -1
  37. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-newsletter.php +1 -1
  38. vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-registration.php +1 -1
  39. vendor/codeinwp/themeisle-content-forms/class-content-form-base.php +2 -2
  40. vendor/codeinwp/themeisle-content-forms/composer.json +1 -1
  41. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +7 -0
  42. vendor/codeinwp/themeisle-sdk/load.php +1 -1
  43. vendor/composer/autoload_files.php +2 -1
  44. vendor/composer/autoload_real.php +5 -5
  45. vendor/composer/installed.json +56 -16
CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
 
2
- ### v2.4.4 - 2018-03-10
 
 
 
 
 
 
3
  **Changes:**
4
  * Fixed Analytics module error.
5
  * UX Improvements.
1
 
2
+ ### v2.4.5 - 2018-03-29
3
+ **Changes:**
4
+ * Fixed issue with duplicated widgets in Hestia theme
5
+ * Fix undefined errors in Analytics Module
6
+ * Unset monitor email field on deactivation
7
+
8
+ ### v2.4.4 - 2018-03-08
9
  **Changes:**
10
  * Fixed Analytics module error.
11
  * UX Improvements.
core/app/helpers/class-orbit-fox-render-helper.php CHANGED
@@ -373,6 +373,9 @@ class Orbit_Fox_Render_Helper {
373
  * @return mixed
374
  */
375
  private function field_link( $option = array() ) {
 
 
 
376
  $field = '
377
  <a id="' . esc_attr( $option['link-id'] ) . '" class="' . esc_attr( $option['link-class'] ) . '" href="' . esc_url( $option['url'] ) . '">' .
378
  wp_kses_post( $option['text'] )
373
  * @return mixed
374
  */
375
  private function field_link( $option = array() ) {
376
+ if ( ! isset( $option['link-id'] ) ) {
377
+ $option['link-id'] = $option['id'];
378
+ }
379
  $field = '
380
  <a id="' . esc_attr( $option['link-id'] ) . '" class="' . esc_attr( $option['link-class'] ) . '" href="' . esc_url( $option['url'] ) . '">' .
381
  wp_kses_post( $option['text'] )
core/assets/css/orbit-fox-admin.css CHANGED
@@ -8,7 +8,7 @@
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
- Version: 2.4.4
12
  */
13
 
14
  /* Document
8
  * Extends Spectre.css Library
9
  */
10
  /*
11
+ Version: 2.4.5
12
  */
13
 
14
  /* Document
core/includes/class-orbit-fox.php CHANGED
@@ -69,7 +69,7 @@ class Orbit_Fox {
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
- $this->version = '2.4.4';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
69
 
70
  $this->plugin_name = 'orbit-fox';
71
 
72
+ $this->version = '2.4.5';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
obfx_modules/companion-legacy/inc/hestia/common-functions.php CHANGED
@@ -83,25 +83,33 @@ function themeisle_hestia_set_top_bar_widgets( $type ) {
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
  );
@@ -201,3 +209,123 @@ function themeisle_hestia_create_menu( $type ) {
201
  }
202
  return '';
203
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
 
84
  switch ( $type ) {
85
  case 'woo_top':
86
+
87
+ $widget_name = themeisle_hestia_generate_unique_widget_name('woocommerce_widget_cart');
88
+ $widget_index = trim( substr( $widget_name, strrpos( $widget_name, '-' ) + 1 ) );
89
+ $active_widgets['sidebar-top-bar'][] = $widget_name;
90
+ $cart_widget[ $widget_index ] = array( 'title' => 'Cart' );
91
  update_option( 'widget_woocommerce_widget_cart', $cart_widget );
 
92
 
93
+
94
+ $widget_name = themeisle_hestia_generate_unique_widget_name('woocommerce_product_search');
95
+ $widget_index = trim( substr( $widget_name, strrpos( $widget_name, '-' ) + 1 ) );
96
+ $active_widgets['sidebar-top-bar'][] = $widget_name;
97
+ $search_widget[ $widget_index ] = array( 'title' => 'Search' );
98
  update_option( 'widget_woocommerce_product_search', $search_widget );
99
  break;
100
  case 'blog_top':
101
+ $widget_name = themeisle_hestia_generate_unique_widget_name('search');
102
+ $widget_index = trim( substr( $widget_name, strrpos( $widget_name, '-' ) + 1 ) );
103
+ $active_widgets['sidebar-top-bar'][] = $widget_name;
104
+ $search_widget[$widget_index] = array( 'title' => 'Search' );
105
  update_option( 'widget_search', $search_widget );
106
  break;
107
  case 'page_top':
108
+ $widget_name = themeisle_hestia_generate_unique_widget_name('nav_menu');
109
+ $widget_index = trim( substr( $widget_name, strrpos( $widget_name, '-' ) + 1 ) );
110
  $menu_id = themeisle_hestia_create_menu( 'socials' );
111
+ $active_widgets['sidebar-top-bar'][] = $widget_name;
112
+ $menu_widget[$widget_index] = array(
113
  'title' => 'Socials',
114
  'nav_menu' => $menu_id,
115
  );
209
  }
210
  return '';
211
  }
212
+
213
+ /**
214
+ * Generate new unique widget name.
215
+ *
216
+ * @param string $widget_name Widget name.
217
+ *
218
+ * @since 2.4.5
219
+ * @return string
220
+ */
221
+ function themeisle_hestia_generate_unique_widget_name( $widget_name ) {
222
+ $current_sidebars = get_option( 'sidebars_widgets' );
223
+ $all_widget_array = array();
224
+ foreach ( $current_sidebars as $sidebar => $widgets ) {
225
+ if ( ! empty( $widgets ) && is_array( $widgets ) && $sidebar != 'wp_inactive_widgets' ) {
226
+ foreach ( $widgets as $widget ) {
227
+ $all_widget_array[] = $widget;
228
+ }
229
+ }
230
+ }
231
+ $widget_index = 1;
232
+ while ( in_array( $widget_name . '-' . $widget_index, $all_widget_array ) ) {
233
+ $widget_index ++;
234
+ }
235
+ $new_widget_name = $widget_name . '-' . $widget_index;
236
+ return $new_widget_name;
237
+ }
238
+
239
+
240
+ /**
241
+ * Execute this function once to check all widgets and see if there are any duplicates.
242
+ * If there are duplicates, remove that widget and generate a new one with same
243
+ * data but a new id.
244
+ *
245
+ * @since 2.4.5
246
+ */
247
+ function themeisle_hestia_fix_duplicate_widgets() {
248
+
249
+ $load_default = get_option( 'hestia_fix_duplicate_widgets' );
250
+ if ( $load_default !== false ) {
251
+ return;
252
+ }
253
+
254
+ global $wp_registered_widgets;
255
+ $current_sidebars = get_option( 'sidebars_widgets' );
256
+
257
+ $duplicates = themeisle_hestia_get_duplicate_widgets();
258
+ if(empty($duplicates)){
259
+ return;
260
+ }
261
+ foreach ($duplicates as $widget){
262
+ $old_widget_id = $widget['widget_id'];
263
+ $old_widget_sidebar = $widget['sidebar'];
264
+ $old_widget_index = array_search($old_widget_id,$current_sidebars[$old_widget_sidebar]);
265
+ if( empty($old_widget_index)){
266
+ return;
267
+ }
268
+
269
+ /* Remove the widget id and obtain the widget name */
270
+ $old_widget_name = explode( '-', $old_widget_id );
271
+ array_pop( $old_widget_name );
272
+ $widget_name = implode('-', $old_widget_name);
273
+
274
+ /* Get the id of new widget */
275
+ $new_widget_name = themeisle_hestia_generate_unique_widget_name($widget_name);
276
+ $new_widget_index = trim( substr( $new_widget_name, strrpos( $new_widget_name, '-' ) + 1 ) );
277
+
278
+
279
+ /* Get the options of old widget and update its id */
280
+ $old_widget_options = $wp_registered_widgets[$old_widget_id];
281
+ if(!empty($old_widget_options)) {
282
+ if ( ! empty( $old_widget_options['params'] ) ) {
283
+ unset( $old_widget_options['params'] );
284
+ }
285
+ if ( ! empty( $old_widget_options['callback'] ) ) {
286
+ unset( $old_widget_options['callback'] );
287
+ }
288
+ if ( ! empty( $old_widget_options['id'] ) ) {
289
+ unset( $old_widget_options['id'] );
290
+ }
291
+ } else {
292
+ $old_widget_options = array();
293
+ }
294
+
295
+ $current_sidebars[$old_widget_sidebar][$old_widget_index] = $new_widget_name;
296
+ $new_widget[ $new_widget_index ] = $old_widget_options;
297
+
298
+ update_option( 'widget_'.$widget_name, $new_widget );
299
+ }
300
+ update_option( 'sidebars_widgets', $current_sidebars );
301
+
302
+ update_option( 'hestia_fix_duplicate_widgets', true );
303
+ }
304
+
305
+
306
+ /**
307
+ * Get an array of duplicate widgets and their sidebars.
308
+ *
309
+ * @since 2.4.5
310
+ */
311
+ function themeisle_hestia_get_duplicate_widgets() {
312
+
313
+ $current_sidebars = get_option( 'sidebars_widgets' );
314
+ $all_widget_array = array();
315
+ $duplicate_widgets = array();
316
+ foreach ( $current_sidebars as $sidebar => $widgets ) {
317
+ if ( ! empty( $widgets ) && is_array( $widgets ) && $sidebar != 'wp_inactive_widgets' ) {
318
+ foreach ( $widgets as $widget ) {
319
+ if( in_array($widget,$all_widget_array)){
320
+ $duplicate_widgets[] = array(
321
+ 'widget_id' => $widget,
322
+ 'sidebar' => $sidebar
323
+ );
324
+ } else{
325
+ $all_widget_array[] = $widget;
326
+ }
327
+ }
328
+ }
329
+ }
330
+ return $duplicate_widgets;
331
+ }
obfx_modules/companion-legacy/init.php CHANGED
@@ -186,6 +186,16 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
186
  themeisle_hestia_top_bar_default_content();
187
  }
188
 
 
 
 
 
 
 
 
 
 
 
189
  /**
190
  * Wrapper method for themeisle_hestia_clients_default_content function call.
191
  *
@@ -251,6 +261,7 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
251
  if ( $this->is_hestia() ) {
252
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_require' );
253
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_load_default_content' );
 
254
  $this->loader->add_filter( 'hestia_clients_bar_default_content', $this, 'hestia_load_clients_default_content' );
255
  $this->loader->add_filter( 'hestia_top_bar_alignment_default', $this, 'hestia_top_bar_default_alignment' );
256
  $this->loader->add_action( 'customize_register', $this, 'hestia_require_customizer', 0 );
@@ -259,6 +270,7 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
259
 
260
  if ( $this->is_hestia_pro() ) {
261
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_load_default_content' );
 
262
  $this->loader->add_filter( 'hestia_clients_bar_default_content', $this, 'hestia_load_clients_default_content' );
263
  $this->loader->add_filter( 'hestia_top_bar_alignment_default', $this, 'hestia_top_bar_default_alignment' );
264
  }
186
  themeisle_hestia_top_bar_default_content();
187
  }
188
 
189
+ /**
190
+ * Wrapper method for themeisle_hestia_fix_duplicate_widgets function call.
191
+ *
192
+ * @since 2.4.5
193
+ * @access public
194
+ */
195
+ public function hestia_fix_duplicate_widgets(){
196
+ themeisle_hestia_fix_duplicate_widgets();
197
+ }
198
+
199
  /**
200
  * Wrapper method for themeisle_hestia_clients_default_content function call.
201
  *
261
  if ( $this->is_hestia() ) {
262
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_require' );
263
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_load_default_content' );
264
+ $this->loader->add_action( 'after_setup_theme', $this, 'hestia_fix_duplicate_widgets' );
265
  $this->loader->add_filter( 'hestia_clients_bar_default_content', $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 );
270
 
271
  if ( $this->is_hestia_pro() ) {
272
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_load_default_content' );
273
+ $this->loader->add_action( 'after_setup_theme', $this, 'hestia_fix_duplicate_widgets' );
274
  $this->loader->add_filter( 'hestia_clients_bar_default_content', $this, 'hestia_load_clients_default_content' );
275
  $this->loader->add_filter( 'hestia_top_bar_alignment_default', $this, 'hestia_top_bar_default_alignment' );
276
  }
obfx_modules/google-analytics/init.php CHANGED
@@ -310,7 +310,13 @@ class Google_Analytics_OBFX_Module extends Orbit_Fox_Module_Abstract {
310
  * @return string
311
  */
312
  private final function get_site_hash() {
313
- $pre_hash = rtrim( ltrim( sanitize_text_field( preg_replace( '/[^a-zA-Z0-9]/', '', AUTH_KEY . SECURE_AUTH_KEY . LOGGED_IN_KEY ) ) ) );
 
 
 
 
 
 
314
  if ( function_exists( 'mb_strimwidth' ) ) {
315
  return mb_strimwidth( $pre_hash, 0, 100 );
316
  }
310
  * @return string
311
  */
312
  private final function get_site_hash() {
313
+ $hash_base = '';
314
+ if( defined ( 'AUTH_KEY' ) && defined ('SECURE_AUTH_KEY' ) && defined ('LOGGED_IN_KEY' ) ){
315
+ $hash_base = AUTH_KEY . SECURE_AUTH_KEY . LOGGED_IN_KEY;
316
+ }else{
317
+ $hash_base = sha1(ABSPATH ) . sha1( get_site_url( ) );
318
+ }
319
+ $pre_hash = rtrim( ltrim( sanitize_text_field( preg_replace( '/[^a-zA-Z0-9]/', '', $hash_base ) ) ) );
320
  if ( function_exists( 'mb_strimwidth' ) ) {
321
  return mb_strimwidth( $pre_hash, 0, 100 );
322
  }
obfx_modules/google-analytics/js/script.js CHANGED
@@ -16,7 +16,8 @@ var obfx_analytics = function ( $ ) {
16
 
17
  $( function () {
18
  $( '#refresh-analytics-accounts' ).on(
19
- 'click', function () {
 
20
  $.ajax(
21
  {
22
  url: obfxAnalyticsObj.url,
@@ -35,10 +36,12 @@ var obfx_analytics = function ( $ ) {
35
  }
36
  }, 'json'
37
  );
 
38
  }
39
  );
40
  $( '#unregister-analytics' ).on(
41
- 'click', function () {
 
42
  $.ajax(
43
  {
44
  url: obfxAnalyticsObj.url,
@@ -59,6 +62,7 @@ var obfx_analytics = function ( $ ) {
59
  }
60
  }, 'json'
61
  );
 
62
  }
63
  );
64
  } );
16
 
17
  $( function () {
18
  $( '#refresh-analytics-accounts' ).on(
19
+ 'click', function ( event ) {
20
+ event.preventDefault();
21
  $.ajax(
22
  {
23
  url: obfxAnalyticsObj.url,
36
  }
37
  }, 'json'
38
  );
39
+ return false;
40
  }
41
  );
42
  $( '#unregister-analytics' ).on(
43
+ 'click', function ( event ) {
44
+ event.preventDefault();
45
  $.ajax(
46
  {
47
  url: obfxAnalyticsObj.url,
62
  }
63
  }, 'json'
64
  );
65
+ return false;
66
  }
67
  );
68
  } );
obfx_modules/template-directory/init.php CHANGED
@@ -60,19 +60,10 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
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
- //Enqueue admin scripts.
71
- $this->loader->add_action( 'admin_enqueue_scripts', $this, 'enqueue_template_dir_scripts' );
72
  // Get the full-width pages feature
 
73
  $this->loader->add_action( 'init', $this, 'load_full_width_page_templates' );
74
-
75
- $this->loader->add_filter( 'fwpt_templates_list', $this, 'filter_fwpt_templates_list' );
76
  }
77
 
78
  /**
@@ -94,6 +85,24 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
94
  }
95
  }
96
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  /**
98
  *
99
  *
@@ -126,262 +135,9 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
126
  * @return array|boolean
127
  */
128
  public function admin_enqueue() {
129
- $current_screen = get_current_screen();
130
- if ( ! isset( $current_screen->id ) ) {
131
- return array();
132
- }
133
-
134
- if ( ! ( $current_screen->id == 'orbit-fox_page_obfx_template_dir' ) && ( ! $current_screen == 'customize' ) ) {
135
- return array();
136
- }
137
-
138
- $enqueue = array(
139
- 'css' => array(
140
- 'admin' => array(),
141
- ),
142
- );
143
-
144
- return $enqueue;
145
- }
146
-
147
- /**
148
- * Register Rest endpoint for requests.
149
- */
150
- public function register_endpoints() {
151
- register_rest_route( $this->slug, '/import_elementor', array(
152
- 'methods' => 'POST',
153
- 'callback' => array( $this, 'import_elementor' ),
154
- ) );
155
- }
156
-
157
- /**
158
- * The templates list.
159
- *
160
- * @return array
161
- */
162
- public function templates_list() {
163
- $repository_raw_url = 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/';
164
- $defaults_if_empty = array(
165
- 'title' => __( 'A new Orbit Fox Template', 'themeisle-companion' ),
166
- 'screenshot' => esc_url( 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/placeholder.png' ),
167
- 'description' => __( 'This is an awesome Orbit Fox Template.', 'themeisle-companion' ),
168
- 'demo_url' => esc_url( 'https://demo.themeisle.com/hestia-pro-demo-content/demo-placeholder/' ),
169
- 'import_file' => '',
170
- 'required_plugins' => array( 'elementor' => array( 'title' => __( 'Elementor Page Builder', 'themeisle-companion' ) ) ),
171
- );
172
-
173
- $templates_list = array(
174
- 'about-our-business-elementor' => array(
175
- 'title' => __( 'About Our Business', 'themeisle-companion' ),
176
- 'description' => __( 'Use this layout to present your business in a fancy way. Add an interactive header, shwocase your services via progress bars, introduce your team members, and locate your headquarters on Google Maps. Last but not least, beautify the design by adding catchy images.', 'themeisle-companion' ),
177
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/about-our-business-elementor/',
178
- 'screenshot' => esc_url( $repository_raw_url . 'about-our-business-elementor/screenshot.png' ),
179
- 'import_file' => esc_url( $repository_raw_url . 'about-our-business-elementor/template.json' ),
180
- ),
181
- 'contact-us-elementor' => array(
182
- 'title' => __( 'Contact Us', 'themeisle-companion' ),
183
- 'description' => __( 'A clean and simple template for your Contact page, where we integrated our Pirate Forms plugin. It will let your customers send you a message using an intuitive form. A Google map, together with a few other details about your business, completes the section.', 'themeisle-companion' ),
184
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/contact-us-elementor/',
185
- 'screenshot' => esc_url( $repository_raw_url . 'contact-us-elementor/screenshot.png' ),
186
- 'import_file' => esc_url( $repository_raw_url . 'contact-us-elementor/template.json' ),
187
- ),
188
- 'pricing-elementor' => array(
189
- 'title' => __( 'Pricing', 'themeisle-companion' ),
190
- 'description' => __( 'If you plan to sell your products online, this layout offers you elegant pricing tables so you can differentiate the features and services for your clients. Also, for a better clarification, the template provides a FAQ area where you can answer people\'s questions.', 'themeisle-companion' ),
191
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pricing-elementor/',
192
- 'screenshot' => esc_url( $repository_raw_url . 'pricing-elementor/screenshot.png' ),
193
- 'import_file' => esc_url( $repository_raw_url . 'pricing-elementor/template.json' ),
194
- ),
195
- 'material-homepage-elementor' => array(
196
- 'title' => __( 'Material Homepage', 'themeisle-companion' ),
197
- 'description' => __( 'This layout could be your main website homepage (or you can use it as an alternative homepage, if you wish). It was built on material design and comes with call to action, catchy icons, testimonials, blog posts, pricing plans, and other sections that you can add yourself by customizing it.', 'themeisle-companion' ),
198
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/material-homepage-elementor/',
199
- 'screenshot' => esc_url( $repository_raw_url . 'material-homepage-elementor/screenshot.png' ),
200
- 'import_file' => esc_url( $repository_raw_url . 'material-homepage-elementor/template.json' ),
201
- ),
202
- 'ether-elementor' => array(
203
- 'title' => __( 'Ether - Landing Page', 'themeisle-companion' ),
204
- 'description' => __( 'An elegant and modern landing page for e-commerce, coming with a clean interface, beautiful typography, photo galleries, and call to action. If you have an online shop and want to promote a certain product, use this layout to tell people why they should buy it.', 'themeisle-companion' ),
205
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ether-elementor/',
206
- 'screenshot' => esc_url( $repository_raw_url . 'ether-elementor/screenshot.png' ),
207
- 'import_file' => esc_url( $repository_raw_url . 'ether-elementor/template.json' ),
208
- ),
209
- 'jason-elementor' => array(
210
- 'title' => __( 'Jason - Landing Page', 'themeisle-companion' ),
211
- 'description' => __( 'A classy template for freelancers, where you can put your skills and knowldge in the spotlight for potential clients. Talk about yourself, your projects, awards, and let people contact you easily. The template is designed to feature one-page scrolling.', 'themeisle-companion' ),
212
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/jason-elementor/',
213
- 'screenshot' => esc_url( $repository_raw_url . 'jason-elementor/screenshot.png' ),
214
- 'import_file' => esc_url( $repository_raw_url . 'jason-elementor/template.json' ),
215
- ),
216
- 'pulse-elementor' => array(
217
- 'title' => __( 'Pulse - Landing Page', 'themeisle-companion' ),
218
- 'description' => __( 'A good-looking landing page for products and apps, built to mark the features and services that they offer. The layout provides customer reviews, call to action, beautiful pricing tables, an About section, and a creative design. If you want to promote and sell your brand product, this template might help.', 'themeisle-companion' ),
219
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pulse-elementor/',
220
- 'screenshot' => esc_url( $repository_raw_url . 'pulse-elementor/screenshot.png' ),
221
- 'import_file' => esc_url( $repository_raw_url . 'pulse-elementor/template.json' ),
222
- ),
223
- 'ascend-elementor' => array(
224
- 'title' => __( 'Ascend - Landing Page', 'themeisle-companion' ),
225
- 'description' => __( 'A resume-like template, built for outdoor enthusiasts and nature lovers. Its design and layout make it flexible for any other purpose too, so do not hesitate to showcase any kind of skills and activities, even business-oriented.', 'themeisle-companion' ),
226
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ascend-elementor/',
227
- 'screenshot' => esc_url( $repository_raw_url . 'ascend-elementor/screenshot.png' ),
228
- 'import_file' => esc_url( $repository_raw_url . 'ascend-elementor/template.json' ),
229
- ),
230
- 'path-elementor' => array(
231
- 'title' => __( 'Path - Landing Page', 'themeisle-companion' ),
232
- 'description' => __( 'If you are a business consultant - agency or working on your own - have a look at this template! It comes with a clean design, call to action, statistics, and sections that put your services first.', 'themeisle-companion' ),
233
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/path-elementor/',
234
- 'screenshot' => esc_url( $repository_raw_url . 'path-elementor/screenshot.png' ),
235
- 'import_file' => esc_url( $repository_raw_url . 'path-elementor/template.json' ),
236
- ),
237
- 'mocha-elementor' => array(
238
- 'title' => __( 'Mocha - Landing Page', 'themeisle-companion' ),
239
- 'description' => __( 'An elegant and modern template for cafes and pubs, where you can display your menu in a mouth-watering way. Call to action, blog posts, attractive images, tabbed menus, and a catchy design will help you convince more people to stop by.', 'themeisle-companion' ),
240
- 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/mocha-elementor/',
241
- 'screenshot' => esc_url( $repository_raw_url . 'mocha-elementor/screenshot.png' ),
242
- 'import_file' => esc_url( $repository_raw_url . 'mocha-elementor/template.json' ),
243
- ),
244
- );
245
-
246
- foreach ( $templates_list as $template => $properties ) {
247
- $templates_list[ $template ] = wp_parse_args( $properties, $defaults_if_empty );
248
- }
249
-
250
- return apply_filters( 'template_directory_templates_list', $templates_list );
251
- }
252
-
253
- /**
254
- * Register endpoint for themes page.
255
- */
256
- public function demo_listing_register() {
257
- add_rewrite_endpoint( 'obfx_templates', EP_ROOT );
258
- }
259
-
260
- /**
261
- * Return template preview in customizer.
262
- *
263
- * @return bool|string
264
- */
265
- public function demo_listing() {
266
- $flag = get_query_var( 'obfx_templates', false );
267
-
268
- if ( $flag !== '' ) {
269
- return false;
270
- }
271
- if ( ! current_user_can( 'customize' ) ) {
272
- return false;
273
- }
274
- if ( ! is_customize_preview() ) {
275
- return false;
276
- }
277
-
278
- return $this->render_view( 'template-directory-render-template' );
279
- }
280
-
281
- /**
282
- * Add the 'Template Directory' page to the dashboard menu.
283
- */
284
- public function add_menu_page() {
285
- add_submenu_page(
286
- 'obfx_companion', __( 'Orbit Fox Template Directory', 'themeisle-companion' ), __( 'Template Directory', 'themeisle-companion' ), 'manage_options', 'obfx_template_dir',
287
- array( $this, 'render_admin_page' )
288
- );
289
  }
290
 
291
- /**
292
- * Render the template directory admin page.
293
- */
294
- public function render_admin_page() {
295
- $data = array(
296
- 'templates_array' => $this->templates_list(),
297
- );
298
- echo $this->render_view( 'template-directory-page', $data );
299
- }
300
-
301
- /**
302
- * Utility method to call Elementor import routine.
303
- */
304
- public function import_elementor() {
305
- if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
306
- return 'no-elementor';
307
- }
308
-
309
- require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
310
- require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
311
-
312
- $template = download_url( esc_url( $_POST['template_url'] ) );
313
- $_FILES['file']['tmp_name'] = $template;
314
- $elementor = new Elementor\TemplateLibrary\Source_Local;
315
- $elementor->import_template();
316
- unlink( $template );
317
-
318
- $args = array(
319
- 'post_type' => 'elementor_library',
320
- 'nopaging' => true,
321
- 'posts_per_page' => '1',
322
- 'orderby' => 'date',
323
- 'order' => 'DESC',
324
- 'suppress_filters' => true,
325
- );
326
-
327
- $query = new WP_Query( $args );
328
-
329
- $last_template_added = $query->posts[0];
330
- //get template id
331
- $template_id = $last_template_added->ID;
332
-
333
- wp_reset_query();
334
- wp_reset_postdata();
335
-
336
- //page content
337
- $page_content = $last_template_added->post_content;
338
- //meta fields
339
- $elementor_data_meta = get_post_meta( $template_id, '_elementor_data' );
340
- $elementor_ver_meta = get_post_meta( $template_id, '_elementor_version' );
341
- $elementor_edit_mode_meta = get_post_meta( $template_id, '_elementor_edit_mode' );
342
- $elementor_css_meta = get_post_meta( $template_id, '_elementor_css' );
343
-
344
- $elementor_metas = array(
345
- '_elementor_data' => ! empty( $elementor_data_meta[0] ) ? wp_slash( $elementor_data_meta[0] ) : '',
346
- '_elementor_version' => ! empty( $elementor_ver_meta[0] ) ? $elementor_ver_meta[0] : '',
347
- '_elementor_edit_mode' => ! empty( $elementor_edit_mode_meta[0] ) ? $elementor_edit_mode_meta[0] : '',
348
- '_elementor_css' => $elementor_css_meta,
349
- );
350
-
351
- // Create post object
352
- $new_template_page = array(
353
- 'post_type' => 'page',
354
- 'post_title' => $_POST['template_name'],
355
- 'post_status' => 'publish',
356
- 'post_content' => $page_content,
357
- 'meta_input' => $elementor_metas,
358
- 'page_template' => apply_filters( 'template_directory_default_template', 'templates/builder-fullwidth-std.php' )
359
- );
360
-
361
- $current_theme = wp_get_theme();
362
-
363
- switch ( $current_theme->get_template() ) {
364
- case 'hestia-pro':
365
- case 'hestia':
366
- $new_template_page['page_template'] = 'page-templates/template-pagebuilder-full-width.php';
367
- break;
368
- case 'zerif-lite':
369
- case 'zerif-pro':
370
- $new_template_page['page_template'] = 'template-fullwidth-no-title.php';
371
- break;
372
- }
373
-
374
- $post_id = wp_insert_post( $new_template_page );
375
-
376
- $redirect_url = add_query_arg( array(
377
- 'post' => $post_id,
378
- 'action' => 'elementor',
379
- ), admin_url( 'post.php' ) );
380
-
381
- return ( $redirect_url );
382
-
383
- die();
384
- }
385
 
386
  /**
387
  * Options array for the Orbit Fox module.
@@ -392,74 +148,22 @@ class Template_Directory_OBFX_Module extends Orbit_Fox_Module_Abstract {
392
  return array();
393
  }
394
 
395
- /**
396
- * Generate action button html.
397
- *
398
- * @param string $slug plugin slug.
399
- *
400
- * @return string
401
- */
402
- public function get_button_html( $slug ) {
403
- $button = '';
404
- $state = $this->check_plugin_state( $slug );
405
- if ( ! empty( $slug ) ) {
406
- switch ( $state ) {
407
- case 'install':
408
- $nonce = wp_nonce_url(
409
- add_query_arg(
410
- array(
411
- 'action' => 'install-plugin',
412
- 'from' => 'import',
413
- 'plugin' => $slug,
414
- ),
415
- network_admin_url( 'update.php' )
416
- ),
417
- 'install-plugin_' . $slug
418
- );
419
- $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>';
420
- break;
421
- case 'activate':
422
- $plugin_link_suffix = $slug . '/' . $slug . '.php';
423
- $nonce = add_query_arg(
424
- array(
425
- 'action' => 'activate',
426
- 'plugin' => rawurlencode( $plugin_link_suffix ),
427
- '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_link_suffix ),
428
- ), network_admin_url( 'plugins.php' )
429
- );
430
- $button .= '<a data-slug="' . $slug . '" class="activate-now button button-primary" href="' . esc_url( $nonce ) . '" aria-label="Activate ' . $slug . '">' . __( 'Activate', 'themeisle-companion' ) . '</a>';
431
- break;
432
- }// End switch().
433
- }// End if().
434
- return $button;
435
- }
436
 
437
  /**
438
- * Check plugin state.
439
- *
440
- * @param string $slug plugin slug.
441
- *
442
- * @return bool
443
  */
444
- public function check_plugin_state( $slug ) {
445
- if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/' . $slug . '.php' ) || file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/index.php' ) ) {
446
- require_once( ABSPATH . 'wp-admin' . '/includes/plugin.php' );
447
- $needs = ( is_plugin_active( $slug . '/' . $slug . '.php' ) ||
448
- is_plugin_active( $slug . '/index.php' ) ) ?
449
- 'deactivate' : 'activate';
450
-
451
- return $needs;
452
- } else {
453
- return 'install';
454
  }
455
  }
456
 
457
  /**
458
- * If the composer library is present let's try to init.
459
  */
460
- public function load_full_width_page_templates() {
461
- if ( class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
462
- \ThemeIsle\FullWidthTemplates::instance();
463
  }
464
  }
465
 
60
  * @access public
61
  */
62
  public function hooks() {
 
 
 
 
 
 
 
 
 
63
  // Get the full-width pages feature
64
+ $this->loader->add_action( 'init', $this, 'load_template_directory_library' );
65
  $this->loader->add_action( 'init', $this, 'load_full_width_page_templates' );
66
+ $this->loader->add_filter( 'obfx_template_dir_products',$this, 'add_page', 90 );
 
67
  }
68
 
69
  /**
85
  }
86
  }
87
 
88
+ /**
89
+ * Add the menu page.
90
+ *
91
+ * @param $products
92
+ *
93
+ * @return array
94
+ */
95
+ public function add_page( $products ) {
96
+ $sizzify = array(
97
+ 'obfx' => array(
98
+ 'directory_page_title' => __( 'Orbit Fox Template Directory', 'themeisle-companion' ),
99
+ 'parent_page_slug' => 'obfx_companion',
100
+ 'page_slug' => 'obfx_template_dir',
101
+ )
102
+ );
103
+ return array_merge($products, $sizzify );
104
+ }
105
+
106
  /**
107
  *
108
  *
135
  * @return array|boolean
136
  */
137
  public function admin_enqueue() {
138
+ return array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  }
140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
142
  /**
143
  * Options array for the Orbit Fox module.
148
  return array();
149
  }
150
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
  /**
153
+ * If the composer library is present let's try to init.
 
 
 
 
154
  */
155
+ public function load_full_width_page_templates() {
156
+ if ( class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
157
+ \ThemeIsle\FullWidthTemplates::instance();
 
 
 
 
 
 
 
158
  }
159
  }
160
 
161
  /**
162
+ * Call the Templates Directory library
163
  */
164
+ public function load_template_directory_library() {
165
+ if ( class_exists( '\ThemeIsle\PageTemplatesDirectory' ) ) {
166
+ \ThemeIsle\PageTemplatesDirectory::instance();
167
  }
168
  }
169
 
obfx_modules/template-directory/views/template-directory-page-tpl.php DELETED
@@ -1,128 +0,0 @@
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
- $html .= '<div class="obfx-template">';
24
- $html .= '<div class="more-details obfx-preview-template" data-demo-url="' . esc_url( $properties['demo_url'] ) . '" data-template-slug="' . esc_attr( $template ) . '" ><span>' . __( 'More Details', 'themeisle-companion' ) . '</span></div>';
25
- $html .= '<div class="obfx-template-screenshot">';
26
- $html .= '<img src="' . esc_url( $properties['screenshot'] ) . '" alt="' . esc_html( $properties['title'] ) . '" >';
27
- $html .= '</div>'; // .obfx-template-screenshot
28
- $html .= '<h2 class="template-name template-header">' . esc_html( $properties['title'] ) . '</h2>';
29
- $html .= '<div class="obfx-template-actions">';
30
-
31
- if ( ! empty( $properties['demo_url'] ) ) {
32
- $html .= '<a class="button obfx-preview-template" data-demo-url="' . esc_url( $properties['demo_url'] ) . '" data-template-slug="' . esc_attr( $template ) . '" >' . __( 'Preview', 'themeisle-companion' ) . '</a>';
33
- }
34
- $html .= '</div>'; // .obfx-template-actions
35
- $html .= '</div>'; // .obfx-template
36
- }
37
- $html .= '</div>'; // .obfx-template-browser
38
- $html .= '</div>'; // .obfx-template-dir
39
- $html .= '<div class="wp-clearfix clearfix"></div>';
40
- }// End if().
41
-
42
- echo $html;
43
- ?>
44
-
45
- <div class="obfx-template-preview theme-install-overlay wp-full-overlay expanded" style="display: none;">
46
- <div class="wp-full-overlay-sidebar">
47
- <div class="wp-full-overlay-header">
48
- <button class="close-full-overlay"><span class="screen-reader-text">Close</span></button>
49
- <div class="obfx-next-prev">
50
- <button class="previous-theme"><span class="screen-reader-text">Previous</span></button>
51
- <button class="next-theme"><span class="screen-reader-text">Next</span></button>
52
- </div>
53
- <span class="obfx-import-template button button-primary">Import</span>
54
- </div>
55
- <div class="wp-full-overlay-sidebar-content">
56
- <?php
57
- foreach ( $templates_array as $template => $properties ) {
58
- ?>
59
- <div class="install-theme-info obfx-theme-info <?php echo esc_attr( $template ); ?>"
60
- data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
61
- data-template-file="<?php echo esc_url( $properties['import_file'] ); ?>"
62
- data-template-title="<?php echo esc_html( $properties['title'] ); ?>">
63
- <h3 class="theme-name"><?php echo esc_html( $properties['title'] ); ?></h3>
64
- <img class="theme-screenshot" src="<?php echo esc_url( $properties['screenshot'] ); ?>"
65
- alt="<?php echo esc_html( $properties['title'] ); ?>">
66
- <div class="theme-details">
67
- <?php echo esc_html( $properties['description'] ); ?>
68
- </div>
69
- <?php
70
- if ( ! empty( $properties['required_plugins'] ) && is_array( $properties['required_plugins'] ) ) {
71
- ?>
72
- <div class="obfx-required-plugins">
73
- <p>Required Plugins</p>
74
- <?php
75
- foreach ( $properties['required_plugins'] as $plugin_slug => $details ) {
76
- if ( $this->check_plugin_state( $plugin_slug ) === 'install' ) {
77
- echo '<div class="obfx-installable plugin-card-' . esc_attr( $plugin_slug ) . '">';
78
- echo '<span class="dashicons dashicons-no-alt"></span>';
79
- echo $details['title'];
80
- echo $this->get_button_html( $plugin_slug );
81
- echo '</div>';
82
- } elseif ( $this->check_plugin_state( $plugin_slug ) === 'activate' ) {
83
- echo '<div class="obfx-activate plugin-card-' . esc_attr( $plugin_slug ) . '">';
84
- echo '<span class="dashicons dashicons-admin-plugins" style="color: #ffb227;"></span>';
85
- echo $details['title'];
86
- echo $this->get_button_html( $plugin_slug );
87
- echo '</div>';
88
- } else {
89
- echo '<div class="obfx-installed plugin-card-' . esc_attr( $plugin_slug ) . '">';
90
- echo '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>';
91
- echo $details['title'];
92
- echo '</div>';
93
- }
94
- }
95
- ?>
96
- </div>
97
- <?php
98
- }
99
- ?>
100
- </div><!-- /.install-theme-info -->
101
- <?php } ?>
102
- </div>
103
-
104
- <div class="wp-full-overlay-footer">
105
- <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="Collapse Sidebar">
106
- <span class="collapse-sidebar-arrow"></span>
107
- <span class="collapse-sidebar-label"><?php echo __( 'Collapse', 'themeisle-companion' ); ?></span>
108
- </button>
109
- <div class="devices-wrapper">
110
- <div class="devices obfx-responsive-preview">
111
- <button type="button" class="preview-desktop active" aria-pressed="true" data-device="desktop">
112
- <span class="screen-reader-text">Enter desktop preview mode</span>
113
- </button>
114
- <button type="button" class="preview-tablet" aria-pressed="false" data-device="tablet">
115
- <span class="screen-reader-text">Enter tablet preview mode</span>
116
- </button>
117
- <button type="button" class="preview-mobile" aria-pressed="false" data-device="mobile">
118
- <span class="screen-reader-text">Enter mobile preview mode</span>
119
- </button>
120
- </div>
121
- </div>
122
-
123
- </div>
124
- </div>
125
- <div class="wp-full-overlay-main obfx-main-preview">
126
- <iframe src="" title="Preview" class="obfx-template-frame"></iframe>
127
- </div>
128
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
obfx_modules/uptime-monitor/init.php CHANGED
@@ -28,8 +28,8 @@ class Uptime_Monitor_OBFX_Module extends Orbit_Fox_Module_Abstract {
28
  */
29
  public function __construct() {
30
  parent::__construct();
31
- $this->name = __( 'Uptime Monitor', 'themeisle-companion' );
32
- $this->description = __( 'A module to notify when you website goes down.', 'themeisle-companion' );
33
  $this->confirm_intent = '<h4>' . __( 'One more step...', 'themeisle-companion' ) . '</h4><p>' . __( 'In order to use the uptime service, we will need your e-mail address, where we will send downtime alerts.', 'themeisle-companion' ) . '</p>';
34
  }
35
 
@@ -102,7 +102,7 @@ class Uptime_Monitor_OBFX_Module extends Orbit_Fox_Module_Abstract {
102
  * @access public
103
  */
104
  public function deactivate() {
105
-
106
  $monitor_url = $this->monitor_url . '/api/monitor/remove';
107
  $url = home_url();
108
  $args = array(
28
  */
29
  public function __construct() {
30
  parent::__construct();
31
+ $this->name = __( 'Uptime Monitor', 'themeisle-companion' );
32
+ $this->description = __( 'A module to notify when you website goes down.', 'themeisle-companion' );
33
  $this->confirm_intent = '<h4>' . __( 'One more step...', 'themeisle-companion' ) . '</h4><p>' . __( 'In order to use the uptime service, we will need your e-mail address, where we will send downtime alerts.', 'themeisle-companion' ) . '</p>';
34
  }
35
 
102
  * @access public
103
  */
104
  public function deactivate() {
105
+ $this->set_option( 'monitor_email', '' );
106
  $monitor_url = $this->monitor_url . '/api/monitor/remove';
107
  $url = home_url();
108
  $args = array(
readme.md CHANGED
@@ -98,7 +98,14 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
98
  5. Social Sharing Module
99
 
100
  ## Changelog ##
101
- ### 2.4.4 - 2018-03-10 ###
 
 
 
 
 
 
 
102
 
103
  * Fixed Analytics module error.
104
  * UX Improvements.
98
  5. Social Sharing Module
99
 
100
  ## Changelog ##
101
+ ### 2.4.5 - 2018-03-29 ###
102
+
103
+ * Fixed issue with duplicated widgets in Hestia theme
104
+ * Fix undefined errors in Analytics Module
105
+ * Unset monitor email field on deactivation
106
+
107
+
108
+ ### 2.4.4 - 2018-03-08 ###
109
 
110
  * Fixed Analytics module error.
111
  * UX Improvements.
readme.txt CHANGED
@@ -98,7 +98,14 @@ Activating the Orbit Fox plugin is just like any other plugin. If you've uploade
98
  5. Social Sharing Module
99
 
100
  == Changelog ==
101
- = 2.4.4 - 2018-03-10 =
 
 
 
 
 
 
 
102
 
103
  * Fixed Analytics module error.
104
  * UX Improvements.
98
  5. Social Sharing Module
99
 
100
  == Changelog ==
101
+ = 2.4.5 - 2018-03-29 =
102
+
103
+ * Fixed issue with duplicated widgets in Hestia theme
104
+ * Fix undefined errors in Analytics Module
105
+ * Unset monitor email field on deactivation
106
+
107
+
108
+ = 2.4.4 - 2018-03-08 =
109
 
110
  * Fixed Analytics module error.
111
  * UX Improvements.
themeisle-companion.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://themeisle.com/plugins/orbit-fox-companion
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
- * Version: 2.4.4
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://themeisle.com/plugins/orbit-fox-companion
17
  * Description: This swiss-knife plugin comes with a quality template library, menu/sharing icons modules, and newly added Elementor/BeaverBuilder page builder widgets on each release.
18
+ * Version: 2.4.5
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
themeisle-hash.json CHANGED
@@ -1 +1 @@
1
- {"class-autoloader.php":"57e533b653d235e76cb9953720e4f5e9","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"c4490c854211aa1b877db68b762762a5","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
1
+ {"class-autoloader.php":"57e533b653d235e76cb9953720e4f5e9","index.php":"39ab8276fb0e4bd3fcab3270822c5977","themeisle-companion.php":"8d3499a2eef387dfab19eaaaef1ca4fd","uninstall.php":"7abf753a29e0eb3a844c8a0ba9493b7c"}
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInita722a1f7104fe151caa2caa86049818a::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit3a63382f86c4b7332a0b229aeb5f0f3e::getLoader();
vendor/codeinwp/elementor-extra-widgets/class-elementor-extra-widgets.php CHANGED
@@ -22,7 +22,7 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
22
  * The version of this library
23
  * @var string
24
  */
25
- public static $version = '1.0.0';
26
 
27
  /**
28
  * Defines the library behaviour
@@ -38,6 +38,9 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
38
  add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ), 999 );
39
 
40
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'add_elementor_widgets' ) );
 
 
 
41
  }
42
 
43
  /**
@@ -46,11 +49,21 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
46
  public function add_elementor_category() {
47
 
48
  $category_args = apply_filters( 'elementor_extra_widgets_category_args', array(
49
- 'slug' => 'obfx-elementor-widgets',
50
  'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
51
  'icon' => 'fa fa-plug',
52
  ) );
53
 
 
 
 
 
 
 
 
 
 
 
54
  \Elementor\Plugin::instance()->elements_manager->add_category(
55
  $category_args['slug'],
56
  array(
@@ -59,7 +72,6 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
59
  ),
60
  1
61
  );
62
-
63
  }
64
 
65
  public function register_assets() {
@@ -68,31 +80,58 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
68
  wp_register_style( 'eaw-elementor', plugins_url( '/css/public.css', __FILE__ ), array(), $this::$version );
69
  }
70
 
 
 
 
71
  /**
72
- * Require and instantiate Elementor Widgets.
73
  *
74
  * @param $widgets_manager
75
  */
76
  public function add_elementor_widgets( $widgets_manager ) {
77
- $elementor_widgets = array(
78
- 'pricing-table',
79
- 'services',
80
- 'posts-grid',
81
- );
82
 
83
  foreach ( $elementor_widgets as $widget ) {
84
- require_once dirname( __FILE__ ) . '/widgets/elementor/' . $widget . '.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  }
86
 
87
- // Pricing table
88
- $widget = new ElementorExtraWidgets\Pricing_Table();
89
- $widgets_manager->register_widget_type( $widget );
90
- // Services
91
- $widget = new ElementorExtraWidgets\Services();
92
- $widgets_manager->register_widget_type( $widget );
93
- // Posts grid
94
- $widget = new ElementorExtraWidgets\Posts_Grid();
95
- $widgets_manager->register_widget_type( $widget );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  }
97
 
98
  /**
@@ -135,6 +174,52 @@ if ( ! class_exists( '\ThemeIsle\ElementorExtraWidgets' ) ) {
135
  register_widget( 'EAW_Recent_Posts_Plus' );
136
  }
137
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
138
  /**
139
  *
140
  * @static
22
  * The version of this library
23
  * @var string
24
  */
25
+ public static $version = '1.0.1';
26
 
27
  /**
28
  * Defines the library behaviour
38
  add_action( 'wp_enqueue_scripts', array( $this, 'register_assets' ), 999 );
39
 
40
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'add_elementor_widgets' ) );
41
+ if ( ! defined( 'EAW_PRO_VERSION' ) ) {
42
+ add_action( 'elementor/editor/after_enqueue_scripts', array( $this, 'enqueue_sidebar_css' ) );
43
+ }
44
  }
45
 
46
  /**
49
  public function add_elementor_category() {
50
 
51
  $category_args = apply_filters( 'elementor_extra_widgets_category_args', array(
52
+ 'slug' => 'obfx-elementor-widgets',
53
  'title' => __( 'Orbit Fox Addons', 'themeisle-companion' ),
54
  'icon' => 'fa fa-plug',
55
  ) );
56
 
57
+ // add a separate category for the premium widgets
58
+ \Elementor\Plugin::instance()->elements_manager->add_category(
59
+ $category_args['slug'] . '-pro',
60
+ array(
61
+ 'title' => 'Premium ' . $category_args['title'],
62
+ 'icon' => $category_args['slug'],
63
+ ),
64
+ 1
65
+ );
66
+
67
  \Elementor\Plugin::instance()->elements_manager->add_category(
68
  $category_args['slug'],
69
  array(
72
  ),
73
  1
74
  );
 
75
  }
76
 
77
  public function register_assets() {
80
  wp_register_style( 'eaw-elementor', plugins_url( '/css/public.css', __FILE__ ), array(), $this::$version );
81
  }
82
 
83
+ public function enqueue_sidebar_css() {
84
+ wp_enqueue_style( 'eaw-elementor-admin', plugins_url( '/css/admin.css', __FILE__ ), array(), $this::$version );
85
+ }
86
  /**
87
+ * Require and instantiate Elementor Widgets and Premium Placeholders.
88
  *
89
  * @param $widgets_manager
90
  */
91
  public function add_elementor_widgets( $widgets_manager ) {
92
+ $elementor_widgets = $this->get_dir_files( __DIR__ . '/widgets/elementor' );
 
 
 
 
93
 
94
  foreach ( $elementor_widgets as $widget ) {
95
+ require_once $widget;
96
+
97
+ $widget = basename( $widget, ".php" );
98
+
99
+ if ( $widget === 'premium-placeholder' ) {// avoid instantiate an abstract class
100
+ continue;
101
+ }
102
+
103
+ $classname = $this->convert_filename_to_classname( $widget );
104
+
105
+ if ( class_exists( $classname ) ) {
106
+ $widget_object = new $classname();
107
+ $widgets_manager->register_widget_type( $widget_object );
108
+ }
109
  }
110
 
111
+ if ( apply_filters( 'eaw_should_load_placeholders', false ) ) {
112
+ $placeholders = $this->get_dir_files( __DIR__ . '/widgets/elementor/placeholders' );
113
+ foreach ( $placeholders as $widget ) {
114
+ require_once $widget;
115
+ }
116
+
117
+ do_action( 'eaw_before_pro_widgets', $placeholders, $widgets_manager );
118
+
119
+ foreach ( $placeholders as $widget ) {
120
+ $widget = basename( $widget, ".php" );
121
+
122
+ $classname = $this->convert_filename_to_classname( $widget );
123
+
124
+ // Maybe Premium Elements
125
+ if ( ! class_exists( $classname ) ) {
126
+ $classname = $classname . '_Placeholder';
127
+ }
128
+
129
+ if ( class_exists( $classname ) ) {
130
+ $widget_object = new $classname();
131
+ $widgets_manager->register_widget_type( $widget_object );
132
+ }
133
+ }
134
+ }
135
  }
136
 
137
  /**
174
  register_widget( 'EAW_Recent_Posts_Plus' );
175
  }
176
 
177
+ /**
178
+ * Returns an array of all PHP files in the specified absolute path.
179
+ * Inspired from jetpack's glob_php
180
+ *
181
+ * @param string $absolute_path The absolute path of the directory to search.
182
+ *
183
+ * @return array Array of absolute paths to the PHP files.
184
+ */
185
+ protected function get_dir_files( $absolute_path ) {
186
+ if ( function_exists( 'glob' ) ) {
187
+ return glob( "$absolute_path/*.php" );
188
+ }
189
+
190
+ $absolute_path = untrailingslashit( $absolute_path );
191
+ $files = array();
192
+ if ( ! $dir = @opendir( $absolute_path ) ) {
193
+ return $files;
194
+ }
195
+
196
+ while ( false !== $file = readdir( $dir ) ) {
197
+ if ( '.' == substr( $file, 0, 1 ) || '.php' != substr( $file, - 4 ) ) {
198
+ continue;
199
+ }
200
+
201
+ $file = "$absolute_path/$file";
202
+
203
+ if ( ! is_file( $file ) ) {
204
+ continue;
205
+ }
206
+
207
+ $files[] = $file;
208
+ }
209
+
210
+ closedir( $dir );
211
+
212
+ return $files;
213
+ }
214
+
215
+ protected function convert_filename_to_classname( $widget ) {
216
+ $classname = ucwords( $widget, "-" );
217
+ $classname = str_replace( '-', '_', $classname );
218
+ $classname = '\\ThemeIsle\\ElementorExtraWidgets\\' . $classname;
219
+
220
+ return $classname;
221
+ }
222
+
223
  /**
224
  *
225
  * @static
vendor/codeinwp/elementor-extra-widgets/composer.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "name": "codeinwp/elementor-extra-widgets",
3
  "type": "library",
4
- "version": "1.0.0",
5
  "license": "GPL-3.0-or-later",
6
  "minimum-stability": "dev",
7
  "homepage": "https://github.com/Codeinwp/elementor-extra-widgets",
1
  {
2
  "name": "codeinwp/elementor-extra-widgets",
3
  "type": "library",
4
+ "version": "1.0.1",
5
  "license": "GPL-3.0-or-later",
6
  "minimum-stability": "dev",
7
  "homepage": "https://github.com/Codeinwp/elementor-extra-widgets",
vendor/codeinwp/elementor-extra-widgets/css/admin.css ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .panel-elements-category-title-eaw-elementor-widgets-pro + .panel-elements-category-items .elementor-element {
2
+ position: relative;
3
+ }
4
+ .panel-elements-category-title-eaw-elementor-widgets-pro + .panel-elements-category-items .elementor-element:before {
5
+ content:"PRO";
6
+ position: absolute;
7
+ background: #b7084e;
8
+ color: #fff;
9
+ border-radius: 3px;
10
+ padding: 3px 5px;
11
+ top: 5px;
12
+ right: 5px;
13
+ font-size: 10px;
14
+ font-weight: 700;
15
+ }
vendor/codeinwp/elementor-extra-widgets/js/obfx-grid.js CHANGED
@@ -1,5 +1,6 @@
1
  /* global elementor */
2
  (function ($) {
 
3
  $( document ).ready(
4
  function () {
5
  checkImageSize();
@@ -15,7 +16,7 @@
15
  if ( typeof elementor !== 'undefined' ) {
16
  $( window ).on(
17
  'elementor/frontend/init', function () {
18
- elementor.hooks.addAction(
19
  'panel/open_editor/widget/obfx-posts-grid', function ( panel ) {
20
  var $element = panel.$el.find( '.elementor-control-section_grid_image' );
21
  $element.click(
@@ -46,12 +47,11 @@
46
  imageHeight = $( this ).find( '.obfx-grid-col-image img' ).height();
47
 
48
  if ( $( this ).find( '.obfx-grid-col-image' ).length > 0 ) {
49
-
50
  if ( containerHeight > imageHeight ) {
51
  container.addClass( 'obfx-fit-height' );
52
  }
53
 
54
- if ( containerWidth > imageWidth && container.hasClass( 'obfx-fit-height' ) ) {
55
  container.removeClass( 'obfx-fit-height' );
56
  }
57
  }
1
  /* global elementor */
2
  (function ($) {
3
+
4
  $( document ).ready(
5
  function () {
6
  checkImageSize();
16
  if ( typeof elementor !== 'undefined' ) {
17
  $( window ).on(
18
  'elementor/frontend/init', function () {
19
+ elementor.hooks.addAction(
20
  'panel/open_editor/widget/obfx-posts-grid', function ( panel ) {
21
  var $element = panel.$el.find( '.elementor-control-section_grid_image' );
22
  $element.click(
47
  imageHeight = $( this ).find( '.obfx-grid-col-image img' ).height();
48
 
49
  if ( $( this ).find( '.obfx-grid-col-image' ).length > 0 ) {
 
50
  if ( containerHeight > imageHeight ) {
51
  container.addClass( 'obfx-fit-height' );
52
  }
53
 
54
+ if ( (containerWidth - imageWidth > 2) && container.hasClass( 'obfx-fit-height' ) ) {
55
  container.removeClass( 'obfx-fit-height' );
56
  }
57
  }
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/flipcard.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ThemeIsle\ElementorExtraWidgets;
4
+
5
+ class Flipcard_Placeholder extends Premium_Placeholder {
6
+
7
+ public function get_title() {
8
+ return 'Flipcard';
9
+ }
10
+
11
+ public function get_name() {
12
+ return 'eaw_flipcard';
13
+ }
14
+
15
+ public function get_pro_element_name() {
16
+ return 'flipcard';
17
+ }
18
+
19
+ /**
20
+ * Widget icon.
21
+ *
22
+ * @return string
23
+ */
24
+ public function get_icon() {
25
+ return 'fa fa-share-square';
26
+ }
27
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/review-box.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ThemeIsle\ElementorExtraWidgets;
4
+
5
+ class Review_Box_Placeholder extends Premium_Placeholder {
6
+
7
+ public function get_title() {
8
+ return 'Review Box';
9
+ }
10
+
11
+ public function get_pro_element_name() {
12
+ return 'review-box';
13
+ }
14
+
15
+ /**
16
+ * Widget icon.
17
+ *
18
+ * @return string
19
+ */
20
+ public function get_icon() {
21
+ return 'fa fa-star';
22
+ }
23
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/share-buttons.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ThemeIsle\ElementorExtraWidgets;
4
+
5
+ class Share_Buttons_Placeholder extends Premium_Placeholder {
6
+
7
+ public function get_title() {
8
+ return 'Share Buttons';
9
+ }
10
+
11
+ public function get_pro_element_name() {
12
+ return 'share-buttons';
13
+ }
14
+
15
+ /**
16
+ * Widget icon.
17
+ *
18
+ * @return string
19
+ */
20
+ public function get_icon() {
21
+ return 'fa fa-share-alt';
22
+ }
23
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/placeholders/typed-headline.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ThemeIsle\ElementorExtraWidgets;
4
+
5
+ class Typed_Headline_Placeholder extends Premium_Placeholder {
6
+
7
+ public function get_title() {
8
+ return 'Typed Headline';
9
+ }
10
+
11
+ public function get_pro_element_name() {
12
+ return 'typed-headline';
13
+ }
14
+
15
+ /**
16
+ * Widget icon.
17
+ *
18
+ * @return string
19
+ */
20
+ public function get_icon() {
21
+ return 'fa fa-h-square';
22
+ }
23
+ }
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/posts-grid.php CHANGED
@@ -48,6 +48,15 @@ class Posts_Grid extends \Elementor\Widget_Base {
48
  return 'obfx-posts-grid';
49
  }
50
 
 
 
 
 
 
 
 
 
 
51
  /**
52
  * Widget Category.
53
  *
@@ -55,7 +64,8 @@ class Posts_Grid extends \Elementor\Widget_Base {
55
  */
56
  public function get_categories() {
57
  $category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
58
- $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
 
59
  return [ $slug ];
60
  }
61
 
@@ -480,6 +490,16 @@ class Posts_Grid extends \Elementor\Widget_Base {
480
  ]
481
  );
482
 
 
 
 
 
 
 
 
 
 
 
483
  // Length.
484
  $this->add_control(
485
  'grid_content_length',
@@ -488,6 +508,9 @@ class Posts_Grid extends \Elementor\Widget_Base {
488
  'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Length (words)', 'themeisle-companion' ),
489
  'placeholder' => __( 'Length of content (words)', 'themeisle-companion' ),
490
  'default' => 30,
 
 
 
491
  ]
492
  );
493
 
@@ -1665,15 +1688,18 @@ class Posts_Grid extends \Elementor\Widget_Base {
1665
  */
1666
  protected function renderContent() {
1667
  $settings = $this->get_settings();
1668
-
1669
  if ( $settings['grid_content_hide'] !== 'yes' ) { ?>
1670
  <div class="entry-content obfx-grid-content">
1671
  <?php
1672
- if ( empty( $settings['grid_content_length'] ) ) {
1673
- the_excerpt();
1674
  } else {
1675
- echo wp_trim_words( get_the_excerpt(), $settings['grid_content_length'] );
1676
- } ?>
 
 
 
 
1677
  </div>
1678
  <?php
1679
  }
@@ -1717,7 +1743,8 @@ class Posts_Grid extends \Elementor\Widget_Base {
1717
  break;
1718
  } ?>
1719
  <span class="obfx-grid-categories-item">
1720
- <a href="<?php echo get_category_link( $category->term_id ); ?>" title="<?php echo $category->name; ?>">
 
1721
  <?php echo $category->name; ?>
1722
  </a>
1723
  </span>
48
  return 'obfx-posts-grid';
49
  }
50
 
51
+ /**
52
+ * Register dependent script.
53
+ *
54
+ * @return array
55
+ */
56
+ public function get_script_depends() {
57
+ return [ 'obfx-grid-js' ];
58
+ }
59
+
60
  /**
61
  * Widget Category.
62
  *
64
  */
65
  public function get_categories() {
66
  $category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
67
+ $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
68
+
69
  return [ $slug ];
70
  }
71
 
490
  ]
491
  );
492
 
493
+ // Show full content.
494
+ $this->add_control(
495
+ 'grid_content_full_post',
496
+ [
497
+ 'label' => __( 'Show full content', 'themeisle-companion' ),
498
+ 'type' => \Elementor\Controls_Manager::SWITCHER,
499
+ 'default' => '',
500
+ ]
501
+ );
502
+
503
  // Length.
504
  $this->add_control(
505
  'grid_content_length',
508
  'label' => '<i class="fa fa-arrows-h"></i> ' . __( 'Length (words)', 'themeisle-companion' ),
509
  'placeholder' => __( 'Length of content (words)', 'themeisle-companion' ),
510
  'default' => 30,
511
+ 'condition' => [
512
+ 'grid_content_full_post!' => 'yes'
513
+ ]
514
  ]
515
  );
516
 
1688
  */
1689
  protected function renderContent() {
1690
  $settings = $this->get_settings();
 
1691
  if ( $settings['grid_content_hide'] !== 'yes' ) { ?>
1692
  <div class="entry-content obfx-grid-content">
1693
  <?php
1694
+ if( $settings['grid_content_full_post'] === 'yes' ) {
1695
+ the_content();
1696
  } else {
1697
+ if ( empty( $settings['grid_content_length'] ) ) {
1698
+ the_excerpt();
1699
+ } else {
1700
+ echo wp_trim_words( get_the_excerpt(), $settings['grid_content_length'] );
1701
+ }
1702
+ }?>
1703
  </div>
1704
  <?php
1705
  }
1743
  break;
1744
  } ?>
1745
  <span class="obfx-grid-categories-item">
1746
+ <a href="<?php echo get_category_link( $category->term_id ); ?>"
1747
+ title="<?php echo $category->name; ?>">
1748
  <?php echo $category->name; ?>
1749
  </a>
1750
  </span>
vendor/codeinwp/elementor-extra-widgets/widgets/elementor/premium-placeholder.php ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ThemeIsle\ElementorExtraWidgets;
4
+
5
+ /**
6
+ * Create an abstract class as a base for all the Premium Widgets
7
+ * This way, we'll configure the a Placeholder Widget in Lite plugins which will be overwritten in the Pro plugin.
8
+ */
9
+ abstract class Premium_Placeholder extends \Elementor\Widget_Base {
10
+ /**
11
+ * Each Placeholder must declare for which Premium Widget will keep the place warm
12
+ * @return mixed
13
+ */
14
+ abstract public function get_pro_element_name();
15
+
16
+ /**
17
+ * The widget's name will probably be the pro_element_name.
18
+ * @return mixed|string
19
+ */
20
+ public function get_name() {
21
+ return 'eaw-' . $this->get_pro_element_name();
22
+ }
23
+
24
+ /**
25
+ * Returns the up-sell link for premium widgets.
26
+ * It should be overwritten in the extended class.
27
+ *
28
+ * @return string
29
+ */
30
+ public function get_upsell_link() {
31
+ if ( ! defined( 'SIZZIFY_UPSELL_LINK' ) ) {
32
+ return 'https://themeisle.com/wordpress-plugins';
33
+ }
34
+ return SIZZIFY_UPSELL_LINK;
35
+ }
36
+
37
+ /**
38
+ * Get widget icon.
39
+ *
40
+ * @return string
41
+ */
42
+ public function get_icon() {
43
+ return 'eicon-insert-image';
44
+ }
45
+
46
+ /**
47
+ * The Widget Category is filterable, so we need some extra logic to handle it better.
48
+ * Premium category is suffixed with `-pro` string.
49
+ *
50
+ * @return array
51
+ */
52
+ public function get_categories() {
53
+ $category_args = apply_filters( 'elementor_extra_widgets_category_args', array() );
54
+ $slug = isset( $category_args['slug'] ) ? $category_args['slug'] : 'obfx-elementor-widgets';
55
+
56
+ return array( $slug . '-pro' );
57
+ }
58
+
59
+ /**
60
+ * Register Elementor Controls.
61
+ *
62
+ * Because this is just a placeholder widget, we need to output this to the Lite users.
63
+ */
64
+ protected function _register_controls() {
65
+ $this->start_controls_section(
66
+ 'section_title',
67
+ [
68
+ 'label' => $this->get_title()
69
+ ]
70
+ );
71
+
72
+ $this->add_control(
73
+ 'inform_about_placeholder',
74
+ [
75
+ 'raw' => sprintf(
76
+ '<div><h3>%s</h3><a href="%s" target="_blank">%s</a></div>',
77
+ __( 'This widget is part of the pro version of Sizzify.', 'themeisle-companion' ),
78
+ $this->get_upsell_link(),
79
+ __( 'Upgrade Here!', 'themeisle-companion' )
80
+ ),
81
+ 'type' => \Elementor\Controls_Manager::RAW_HTML,
82
+ 'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
83
+ ]
84
+ );
85
+
86
+ $this->end_controls_section(); // end section-title
87
+
88
+ }
89
+
90
+ /**
91
+ * A placeholder should not output anything in front-end.
92
+ * Only on the editor side will output a message about it's type.
93
+ */
94
+ public function render() {
95
+ if ( \Elementor\Plugin::$instance->editor->is_edit_mode() ) { ?>
96
+ <div class="elementor-premium-placeholder" role="tablist"
97
+ style="position: relative;
98
+ background: #fff;
99
+ color: red;
100
+ text-align: center;"
101
+ >
102
+ <h3 style="color:red"><?php echo $this->get_title(); ?></h3>
103
+ <i class="elementor-widget-empty-icon eicon-insert-image"
104
+ style="font-size: 100px;
105
+ vertical-align: middle;
106
+ color: grey"></i>
107
+ <p>This is a Premium widget. You need to buy it to use it.</p>
108
+ </div>
109
+ <?php }
110
+ }
111
+ }
vendor/codeinwp/templates-directory/LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
vendor/codeinwp/templates-directory/class-page-templates-directory.php ADDED
@@ -0,0 +1,571 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace ThemeIsle;
4
+
5
+ if ( ! class_exists( '\ThemeIsle\PageTemplatesDirectory' ) ) {
6
+ class PageTemplatesDirectory {
7
+
8
+ /**
9
+ * @var PageTemplatesDirectory
10
+ */
11
+ protected static $instance = null;
12
+
13
+ /**
14
+ * The version of this library
15
+ * @var string
16
+ */
17
+ public static $version = '1.0.2';
18
+
19
+ /**
20
+ * Holds the module slug.
21
+ *
22
+ * @since 1.0.0
23
+ * @access protected
24
+ * @var string $slug The module slug.
25
+ */
26
+ protected $slug = 'templates-directory';
27
+
28
+ protected $source_url;
29
+
30
+ /**
31
+ * Defines the library behaviour
32
+ */
33
+ protected function init() {
34
+ add_action( 'rest_api_init', array( $this, 'register_endpoints' ) );
35
+ //Add dashboard menu page.
36
+ add_action( 'admin_menu', array( $this, 'add_menu_page' ), 100 );
37
+ //Add rewrite endpoint.
38
+ add_action( 'init', array( $this, 'demo_listing_register' ) );
39
+ //Add template redirect.
40
+ add_action( 'template_redirect', array( $this, 'demo_listing' ) );
41
+ //Enqueue admin scripts.
42
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_template_dir_scripts' ) );
43
+ // Get the full-width pages feature
44
+ add_action( 'init', array( $this, 'load_full_width_page_templates' ), 11 );
45
+ // Remove the blank template from the page template selector
46
+ add_filter( 'fwpt_templates_list', array( $this, 'filter_fwpt_templates_list' ) );
47
+ // Filter to add fetched.
48
+ add_filter( 'template_directory_templates_list', array( $this, 'filter_templates' ), 99 );
49
+
50
+
51
+ $default_source_url = apply_filters( 'templates_directory_source_url', 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/' );
52
+ $this->set_source_url( $default_source_url );
53
+ }
54
+
55
+ /**
56
+ * Enqueue the scripts for the dashboard page of the
57
+ */
58
+ public function enqueue_template_dir_scripts() {
59
+ $current_screen = get_current_screen();
60
+ if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' || $current_screen->id === 'sizzify_page_sizzify_template_dir' ) {
61
+ if( $current_screen->id === 'orbit-fox_page_obfx_template_dir' ) {
62
+ $plugin_slug = 'obfx';
63
+ } else {
64
+ $plugin_slug = 'sizzify';
65
+ }
66
+ $script_handle = $this->slug . '-script';
67
+ wp_enqueue_script( 'plugin-install' );
68
+ wp_enqueue_script( 'updates' );
69
+ wp_register_script( $script_handle, plugin_dir_url( $this->get_dir() ) . $this->slug . '/js/script.js', array( 'jquery' ), $this::$version );
70
+ wp_localize_script( $script_handle, 'importer_endpoint',
71
+ array(
72
+ 'url' => $this->get_endpoint_url( '/import_elementor' ),
73
+ 'plugin_slug' => $plugin_slug,
74
+ 'fetch_templates_url' => $this->get_endpoint_url( '/fetch_templates' ),
75
+ 'nonce' => wp_create_nonce( 'wp_rest' ),
76
+ ) );
77
+ wp_enqueue_script( $script_handle );
78
+ wp_enqueue_style( $this->slug . '-style', plugin_dir_url( $this->get_dir() ) . $this->slug . '/css/admin.css', array(), $this::$version );
79
+ }
80
+ }
81
+
82
+ /**
83
+ *
84
+ *
85
+ * @param string $path
86
+ *
87
+ * @return string
88
+ */
89
+ public function get_endpoint_url( $path = '' ) {
90
+ return rest_url( $this->slug . $path );
91
+ }
92
+
93
+ /**
94
+ * Register Rest endpoint for requests.
95
+ */
96
+ public function register_endpoints() {
97
+ register_rest_route( $this->slug, '/import_elementor', array(
98
+ 'methods' => 'POST',
99
+ 'callback' => array( $this, 'import_elementor' ),
100
+ ) );
101
+ register_rest_route( $this->slug, '/fetch_templates', array(
102
+ 'methods' => 'POST',
103
+ 'callback' => array( $this, 'fetch_templates' ),
104
+ ) );
105
+ }
106
+
107
+ /**
108
+ * Function to fetch templates.
109
+ *
110
+ * @return array|bool|\WP_Error
111
+ */
112
+ public function fetch_templates() {
113
+ if ( ! current_user_can( 'manage_options' ) ) {
114
+ return false;
115
+ }
116
+ if( empty ( $_POST['plugin_slug'] ) ) {
117
+ return false;
118
+ }
119
+
120
+ $plugin_slug = $_POST['plugin_slug'];
121
+ $query_args = array( 'license' => '', 'url' => get_home_url(), 'name' => $plugin_slug );
122
+
123
+ $license = get_option('eaw_premium_license');
124
+ if( !empty ( $license ) ) {
125
+ $query_args['license'] = $license;
126
+ }
127
+ $url = add_query_arg( $query_args, 'https://themeisle.com/?edd_action=get_templates' );
128
+
129
+ $request = wp_remote_post( esc_url_raw( $url ) );
130
+ $response = json_decode( $request['body'], true );
131
+
132
+ if( !empty( $response ) ) {
133
+ update_option( $plugin_slug . '_synced_templates', $response );
134
+ }
135
+ die();
136
+ }
137
+
138
+ public function filter_templates($templates) {
139
+ $current_screen = get_current_screen();
140
+ if ( $current_screen->id === 'orbit-fox_page_obfx_template_dir' ) {
141
+ $fetched = get_option( 'obfx_synced_templates' );
142
+ } else {
143
+ $fetched = get_option( 'sizzify_synced_templates' );
144
+ }
145
+ if( ! isset( $fetched ) ) {
146
+ return $templates;
147
+ }
148
+ if( ! is_array( $fetched ) ) {
149
+ return $templates;
150
+ }
151
+ $new_templates = array_merge( $fetched['templates'], $templates );
152
+ return $new_templates;
153
+ }
154
+
155
+ /**
156
+ * The templates list.
157
+ *
158
+ * @return array
159
+ */
160
+ public function templates_list() {
161
+ $defaults_if_empty = array(
162
+ 'title' => __( 'A new Orbit Fox Template', 'themeisle-companion' ),
163
+ 'screenshot' => esc_url( 'https://raw.githubusercontent.com/Codeinwp/obfx-templates/master/placeholder.png' ),
164
+ 'description' => __( 'This is an awesome Orbit Fox Template.', 'themeisle-companion' ),
165
+ 'demo_url' => esc_url( 'https://demo.themeisle.com/hestia-pro-demo-content/demo-placeholder/' ),
166
+ 'import_file' => '',
167
+ 'required_plugins' => array( 'elementor' => array( 'title' => __( 'Elementor Page Builder', 'themeisle-companion' ) ) ),
168
+ );
169
+
170
+ $templates_list = array(
171
+ 'about-our-business-elementor' => array(
172
+ 'title' => __( 'About Our Business', 'themeisle-companion' ),
173
+ 'description' => __( 'Use this layout to present your business in a fancy way. Add an interactive header, shwocase your services via progress bars, introduce your team members, and locate your headquarters on Google Maps. Last but not least, beautify the design by adding catchy images.', 'themeisle-companion' ),
174
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/about-our-business-elementor/',
175
+ 'screenshot' => esc_url( $this->get_source_url() . 'about-our-business-elementor/screenshot.png' ),
176
+ 'import_file' => esc_url( $this->get_source_url() . 'about-our-business-elementor/template.json' ),
177
+ ),
178
+ 'contact-us-elementor' => array(
179
+ 'title' => __( 'Contact Us', 'themeisle-companion' ),
180
+ 'description' => __( 'A clean and simple template for your Contact page, where we integrated our Pirate Forms plugin. It will let your customers send you a message using an intuitive form. A Google map, together with a few other details about your business, completes the section.', 'themeisle-companion' ),
181
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/contact-us-elementor/',
182
+ 'screenshot' => esc_url( $this->get_source_url() . 'contact-us-elementor/screenshot.png' ),
183
+ 'import_file' => esc_url( $this->get_source_url() . 'contact-us-elementor/template.json' ),
184
+ ),
185
+ 'pricing-elementor' => array(
186
+ 'title' => __( 'Pricing', 'themeisle-companion' ),
187
+ 'description' => __( 'If you plan to sell your products online, this layout offers you elegant pricing tables so you can differentiate the features and services for your clients. Also, for a better clarification, the template provides a FAQ area where you can answer people\'s questions.', 'themeisle-companion' ),
188
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pricing-elementor/',
189
+ 'screenshot' => esc_url( $this->get_source_url() . 'pricing-elementor/screenshot.png' ),
190
+ 'import_file' => esc_url( $this->get_source_url() . 'pricing-elementor/template.json' ),
191
+ ),
192
+ 'material-homepage-elementor' => array(
193
+ 'title' => __( 'Material Homepage', 'themeisle-companion' ),
194
+ 'description' => __( 'This layout could be your main website homepage (or you can use it as an alternative homepage, if you wish). It was built on material design and comes with call to action, catchy icons, testimonials, blog posts, pricing plans, and other sections that you can add yourself by customizing it.', 'themeisle-companion' ),
195
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/material-homepage-elementor/',
196
+ 'screenshot' => esc_url( $this->get_source_url() . 'material-homepage-elementor/screenshot.png' ),
197
+ 'import_file' => esc_url( $this->get_source_url() . 'material-homepage-elementor/template.json' ),
198
+ ),
199
+ 'ether-elementor' => array(
200
+ 'title' => __( 'Ether - Landing Page', 'themeisle-companion' ),
201
+ 'description' => __( 'An elegant and modern landing page for e-commerce, coming with a clean interface, beautiful typography, photo galleries, and call to action. If you have an online shop and want to promote a certain product, use this layout to tell people why they should buy it.', 'themeisle-companion' ),
202
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ether-elementor/',
203
+ 'screenshot' => esc_url( $this->get_source_url() . 'ether-elementor/screenshot.png' ),
204
+ 'import_file' => esc_url( $this->get_source_url() . 'ether-elementor/template.json' ),
205
+ ),
206
+ 'jason-elementor' => array(
207
+ 'title' => __( 'Jason - Landing Page', 'themeisle-companion' ),
208
+ 'description' => __( 'A classy template for freelancers, where you can put your skills and knowldge in the spotlight for potential clients. Talk about yourself, your projects, awards, and let people contact you easily. The template is designed to feature one-page scrolling.', 'themeisle-companion' ),
209
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/jason-elementor/',
210
+ 'screenshot' => esc_url( $this->get_source_url() . 'jason-elementor/screenshot.png' ),
211
+ 'import_file' => esc_url( $this->get_source_url() . 'jason-elementor/template.json' ),
212
+ ),
213
+ 'pulse-elementor' => array(
214
+ 'title' => __( 'Pulse - Landing Page', 'themeisle-companion' ),
215
+ 'description' => __( 'A good-looking landing page for products and apps, built to mark the features and services that they offer. The layout provides customer reviews, call to action, beautiful pricing tables, an About section, and a creative design. If you want to promote and sell your brand product, this template might help.', 'themeisle-companion' ),
216
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/pulse-elementor/',
217
+ 'screenshot' => esc_url( $this->get_source_url() . 'pulse-elementor/screenshot.png' ),
218
+ 'import_file' => esc_url( $this->get_source_url() . 'pulse-elementor/template.json' ),
219
+ ),
220
+ 'ascend-elementor' => array(
221
+ 'title' => __( 'Ascend - Landing Page', 'themeisle-companion' ),
222
+ 'description' => __( 'A resume-like template, built for outdoor enthusiasts and nature lovers. Its design and layout make it flexible for any other purpose too, so do not hesitate to showcase any kind of skills and activities, even business-oriented.', 'themeisle-companion' ),
223
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/ascend-elementor/',
224
+ 'screenshot' => esc_url( $this->get_source_url() . 'ascend-elementor/screenshot.png' ),
225
+ 'import_file' => esc_url( $this->get_source_url() . 'ascend-elementor/template.json' ),
226
+ ),
227
+ 'path-elementor' => array(
228
+ 'title' => __( 'Path - Landing Page', 'themeisle-companion' ),
229
+ 'description' => __( 'If you are a business consultant - agency or working on your own - have a look at this template! It comes with a clean design, call to action, statistics, and sections that put your services first.', 'themeisle-companion' ),
230
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/path-elementor/',
231
+ 'screenshot' => esc_url( $this->get_source_url() . 'path-elementor/screenshot.png' ),
232
+ 'import_file' => esc_url( $this->get_source_url() . 'path-elementor/template.json' ),
233
+ ),
234
+ 'mocha-elementor' => array(
235
+ 'title' => __( 'Mocha - Landing Page', 'themeisle-companion' ),
236
+ 'description' => __( 'An elegant and modern template for cafes and pubs, where you can display your menu in a mouth-watering way. Call to action, blog posts, attractive images, tabbed menus, and a catchy design will help you convince more people to stop by.', 'themeisle-companion' ),
237
+ 'demo_url' => 'https://demo.themeisle.com/hestia-pro-demo-content/mocha-elementor/',
238
+ 'screenshot' => esc_url( $this->get_source_url() . 'mocha-elementor/screenshot.png' ),
239
+ 'import_file' => esc_url( $this->get_source_url() . 'mocha-elementor/template.json' ),
240
+ ),
241
+ );
242
+
243
+ foreach ( $templates_list as $template => $properties ) {
244
+ $templates_list[ $template ] = wp_parse_args( $properties, $defaults_if_empty );
245
+ }
246
+
247
+ return apply_filters( 'template_directory_templates_list', $templates_list );
248
+ }
249
+
250
+ /**
251
+ * Register endpoint for themes page.
252
+ */
253
+ public function demo_listing_register() {
254
+ add_rewrite_endpoint( 'obfx_templates', EP_ROOT );
255
+ }
256
+
257
+ /**
258
+ * Return template preview in customizer.
259
+ *
260
+ * @return bool|string
261
+ */
262
+ public function demo_listing() {
263
+ $flag = get_query_var( 'obfx_templates', false );
264
+
265
+ if ( $flag !== '' ) {
266
+ return false;
267
+ }
268
+ if ( ! current_user_can( 'customize' ) ) {
269
+ return false;
270
+ }
271
+ if ( ! is_customize_preview() ) {
272
+ return false;
273
+ }
274
+
275
+ return $this->render_view( 'template-directory-render-template' );
276
+ }
277
+
278
+ /**
279
+ * Add the 'Template Directory' page to the dashboard menu.
280
+ */
281
+ public function add_menu_page() {
282
+ $products = apply_filters( 'obfx_template_dir_products', array() );
283
+ foreach($products as $product){
284
+ add_submenu_page(
285
+ $product['parent_page_slug'], $product['directory_page_title'], __( 'Template Directory', 'themeisle-companion' ), 'manage_options', $product['page_slug'],
286
+ array( $this, 'render_admin_page' )
287
+ );
288
+ }
289
+
290
+ }
291
+
292
+ /**
293
+ * Render the template directory admin page.
294
+ */
295
+ public function render_admin_page() {
296
+ $data = array(
297
+ 'templates_array' => $this->templates_list(),
298
+ );
299
+ echo $this->render_view( 'template-directory-page', $data );
300
+ }
301
+
302
+ /**
303
+ * Utility method to call Elementor import routine.
304
+ */
305
+ public function import_elementor() {
306
+ if ( ! defined( 'ELEMENTOR_VERSION' ) ) {
307
+ return 'no-elementor';
308
+ }
309
+
310
+ require_once( ABSPATH . 'wp-admin' . '/includes/file.php' );
311
+ require_once( ABSPATH . 'wp-admin' . '/includes/image.php' );
312
+
313
+ $template = download_url( esc_url( $_POST['template_url'] ) );
314
+ $_FILES['file']['tmp_name'] = $template;
315
+ $elementor = new \Elementor\TemplateLibrary\Source_Local;
316
+ $elementor->import_template();
317
+ unlink( $template );
318
+
319
+ $args = array(
320
+ 'post_type' => 'elementor_library',
321
+ 'nopaging' => true,
322
+ 'posts_per_page' => '1',
323
+ 'orderby' => 'date',
324
+ 'order' => 'DESC',
325
+ 'suppress_filters' => true,
326
+ );
327
+
328
+ $query = new \WP_Query( $args );
329
+
330
+ $last_template_added = $query->posts[0];
331
+ //get template id
332
+ $template_id = $last_template_added->ID;
333
+
334
+ wp_reset_query();
335
+ wp_reset_postdata();
336
+
337
+ //page content
338
+ $page_content = $last_template_added->post_content;
339
+ //meta fields
340
+ $elementor_data_meta = get_post_meta( $template_id, '_elementor_data' );
341
+ $elementor_ver_meta = get_post_meta( $template_id, '_elementor_version' );
342
+ $elementor_edit_mode_meta = get_post_meta( $template_id, '_elementor_edit_mode' );
343
+ $elementor_css_meta = get_post_meta( $template_id, '_elementor_css' );
344
+
345
+ $elementor_metas = array(
346
+ '_elementor_data' => ! empty( $elementor_data_meta[0] ) ? wp_slash( $elementor_data_meta[0] ) : '',
347
+ '_elementor_version' => ! empty( $elementor_ver_meta[0] ) ? $elementor_ver_meta[0] : '',
348
+ '_elementor_edit_mode' => ! empty( $elementor_edit_mode_meta[0] ) ? $elementor_edit_mode_meta[0] : '',
349
+ '_elementor_css' => $elementor_css_meta,
350
+ );
351
+
352
+ // Create post object
353
+ $new_template_page = array(
354
+ 'post_type' => 'page',
355
+ 'post_title' => $_POST['template_name'],
356
+ 'post_status' => 'publish',
357
+ 'post_content' => $page_content,
358
+ 'meta_input' => $elementor_metas,
359
+ 'page_template' => apply_filters( 'template_directory_default_template', 'templates/builder-fullwidth-std.php' )
360
+ );
361
+
362
+ $current_theme = wp_get_theme();
363
+
364
+ switch ( $current_theme->get_template() ) {
365
+ case 'hestia-pro':
366
+ case 'hestia':
367
+ $new_template_page['page_template'] = 'page-templates/template-pagebuilder-full-width.php';
368
+ break;
369
+ case 'zerif-lite':
370
+ case 'zerif-pro':
371
+ $new_template_page['page_template'] = 'template-fullwidth-no-title.php';
372
+ break;
373
+ }
374
+
375
+ $post_id = wp_insert_post( $new_template_page );
376
+
377
+ $redirect_url = add_query_arg( array(
378
+ 'post' => $post_id,
379
+ 'action' => 'elementor',
380
+ ), admin_url( 'post.php' ) );
381
+
382
+ return ( $redirect_url );
383
+
384
+ die();
385
+ }
386
+
387
+ /**
388
+ * Generate action button html.
389
+ *
390
+ * @param string $slug plugin slug.
391
+ *
392
+ * @return string
393
+ */
394
+ public function get_button_html( $slug ) {
395
+ $button = '';
396
+ $state = $this->check_plugin_state( $slug );
397
+ if ( ! empty( $slug ) ) {
398
+ switch ( $state ) {
399
+ case 'install':
400
+ $nonce = wp_nonce_url(
401
+ add_query_arg(
402
+ array(
403
+ 'action' => 'install-plugin',
404
+ 'from' => 'import',
405
+ 'plugin' => $slug,
406
+ ),
407
+ network_admin_url( 'update.php' )
408
+ ),
409
+ 'install-plugin_' . $slug
410
+ );
411
+ $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>';
412
+ break;
413
+ case 'activate':
414
+ $plugin_link_suffix = $slug . '/' . $slug . '.php';
415
+ $nonce = add_query_arg(
416
+ array(
417
+ 'action' => 'activate',
418
+ 'plugin' => rawurlencode( $plugin_link_suffix ),
419
+ '_wpnonce' => wp_create_nonce( 'activate-plugin_' . $plugin_link_suffix ),
420
+ ), network_admin_url( 'plugins.php' )
421
+ );
422
+ $button .= '<a data-slug="' . $slug . '" class="activate-now button button-primary" href="' . esc_url( $nonce ) . '" aria-label="Activate ' . $slug . '">' . __( 'Activate', 'themeisle-companion' ) . '</a>';
423
+ break;
424
+ }// End switch().
425
+ }// End if().
426
+ return $button;
427
+ }
428
+
429
+ /**
430
+ * Getter method for the source url
431
+ * @return mixed
432
+ */
433
+ public function get_source_url() {
434
+ return $this->source_url;
435
+ }
436
+
437
+ /**
438
+ * Setting method for source url
439
+ *
440
+ * @param $url
441
+ */
442
+ protected function set_source_url( $url ) {
443
+ $this->source_url = $url;
444
+ }
445
+
446
+ /**
447
+ * Check plugin state.
448
+ *
449
+ * @param string $slug plugin slug.
450
+ *
451
+ * @return bool
452
+ */
453
+ public function check_plugin_state( $slug ) {
454
+ if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/' . $slug . '.php' ) || file_exists( WP_CONTENT_DIR . '/plugins/' . $slug . '/index.php' ) ) {
455
+ require_once( ABSPATH . 'wp-admin' . '/includes/plugin.php' );
456
+ $needs = ( is_plugin_active( $slug . '/' . $slug . '.php' ) ||
457
+ is_plugin_active( $slug . '/index.php' ) ) ?
458
+ 'deactivate' : 'activate';
459
+
460
+ return $needs;
461
+ } else {
462
+ return 'install';
463
+ }
464
+ }
465
+
466
+ /**
467
+ * If the composer library is present let's try to init.
468
+ */
469
+ public function load_full_width_page_templates() {
470
+ if ( class_exists( '\ThemeIsle\FullWidthTemplates' ) ) {
471
+ \ThemeIsle\FullWidthTemplates::instance();
472
+ }
473
+ }
474
+
475
+ /**
476
+ * By default the composer library "Full Width Page Templates" comes with two page templates: a blank one and a full
477
+ * width one with the header and footer inherited from the active theme.
478
+ * OBFX Template directory doesn't need the blonk one, so we are going to ditch it.
479
+ *
480
+ * @param array $list
481
+ *
482
+ * @return array
483
+ */
484
+ public function filter_fwpt_templates_list( $list ) {
485
+ unset( $list['templates/builder-fullwidth.php'] );
486
+
487
+ return $list;
488
+ }
489
+
490
+ /**
491
+ * Utility method to render a view from module.
492
+ *
493
+ * @codeCoverageIgnore
494
+ *
495
+ * @since 1.0.0
496
+ * @access protected
497
+ *
498
+ * @param string $view_name The view name w/o the `-tpl.php` part.
499
+ * @param array $args An array of arguments to be passed to the view.
500
+ *
501
+ * @return string
502
+ */
503
+ protected function render_view( $view_name, $args = array() ) {
504
+ ob_start();
505
+ $file = $this->get_dir() . '/views/' . $view_name . '-tpl.php';
506
+ if ( ! empty( $args ) ) {
507
+ foreach ( $args as $obfx_rh_name => $obfx_rh_value ) {
508
+ $$obfx_rh_name = $obfx_rh_value;
509
+ }
510
+ }
511
+ if ( file_exists( $file ) ) {
512
+ include $file;
513
+ }
514
+
515
+ return ob_get_clean();
516
+ }
517
+
518
+ /**
519
+ * Method to return path to child class in a Reflective Way.
520
+ *
521
+ * @since 1.0.0
522
+ * @access protected
523
+ * @return string
524
+ */
525
+ protected function get_dir() {
526
+ return dirname( __FILE__ );
527
+ }
528
+
529
+ /**
530
+ * @static
531
+ * @since 1.0.0
532
+ * @access public
533
+ * @return PageTemplatesDirectory
534
+ */
535
+ public static function instance() {
536
+ if ( is_null( self::$instance ) ) {
537
+ self::$instance = new self();
538
+ self::$instance->init();
539
+ }
540
+
541
+ return self::$instance;
542
+ }
543
+
544
+ /**
545
+ * Throw error on object clone
546
+ *
547
+ * The whole idea of the singleton design pattern is that there is a single
548
+ * object therefore, we don't want the object to be cloned.
549
+ *
550
+ * @access public
551
+ * @since 1.0.0
552
+ * @return void
553
+ */
554
+ public function __clone() {
555
+ // Cloning instances of the class is forbidden.
556
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
557
+ }
558
+
559
+ /**
560
+ * Disable unserializing of the class
561
+ *
562
+ * @access public
563
+ * @since 1.0.0
564
+ * @return void
565
+ */
566
+ public function __wakeup() {
567
+ // Unserializing instances of the class is forbidden.
568
+ _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'themeisle-companion' ), '1.0.0' );
569
+ }
570
+ }
571
+ }
vendor/codeinwp/templates-directory/composer.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "codeinwp/templates-directory",
3
+ "description": "A WordPress library to manage page templates.",
4
+ "type": "library",
5
+ "version": "1.0.2",
6
+ "license": "GPL-2.0-or-later",
7
+ "homepage": "https://github.com/Codeinwp/templates-directory",
8
+ "authors": [
9
+ {
10
+ "name": "ThemeIsle team",
11
+ "email": "friends@themeisle.com",
12
+ "homepage": "https://themeisle.com"
13
+ }
14
+ ],
15
+ "autoload": {
16
+ "files": [
17
+ "load.php"
18
+ ]
19
+ },
20
+ "require": {
21
+ "codeinwp/full-width-page-templates": "master"
22
+ },
23
+ "support": {
24
+ "issues": "https://github.com/Codeinwp/templates-directory/issues"
25
+ },
26
+ "minimum-stability": "dev",
27
+ "prefer-stable": true
28
+ }
{obfx_modules/template-directory → vendor/codeinwp/templates-directory}/css/admin.css RENAMED
@@ -21,6 +21,26 @@
21
  box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1);
22
  cursor: pointer;
23
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
  .obfx-template:nth-child(3n) {
26
  margin-right: 0;
@@ -154,7 +174,7 @@
154
  }
155
 
156
  .obfx-hide {
157
- display: none;
158
  }
159
 
160
  .obfx-import-elementor-hidden-form {
@@ -230,6 +250,7 @@
230
 
231
  .obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info .theme-screenshot {
232
  width: 100%;
 
233
  }
234
 
235
  .obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info {
@@ -285,6 +306,14 @@
285
  display: none;
286
  }
287
 
 
 
 
 
 
 
 
 
288
  @media only screen and (min-width: 1640px) {
289
  .obfx-template {
290
  width: 22.7%;
@@ -334,4 +363,4 @@
334
  .obfx-template:nth-child(5n) {
335
  margin-right: 0;
336
  }
337
- }
21
  box-shadow: 0 1px 1px -1px rgba(0,0,0,0.1);
22
  cursor: pointer;
23
  }
24
+ .obfx-preview-wrap {
25
+ margin: 15px 0;
26
+ position: relative;
27
+ }
28
+
29
+ .obfx-preview-wrap .badge,
30
+ .obfx-template .badge {
31
+ position: absolute;
32
+ color: #fff;
33
+ z-index: 10;
34
+ background-color: #00a6e3;
35
+ padding: 7px 12px;
36
+ text-transform: uppercase;
37
+ border-radius: 0 0 3px 0;
38
+ top: 1px;
39
+ left: 0;
40
+ box-shadow: 2px 2px 2px 0 rgba(0,0,0,0.25);
41
+ font-weight: 500;
42
+ font-size: 20px;
43
+ }
44
 
45
  .obfx-template:nth-child(3n) {
46
  margin-right: 0;
174
  }
175
 
176
  .obfx-hide {
177
+ display: none !important;
178
  }
179
 
180
  .obfx-import-elementor-hidden-form {
250
 
251
  .obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info .theme-screenshot {
252
  width: 100%;
253
+ margin: 0;
254
  }
255
 
256
  .obfx-template-preview.theme-install-overlay .install-theme-info.obfx-theme-info {
306
  display: none;
307
  }
308
 
309
+ #obfx-template-dir-fetch-templates {
310
+ display: block;
311
+ margin: 0 auto;
312
+ }
313
+ #obfx-template-dir-fetch-templates .dashicons {
314
+ margin: 3px 5px 0 -2px;
315
+ }
316
+
317
  @media only screen and (min-width: 1640px) {
318
  .obfx-template {
319
  width: 22.7%;
363
  .obfx-template:nth-child(5n) {
364
  margin-right: 0;
365
  }
366
+ }
{obfx_modules/template-directory → vendor/codeinwp/templates-directory}/js/script.js RENAMED
@@ -34,7 +34,6 @@ var obfx_template_directory = function ( $ ) {
34
  $( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
35
  xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
36
  },
37
- // async: false,
38
  data: {
39
  template_url: template_url,
40
  template_name: template_name
@@ -47,7 +46,7 @@ var obfx_template_directory = function ( $ ) {
47
  error: function ( error ) {
48
  console.error( error );
49
  },
50
- complete: function() {
51
  $( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
52
  }
53
  }, 'json'
@@ -56,6 +55,31 @@ var obfx_template_directory = function ( $ ) {
56
  }
57
  );
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  function checkAndInstallPlugins() {
60
  var installable = $( '.active .obfx-installable' );
61
  var toActivate = $( '.active .obfx-activate' );
@@ -80,9 +104,9 @@ var obfx_template_directory = function ( $ ) {
80
 
81
  $( toActivate ).each(
82
  function () {
83
- var plugin = $( this );
84
- var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
85
- if (typeof activateUrl !== 'undefined') {
86
  activatePlugin( activateUrl, plugin );
87
  }
88
  }
@@ -95,7 +119,7 @@ var obfx_template_directory = function ( $ ) {
95
  {
96
  type: 'GET',
97
  url: activationUrl,
98
- beforeSend: function() {
99
  $( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
100
  $( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
101
  },
@@ -103,7 +127,7 @@ var obfx_template_directory = function ( $ ) {
103
  $( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
104
  $( plugin ).removeClass( 'obfx-installing' );
105
  },
106
- complete: function() {
107
  if ( $( '.active .obfx-installing' ).length === 0 ) {
108
  $( '.obfx-import-queue' ).trigger( 'click' );
109
  }
@@ -203,6 +227,16 @@ var obfx_template_directory = function ( $ ) {
203
  }
204
 
205
  function setupImportButton() {
 
 
 
 
 
 
 
 
 
 
206
  var installable = $( '.active .obfx-installable' );
207
  if ( installable.length > 0 ) {
208
  $( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
@@ -210,7 +244,6 @@ var obfx_template_directory = function ( $ ) {
210
  $( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
211
  }
212
  var activeTheme = $( '.obfx-theme-info.active' );
213
- var button = $( '.wp-full-overlay-header .obfx-import-template' );
214
  $( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
215
  $( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
216
  }
34
  $( '.obfx-import-queue' ).addClass( 'obfx-updating' ).html( '' );
35
  xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
36
  },
 
37
  data: {
38
  template_url: template_url,
39
  template_name: template_name
46
  error: function ( error ) {
47
  console.error( error );
48
  },
49
+ complete: function () {
50
  $( '.obfx-updating' ).replaceWith( '<span class="obfx-done-import"><i class="dashicons-yes dashicons"></i></span>' );
51
  }
52
  }, 'json'
55
  }
56
  );
57
 
58
+ $( '#obfx-template-dir-fetch-templates' ).on( 'click', function ( e ) {
59
+ e.preventDefault();
60
+ $.ajax(
61
+ {
62
+ url: importer_endpoint.fetch_templates_url,
63
+ beforeSend: function ( xhr ) {
64
+ $( '#obfx-template-dir-fetch-templates .dashicons' ).hide();
65
+ $( '#obfx-template-dir-fetch-templates' ).addClass( 'updating-message' );
66
+ xhr.setRequestHeader( 'X-WP-Nonce', importer_endpoint.nonce );
67
+ },
68
+ data: {
69
+ plugin_slug: importer_endpoint.plugin_slug,
70
+ },
71
+ type: 'POST',
72
+ success: function () {
73
+ $( '#obfx-template-dir-fetch-templates' ).removeClass( 'updating-message' ).attr('disabled', 'true').empty().html('<i class="dashicons-yes dashicons" style="margin-right:0"></i>');
74
+ location.reload();
75
+ },
76
+ error: function( error ) {
77
+ console.log(error);
78
+ }
79
+ }, 'json'
80
+ );
81
+ } );
82
+
83
  function checkAndInstallPlugins() {
84
  var installable = $( '.active .obfx-installable' );
85
  var toActivate = $( '.active .obfx-activate' );
104
 
105
  $( toActivate ).each(
106
  function () {
107
+ var plugin = $( this );
108
+ var activateUrl = $( plugin ).find( '.activate-now' ).attr( 'href' );
109
+ if ( typeof activateUrl !== 'undefined' ) {
110
  activatePlugin( activateUrl, plugin );
111
  }
112
  }
119
  {
120
  type: 'GET',
121
  url: activationUrl,
122
+ beforeSend: function () {
123
  $( plugin ).removeClass( 'obfx-activate' ).addClass( 'obfx-installing' );
124
  $( plugin ).find( 'span.dashicons' ).replaceWith( '<span class="dashicons dashicons-update" style="-webkit-animation: rotation 2s infinite linear; animation: rotation 2s infinite linear; color: #ffb227 "></span>' );
125
  },
127
  $( plugin ).find( '.dashicons' ).replaceWith( '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>' );
128
  $( plugin ).removeClass( 'obfx-installing' );
129
  },
130
+ complete: function () {
131
  if ( $( '.active .obfx-installing' ).length === 0 ) {
132
  $( '.obfx-import-queue' ).trigger( 'click' );
133
  }
227
  }
228
 
229
  function setupImportButton() {
230
+ var button = $( '.wp-full-overlay-header .obfx-import-template' );
231
+ var dataUpsell = $( '.active' ).data( 'upsell' );
232
+ var upsellButton = $( '.obfx-upsell-button' );
233
+ if ( dataUpsell === 'yes' ) {
234
+ $( button ).hide();
235
+ $( upsellButton ).show();
236
+ return false;
237
+ }
238
+ $( button ).show();
239
+ $( upsellButton ).hide();
240
  var installable = $( '.active .obfx-installable' );
241
  if ( installable.length > 0 ) {
242
  $( '.wp-full-overlay-header .obfx-import-template' ).text( 'Install and Import' );
244
  $( '.wp-full-overlay-header .obfx-import-template' ).text( 'Import' );
245
  }
246
  var activeTheme = $( '.obfx-theme-info.active' );
 
247
  $( button ).attr( 'data-template-file', $( activeTheme ).data( 'template-file' ) );
248
  $( button ).attr( 'data-template-title', $( activeTheme ).data( 'template-title' ) );
249
  }
vendor/codeinwp/templates-directory/load.php ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Loader for the ThemeIsle\PageTemplatesDirectory
4
+ *
5
+ * @package ThemeIsle\PageTemplatesDirectory
6
+ * @copyright Copyright (c) 2017, Andrei Lupu
7
+ * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8
+ * @since 1.0.0
9
+ */
10
+
11
+ require_once( dirname( __FILE__ ) . '/class-page-templates-directory.php' );
vendor/codeinwp/templates-directory/views/template-directory-page-tpl.php ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 ThemeIsle
9
+ * @subpackage ThemeIsle/PageTemplatesDirectory
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
+ <div class="obfx-template-dir wrap">
19
+
20
+ <h2 class="wp-heading-inline"> <?php echo apply_filters( 'obfx_template_dir_page_title', __( 'Orbit Fox Template Directory', 'themeisle-companion' ) ); ?></h2>
21
+ <button id="obfx-template-dir-fetch-templates" class="button-primary button"><i class="dashicons dashicons-update"></i><?php echo __( 'Sync Templates', 'themeisle-companion' ); ?></button>
22
+ <div class="obfx-template-browser">
23
+ <?php
24
+ foreach ( $templates_array as $template => $properties ) {
25
+ ?>
26
+ <div class="obfx-template">
27
+ <?php if ( isset( $properties['has_badge'] ) ) { ?>
28
+ <span class="badge"><?php echo esc_html( $properties['has_badge'] ); ?></span>
29
+ <?php } ?>
30
+ <div class="more-details obfx-preview-template"
31
+ data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
32
+ data-template-slug="<?php echo esc_attr( $template ); ?>">
33
+ <span><?php echo __( 'More Details', 'themeisle-companion' ); ?></span></div>
34
+ <div class="obfx-template-screenshot">
35
+ <img src="<?php echo esc_url( $properties['screenshot'] ); ?>"
36
+ alt="<?php echo esc_html( $properties['title'] ); ?>">
37
+ </div>
38
+ <h2 class="template-name template-header"><?php echo esc_html( $properties['title'] ); ?></h2>
39
+ <div class="obfx-template-actions">
40
+
41
+ <?php if ( ! empty( $properties['demo_url'] ) ) { ?>
42
+ <a class="button obfx-preview-template"
43
+ data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
44
+ data-template-slug="<?php echo esc_attr( $template ); ?>"><?php echo __( 'Preview', 'themeisle-companion' ); ?></a>
45
+ <?php } ?>
46
+ </div>
47
+ </div>
48
+ <?php } ?>
49
+ </div>
50
+ </div>
51
+ <div class="wp-clearfix clearfix"></div>
52
+ <?php } // End if().
53
+ ?>
54
+
55
+ <div class="obfx-template-preview theme-install-overlay wp-full-overlay expanded" style="display: none;">
56
+ <div class="wp-full-overlay-sidebar">
57
+ <div class="wp-full-overlay-header">
58
+ <button class="close-full-overlay"><span
59
+ class="screen-reader-text"><?php esc_html_e( 'Close', 'themeisle-companion' ); ?></span></button>
60
+ <div class="obfx-next-prev">
61
+ <button class="previous-theme"><span
62
+ class="screen-reader-text"><?php esc_html_e( 'Previous', 'themeisle-companion' ); ?></span></button>
63
+ <button class="next-theme"><span
64
+ class="screen-reader-text"><?php esc_html_e( 'Next', 'themeisle-companion' ); ?></span></button>
65
+ </div>
66
+ <span class="obfx-import-template button button-primary"><?php esc_html_e( 'Import', 'themeisle-companion' ); ?></span>
67
+ <a href="https://themeisle.com/plugins/sizzify-elementor-addons-templates" target="_blank"
68
+ class="obfx-upsell-button button button-primary"><?php esc_html_e( 'See Pro Version', 'themeisle-companion' ); ?></a>
69
+
70
+ </div>
71
+ <div class="wp-full-overlay-sidebar-content">
72
+ <?php
73
+ foreach ( $templates_array as $template => $properties ) {
74
+ $upsell = 'no';
75
+ if ( isset( $properties['has_badge'] ) && ! isset( $properties['import_file'] ) ) {
76
+ $upsell = 'yes';
77
+ }
78
+ ?>
79
+ <div class="install-theme-info obfx-theme-info <?php echo esc_attr( $template ); ?>"
80
+ data-demo-url="<?php echo esc_url( $properties['demo_url'] ); ?>"
81
+ data-template-file="<?php echo esc_url( $properties['import_file'] ); ?>"
82
+ data-template-title="<?php echo esc_html( $properties['title'] ); ?>"
83
+ data-upsell="<?php echo esc_attr( $upsell ) ?>">
84
+ <h3 class="theme-name"><?php echo esc_html( $properties['title'] ); ?></h3>
85
+ <div class="obfx-preview-wrap">
86
+ <img class="theme-screenshot" src="<?php echo esc_url( $properties['screenshot'] ); ?>"
87
+ alt="<?php echo esc_html( $properties['title'] ); ?>">
88
+ <?php if ( isset( $properties['has_badge'] ) ) { ?>
89
+ <span class="badge"> <?php echo esc_html( $properties['has_badge'] ); ?></span>
90
+ <?php } ?>
91
+ </div>
92
+ <div class="theme-details">
93
+ <?php echo esc_html( $properties['description'] ); ?>
94
+ </div>
95
+ <?php
96
+ if ( ! empty( $properties['required_plugins'] ) && is_array( $properties['required_plugins'] ) ) { ?>
97
+ <div class="obfx-required-plugins">
98
+ <p><?php esc_html_e( 'Required Plugins', 'themeisle-companion' ); ?></p>
99
+ <?php
100
+ foreach ( $properties['required_plugins'] as $plugin_slug => $details ) {
101
+ if ( $this->check_plugin_state( $plugin_slug ) === 'install' ) {
102
+ echo '<div class="obfx-installable plugin-card-' . esc_attr( $plugin_slug ) . '">';
103
+ echo '<span class="dashicons dashicons-no-alt"></span>';
104
+ echo $details['title'];
105
+ echo $this->get_button_html( $plugin_slug );
106
+ echo '</div>';
107
+ } elseif ( $this->check_plugin_state( $plugin_slug ) === 'activate' ) {
108
+ echo '<div class="obfx-activate plugin-card-' . esc_attr( $plugin_slug ) . '">';
109
+ echo '<span class="dashicons dashicons-admin-plugins" style="color: #ffb227;"></span>';
110
+ echo $details['title'];
111
+ echo $this->get_button_html( $plugin_slug );
112
+ echo '</div>';
113
+ } else {
114
+ echo '<div class="obfx-installed plugin-card-' . esc_attr( $plugin_slug ) . '">';
115
+ echo '<span class="dashicons dashicons-yes" style="color: #34a85e"></span>';
116
+ echo $details['title'];
117
+ echo '</div>';
118
+ }
119
+ } ?>
120
+ </div>
121
+ <?php } ?>
122
+ </div><!-- /.install-theme-info -->
123
+ <?php } ?>
124
+ </div>
125
+
126
+ <div class="wp-full-overlay-footer">
127
+ <button type="button" class="collapse-sidebar button" aria-expanded="true" aria-label="Collapse Sidebar">
128
+ <span class="collapse-sidebar-arrow"></span>
129
+ <span class="collapse-sidebar-label"><?php esc_html_e( 'Collapse', 'themeisle-companion' ); ?></span>
130
+ </button>
131
+ <div class="devices-wrapper">
132
+ <div class="devices obfx-responsive-preview">
133
+ <button type="button" class="preview-desktop active" aria-pressed="true" data-device="desktop">
134
+ <span class="screen-reader-text"><?php esc_html_e( 'Enter desktop preview mode', 'themeisle-companion' ); ?></span>
135
+ </button>
136
+ <button type="button" class="preview-tablet" aria-pressed="false" data-device="tablet">
137
+ <span class="screen-reader-text"><?php esc_html_e( 'Enter tablet preview mode', 'themeisle-companion' ); ?></span>
138
+ </button>
139
+ <button type="button" class="preview-mobile" aria-pressed="false" data-device="mobile">
140
+ <span class="screen-reader-text"><?php esc_html_e( 'Enter mobile preview mode', 'themeisle-companion' ); ?></span>
141
+ </button>
142
+ </div>
143
+ </div>
144
+
145
+ </div>
146
+ </div>
147
+ <div class="wp-full-overlay-main obfx-main-preview">
148
+ <iframe src="" title="Preview" class="obfx-template-frame"></iframe>
149
+ </div>
150
+ </div>
{obfx_modules/template-directory → vendor/codeinwp/templates-directory}/views/template-directory-render-template-tpl.php RENAMED
@@ -5,8 +5,8 @@
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
 
5
  * @link https://themeisle.com
6
  * @since 2.0.0
7
  *
8
+ * @package ThemeIsle
9
+ * @subpackage ThemeIsle/PageTemplatesDirectory
10
  * @codeCoverageIgnore
11
  */
12
 
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-base.php CHANGED
@@ -112,7 +112,7 @@ abstract class BeaverModule extends \FLBuilderModule {
112
  'label' => esc_html__( 'Type', 'themeisle-companion' ),
113
  'options' => array(
114
  'text' => esc_html__( 'Text', 'themeisle-companion' ),
115
- 'text' => esc_html__( 'Email', 'themeisle-companion' ),
116
  'textarea' => esc_html__( 'Textarea', 'themeisle-companion' ),
117
  'password' => esc_html__( 'Password', 'themeisle-companion' ),
118
  )
112
  'label' => esc_html__( 'Type', 'themeisle-companion' ),
113
  'options' => array(
114
  'text' => esc_html__( 'Text', 'themeisle-companion' ),
115
+ 'email' => esc_html__( 'Email', 'themeisle-companion' ),
116
  'textarea' => esc_html__( 'Textarea', 'themeisle-companion' ),
117
  'password' => esc_html__( 'Password', 'themeisle-companion' ),
118
  )
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-contact.php CHANGED
@@ -18,7 +18,7 @@ class BeaverModuleContact extends BeaverModule {
18
  array(
19
  'name' => esc_html__( 'Contact', 'themeisle-companion' ),
20
  'description' => esc_html__( 'A contact form.', 'themeisle-companion' ),
21
- 'category' => esc_html__( 'OrbitFox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
18
  array(
19
  'name' => esc_html__( 'Contact', 'themeisle-companion' ),
20
  'description' => esc_html__( 'A contact form.', 'themeisle-companion' ),
21
+ 'category' => esc_html__( 'Orbit Fox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-newsletter.php CHANGED
@@ -18,7 +18,7 @@ class BeaverModuleNewsletter extends BeaverModule {
18
  array(
19
  'name' => esc_html__( 'Newsletter', 'themeisle-companion' ),
20
  'description' => esc_html__( 'A simple newsletter form.', 'themeisle-companion' ),
21
- 'category' => esc_html__( 'OrbitFox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
18
  array(
19
  'name' => esc_html__( 'Newsletter', 'themeisle-companion' ),
20
  'description' => esc_html__( 'A simple newsletter form.', 'themeisle-companion' ),
21
+ 'category' => esc_html__( 'Orbit Fox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
vendor/codeinwp/themeisle-content-forms/beaver/class-themeisle-content-forms-beaver-registration.php CHANGED
@@ -18,7 +18,7 @@ class BeaverModuleRegistration extends BeaverModule {
18
  array(
19
  'name' => esc_html__( 'Registration', 'themeisle-companion' ),
20
  'description' => esc_html__( 'A sign up form.', 'themeisle-companion' ),
21
- 'category' => esc_html__( 'OrbitFox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
18
  array(
19
  'name' => esc_html__( 'Registration', 'themeisle-companion' ),
20
  'description' => esc_html__( 'A sign up form.', 'themeisle-companion' ),
21
+ 'category' => esc_html__( 'Orbit Fox Modules', 'themeisle-companion' ),
22
  'dir' => dirname( __FILE__ ),
23
  'url' => plugin_dir_url( __FILE__ )
24
  )
vendor/codeinwp/themeisle-content-forms/class-content-form-base.php CHANGED
@@ -82,8 +82,8 @@ abstract class ContentFormBase {
82
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_elementor_widget' ) );
83
 
84
  // Register the Beaver Module
85
- // $this->register_beaver_module();
86
- // add_action( 'init', array( $this, 'register_beaver_module' ) );
87
 
88
  // Register the Gutenberg Block
89
  // @TODO This is not fully working at this moment
82
  add_action( 'elementor/widgets/widgets_registered', array( $this, 'register_elementor_widget' ) );
83
 
84
  // Register the Beaver Module
85
+ $this->register_beaver_module();
86
+ add_action( 'init', array( $this, 'register_beaver_module' ) );
87
 
88
  // Register the Gutenberg Block
89
  // @TODO This is not fully working at this moment
vendor/codeinwp/themeisle-content-forms/composer.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "name": "codeinwp/themeisle-content-forms",
3
- "version": "1.0.0",
4
  "description": "ThemeIsle Content Forms ",
5
  "keywords": [
6
  "wordpress"
1
  {
2
  "name": "codeinwp/themeisle-content-forms",
3
+ "version": "1.0.1",
4
  "description": "ThemeIsle Content Forms ",
5
  "keywords": [
6
  "wordpress"
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php CHANGED
@@ -61,6 +61,10 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
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
  */
@@ -168,6 +172,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
168
  if ( strpos( $this->author_url, $author ) !== false ) {
169
  return true;
170
  }
 
 
 
171
  }
172
 
173
  return false;
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 array $allowed_external_products The allowed external_products.
66
+ */
67
+ private $allowed_products = array( 'zermatt', 'neto', 'olsen', 'benson', 'romero', 'carmack', 'puzzle', 'broadsheet', 'girlywp', 'veggie', 'zeko', 'maishawp', 'didi', 'liber', 'medicpress-pt', 'adrenaline-pt', 'consultpress-pt', 'legalpress-pt', 'gympress-pt', 'readable-pt', 'bolts-pt' );
68
  /**
69
  * @var bool $requires_license Either user needs to activate it with license.
70
  */
172
  if ( strpos( $this->author_url, $author ) !== false ) {
173
  return true;
174
  }
175
+ if ( in_array( $this->get_slug(), $this->allowed_products ) ) {
176
+ return true;
177
+ }
178
  }
179
 
180
  return false;
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -11,7 +11,7 @@
11
  */
12
 
13
  // Current SDK version and path.
14
- $themeisle_sdk_version = '2.1.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 = '2.1.2';
15
  $themeisle_sdk_path = dirname( __FILE__ );
16
 
17
  global $themeisle_sdk_max_version;
vendor/composer/autoload_files.php CHANGED
@@ -6,9 +6,10 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- '957c51f8f334b5ea3be310bfb8b3492c' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
10
  '62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
 
11
  '2e85745cdd367ff6e5579a8598f422b9' => $vendorDir . '/codeinwp/elementor-extra-widgets/load.php',
 
12
  '7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
13
  '4577ab960be90dedc8f8512147cf356d' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
14
  );
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
9
  '62bc7c35996f19a64625f7ff3ba2fb5e' => $vendorDir . '/codeinwp/full-width-page-templates/load.php',
10
+ '957c51f8f334b5ea3be310bfb8b3492c' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
11
  '2e85745cdd367ff6e5579a8598f422b9' => $vendorDir . '/codeinwp/elementor-extra-widgets/load.php',
12
+ 'b4f42ddc6ece5b15b772913931d8824c' => $vendorDir . '/codeinwp/templates-directory/load.php',
13
  '7b1f4385ddfc86d120fe4380e8cb0fa6' => $vendorDir . '/codeinwp/themeisle-content-forms/load.php',
14
  '4577ab960be90dedc8f8512147cf356d' => $vendorDir . '/codeinwp/themeisle-sdk/load.php',
15
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita722a1f7104fe151caa2caa86049818a
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInita722a1f7104fe151caa2caa86049818a
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInita722a1f7104fe151caa2caa86049818a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInita722a1f7104fe151caa2caa86049818a', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInita722a1f7104fe151caa2caa86049818a
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequirea722a1f7104fe151caa2caa86049818a($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequirea722a1f7104fe151caa2caa86049818a($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 ComposerAutoloaderInit3a63382f86c4b7332a0b229aeb5f0f3e
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit3a63382f86c4b7332a0b229aeb5f0f3e', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3a63382f86c4b7332a0b229aeb5f0f3e', '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
+ composerRequire3a63382f86c4b7332a0b229aeb5f0f3e($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequire3a63382f86c4b7332a0b229aeb5f0f3e($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": "9d866559c6090f0e7e70fe3e5a4be8672461a11a"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/9d866559c6090f0e7e70fe3e5a4be8672461a11a",
14
- "reference": "9d866559c6090f0e7e70fe3e5a4be8672461a11a",
15
  "shasum": ""
16
  },
17
- "time": "2018-02-16 16:31:29",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
@@ -39,6 +39,42 @@
39
  "wordpress"
40
  ]
41
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  {
43
  "name": "codeinwp/full-width-page-templates",
44
  "version": "dev-master",
@@ -77,21 +113,24 @@
77
  "homepage": "https://github.com/Codeinwp/full-width-page-templates"
78
  },
79
  {
80
- "name": "codeinwp/elementor-extra-widgets",
81
  "version": "dev-master",
82
  "version_normalized": "9999999-dev",
83
  "source": {
84
  "type": "git",
85
- "url": "https://github.com/Codeinwp/elementor-extra-widgets.git",
86
- "reference": "b47005540e4b59ecd8ccfe4f10a5ef6f9735b400"
87
  },
88
  "dist": {
89
  "type": "zip",
90
- "url": "https://api.github.com/repos/Codeinwp/elementor-extra-widgets/zipball/b47005540e4b59ecd8ccfe4f10a5ef6f9735b400",
91
- "reference": "b47005540e4b59ecd8ccfe4f10a5ef6f9735b400",
92
  "shasum": ""
93
  },
94
- "time": "2018-01-23 16:50:26",
 
 
 
95
  "type": "library",
96
  "installation-source": "dist",
97
  "autoload": {
@@ -101,7 +140,7 @@
101
  },
102
  "notification-url": "https://packagist.org/downloads/",
103
  "license": [
104
- "GPL-3.0-or-later"
105
  ],
106
  "authors": [
107
  {
@@ -110,7 +149,8 @@
110
  "homepage": "https://themeisle.com"
111
  }
112
  ],
113
- "homepage": "https://github.com/Codeinwp/elementor-extra-widgets"
 
114
  },
115
  {
116
  "name": "codeinwp/themeisle-content-forms",
@@ -119,15 +159,15 @@
119
  "source": {
120
  "type": "git",
121
  "url": "https://github.com/Codeinwp/themeisle-content-forms.git",
122
- "reference": "7f384b1c03e9a3e0afc246941090fa0819531816"
123
  },
124
  "dist": {
125
  "type": "zip",
126
- "url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/7f384b1c03e9a3e0afc246941090fa0819531816",
127
- "reference": "7f384b1c03e9a3e0afc246941090fa0819531816",
128
  "shasum": ""
129
  },
130
- "time": "2018-02-08 09:50:31",
131
  "type": "library",
132
  "installation-source": "dist",
133
  "autoload": {
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
9
+ "reference": "18bcad4b82796f4b6996dea42832ce3518924f25"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/18bcad4b82796f4b6996dea42832ce3518924f25",
14
+ "reference": "18bcad4b82796f4b6996dea42832ce3518924f25",
15
  "shasum": ""
16
  },
17
+ "time": "2018-03-19 21:12:50",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
39
  "wordpress"
40
  ]
41
  },
42
+ {
43
+ "name": "codeinwp/elementor-extra-widgets",
44
+ "version": "dev-master",
45
+ "version_normalized": "9999999-dev",
46
+ "source": {
47
+ "type": "git",
48
+ "url": "https://github.com/Codeinwp/elementor-extra-widgets.git",
49
+ "reference": "3a0f72ba563210594769acc56529d6a0235bc093"
50
+ },
51
+ "dist": {
52
+ "type": "zip",
53
+ "url": "https://api.github.com/repos/Codeinwp/elementor-extra-widgets/zipball/3a0f72ba563210594769acc56529d6a0235bc093",
54
+ "reference": "3a0f72ba563210594769acc56529d6a0235bc093",
55
+ "shasum": ""
56
+ },
57
+ "time": "2018-03-29 14:11:23",
58
+ "type": "library",
59
+ "installation-source": "dist",
60
+ "autoload": {
61
+ "files": [
62
+ "load.php"
63
+ ]
64
+ },
65
+ "notification-url": "https://packagist.org/downloads/",
66
+ "license": [
67
+ "GPL-3.0-or-later"
68
+ ],
69
+ "authors": [
70
+ {
71
+ "name": "ThemeIsle team",
72
+ "email": "friends@themeisle.com",
73
+ "homepage": "https://themeisle.com"
74
+ }
75
+ ],
76
+ "homepage": "https://github.com/Codeinwp/elementor-extra-widgets"
77
+ },
78
  {
79
  "name": "codeinwp/full-width-page-templates",
80
  "version": "dev-master",
113
  "homepage": "https://github.com/Codeinwp/full-width-page-templates"
114
  },
115
  {
116
+ "name": "codeinwp/templates-directory",
117
  "version": "dev-master",
118
  "version_normalized": "9999999-dev",
119
  "source": {
120
  "type": "git",
121
+ "url": "https://github.com/Codeinwp/templates-directory.git",
122
+ "reference": "ef34db431aa55748fd0f1d313e67178ee9a02d59"
123
  },
124
  "dist": {
125
  "type": "zip",
126
+ "url": "https://api.github.com/repos/Codeinwp/templates-directory/zipball/ef34db431aa55748fd0f1d313e67178ee9a02d59",
127
+ "reference": "ef34db431aa55748fd0f1d313e67178ee9a02d59",
128
  "shasum": ""
129
  },
130
+ "require": {
131
+ "codeinwp/full-width-page-templates": "master"
132
+ },
133
+ "time": "2018-03-29 12:05:43",
134
  "type": "library",
135
  "installation-source": "dist",
136
  "autoload": {
140
  },
141
  "notification-url": "https://packagist.org/downloads/",
142
  "license": [
143
+ "GPL-2.0-or-later"
144
  ],
145
  "authors": [
146
  {
149
  "homepage": "https://themeisle.com"
150
  }
151
  ],
152
+ "description": "A WordPress library to manage page templates.",
153
+ "homepage": "https://github.com/Codeinwp/templates-directory"
154
  },
155
  {
156
  "name": "codeinwp/themeisle-content-forms",
159
  "source": {
160
  "type": "git",
161
  "url": "https://github.com/Codeinwp/themeisle-content-forms.git",
162
+ "reference": "725092d043db8212e2a0eee2e282e3d8acf49058"
163
  },
164
  "dist": {
165
  "type": "zip",
166
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-content-forms/zipball/725092d043db8212e2a0eee2e282e3d8acf49058",
167
+ "reference": "725092d043db8212e2a0eee2e282e3d8acf49058",
168
  "shasum": ""
169
  },
170
+ "time": "2018-03-13 15:10:31",
171
  "type": "library",
172
  "installation-source": "dist",
173
  "autoload": {