Orbit Fox by ThemeIsle - Version 2.1.1

Version Description

  • 2017-11-16
Download this release

Release Info

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

Code changes from version 2.0.6 to 2.1.1

Files changed (63) hide show
  1. CHANGELOG.md +32 -0
  2. README.md +0 -68
  3. class-autoloader.php +4 -4
  4. core/app/abstract/class-orbit-fox-module-abstract.php +101 -70
  5. core/app/class-orbit-fox-admin.php +3 -3
  6. core/app/class-orbit-fox-global-settings.php +3 -1
  7. core/app/class-orbit-fox-module-factory.php +1 -1
  8. core/app/class-orbit-fox-public.php +1 -1
  9. core/app/helpers/class-orbit-fox-render-helper.php +20 -20
  10. core/app/models/class-orbit-fox-model.php +12 -12
  11. core/app/views/partials/module-panel-tpl.php +2 -2
  12. core/assets/css/orbit-fox-admin.css +2 -27
  13. core/includes/class-orbit-fox.php +3 -2
  14. languages/themeisle-companion.pot +228 -84
  15. obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php +35 -10
  16. obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php +38 -12
  17. obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php +37 -12
  18. obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php +38 -12
  19. obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php +38 -12
  20. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-clients-bar-section.php +27 -8
  21. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php +85 -71
  22. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php +31 -9
  23. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php +134 -111
  24. obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php +73 -46
  25. obfx_modules/companion-legacy/inc/rhea/assets/css/admin-style.css +0 -4
  26. obfx_modules/companion-legacy/init.php +2 -2
  27. obfx_modules/menu-icons/css/admin.css +134 -0
  28. obfx_modules/menu-icons/css/vendor/fontawesome-iconpicker.min.css +315 -0
  29. obfx_modules/menu-icons/inc/class-menu-icons-obfx-walker.php +27 -0
  30. obfx_modules/menu-icons/init.php +213 -0
  31. obfx_modules/menu-icons/js/admin.js +91 -0
  32. obfx_modules/menu-icons/js/vendor/bootstrap.min.js +11 -0
  33. obfx_modules/menu-icons/js/vendor/fontawesome-iconpicker.min.js +1 -0
  34. obfx_modules/mystock-import/css/media.css +175 -0
  35. obfx_modules/mystock-import/inc/photos.php +39 -0
  36. obfx_modules/mystock-import/init.php +315 -0
  37. obfx_modules/mystock-import/js/admin.js +189 -0
  38. obfx_modules/mystock-import/vendor/phpflickr/LICENSE +339 -0
  39. obfx_modules/mystock-import/vendor/phpflickr/phpFlickr.php +1828 -0
  40. obfx_modules/social-sharing/css/public.css +34 -35
  41. obfx_modules/social-sharing/init.php +3 -1
  42. obfx_modules/stats/views/dashboard-widget-tpl.php +2 -2
  43. readme.md +172 -0
  44. readme.txt +51 -3
  45. themeisle-companion.php +7 -1
  46. vendor/autoload.php +1 -1
  47. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php +11 -11
  48. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php +3 -3
  49. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php +29 -5
  50. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php +983 -0
  51. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php +6 -6
  52. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php +6 -1
  53. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php +12 -5
  54. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php +20 -34
  55. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php +155 -1
  56. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php +223 -0
  57. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php +9 -0
  58. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php +1 -1
  59. vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php +2 -2
  60. vendor/codeinwp/themeisle-sdk/load.php +1 -1
  61. vendor/codeinwp/themeisle-sdk/start.php +2 -0
  62. vendor/composer/autoload_real.php +5 -5
  63. vendor/composer/installed.json +6 -9
CHANGELOG.md CHANGED
@@ -1,4 +1,36 @@
1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  ### v2.0.6 - 2017-09-19
3
  **Changes:**
4
  * Added selective refresh for titles options in the frontpage sections in Hestia
1
 
2
+ ### v2.1.1 - 2017-11-16
3
+ **Changes:**
4
+ * Adds compatibility with WordPress 4.9.
5
+
6
+ ### v2.1.0 - 2017-11-08
7
+ **Changes:**
8
+ * Adds custom icons menu module.
9
+ * Adds free stock images integration with mystock.photos .
10
+
11
+ ### v2.0.11 - 2017-10-19
12
+ **Changes:**
13
+ * Fixed alignment issue for titles in Hestia
14
+
15
+ ### v2.0.10 - 2017-10-18
16
+ **Changes:**
17
+ * Added selective refresh options for the Show/Hide frontpage controls in Hestia
18
+ * Make external links open in new tab for the frontpage sections in Hestia
19
+ * Added some new filters to control the number of items per row appear in the Features and Testimonials Frontpage section - http://docs.themeisle.com/article/669-how-to-add-4-feature-items-on-a-line-in-hestia
20
+
21
+ ### v2.0.9 - 2017-10-17
22
+ **Changes:**
23
+ * Enhanced layout for Hestia sections.
24
+
25
+ ### v2.0.8 - 2017-10-11
26
+ **Changes:**
27
+ * Fixed bug with URL protocols filter priority.
28
+ * Fixed bug with icons background styled by URL address.
29
+
30
+ ### v2.0.7 - 2017-10-02
31
+ **Changes:**
32
+ * New improved options for frontpage sections ordering/disabling in Hestia
33
+
34
  ### v2.0.6 - 2017-09-19
35
  **Changes:**
36
  * Added selective refresh for titles options in the frontpage sections in Hestia
README.md DELETED
@@ -1,68 +0,0 @@
1
- # Orbit Fox
2
- [![Build Status](https://travis-ci.org/Codeinwp/orbit-fox.svg?branch=master)](https://travis-ci.org/Codeinwp/orbit-fox)
3
- [![Code Climate](https://codeclimate.com/github/Codeinwp/orbit-fox/badges/gpa.svg)](https://codeclimate.com/github/Codeinwp/orbit-fox)
4
- [![Issue Count](https://codeclimate.com/github/Codeinwp/orbit-fox/badges/issue_count.svg)](https://codeclimate.com/github/Codeinwp/orbit-fox)
5
- [![Test Coverage](https://codeclimate.com/github/Codeinwp/orbit-fox/badges/coverage.svg)](https://codeclimate.com/github/Codeinwp/orbit-fox/coverage)
6
-
7
- - **Author URI:** http://themeisle.com
8
- - **Requires at least:** 3.5
9
- - **Tested up to:** 4.8
10
- - **Stable tag:** trunk
11
- - **License:** GPLv2 or later
12
- - **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
13
-
14
- ## Description
15
- > Orbit Fox is a plugin for WordPress that provides an abstraction layer on top of which you can
16
- write modules to extend its functionality. The plugin provides some predefined workflows and
17
- methods that work automagically. This means that you can focus more on the logic of your module
18
- and less on the loading and display of data or files.
19
-
20
- ### Goals
21
- 1. **Provide a framework like environment for writing modules:**
22
-
23
- Have a predefined set of rules and workflows that work out of the box. This should simplify
24
- the way a developer interacts with data, views or files.
25
-
26
- 2. **Accessibility:**
27
-
28
- Modules should be easy to write and deploy, also allow for loading of modules from third party
29
- developers.
30
-
31
- ### Specifications
32
- Have a plugin that can be extended with modules bundled or built by third party developers inside
33
- their own plugins. The modules must have an abstract class that defines the implemented methods
34
- required and utility methods that simplify the module development.
35
-
36
- ## Installation
37
- 1. Put the `orbit-fox` folder inside WordPress plugins folder.
38
- 2. Activate via the Plugins WordPress Dashboard.
39
-
40
- ## Features
41
- - Easy extensability via modules
42
- - Support for third party modules
43
- - Reusable and Utility Classes for faster development
44
-
45
- ## Development
46
- [Module development guidelines](docs/MODULE.md)
47
-
48
- ## Docs
49
-
50
- [Read the Project Documentation](https://docs.google.com/a/vertistudio.com/document/d/1fFepVs4if5rEmMqA8TiHUFp2WPnkUCW6JZohnsSNtKE/edit?usp=sharing)
51
-
52
- ## Frequently Asked Questions
53
-
54
- // TODO
55
-
56
- ## Change Log
57
-
58
- **v.1.0.0a**
59
- - Basic structure and module loading workflow.
60
- - Support for 3rd party modules
61
- - Render Helper
62
- - Model Helper
63
- - Automagic classes
64
-
65
- ### Contributors
66
- **Bogdan Preda** -- bogdan.themeisle.com
67
-
68
- **Marius Cristea** -- marius.cristea@vertistudio.com
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
class-autoloader.php CHANGED
@@ -93,7 +93,7 @@ class Autoloader {
93
  if ( substr( $class_name, 0, strlen( $namespace ) ) == $namespace ) {
94
  $found = true;
95
  }
96
- if ( $namespace == 'OBFX_Module' && substr( $class_name, strlen( $namespace ) * (-1), strlen( $namespace ) ) == $namespace ) {
97
  return static::module_loader( $class_name );
98
  }
99
  }
@@ -123,8 +123,8 @@ class Autoloader {
123
  $directory = new RecursiveDirectoryIterator( static::$path_top . DIRECTORY_SEPARATOR . 'core', RecursiveDirectoryIterator::SKIP_DOTS );
124
 
125
  if ( is_null( static::$file_iterator ) ) {
126
- $Iterator = new RecursiveIteratorIterator( $directory );
127
- $Regex = new RegexIterator( $Iterator, '/^.+\.php$/i', RecursiveRegexIterator::MATCH );
128
  static::$file_iterator = iterator_to_array( $Regex, false );
129
  }
130
 
@@ -148,7 +148,7 @@ class Autoloader {
148
  public static function module_loader( $class_name ) {
149
  $module_name = str_replace( '_', '-', strtolower( str_replace( '_OBFX_Module', '', $class_name ) ) );
150
  if ( static::$plugins_path != '' ) {
151
- $directories = glob( static::$plugins_path . '*' . DIRECTORY_SEPARATOR . 'obfx_modules' . DIRECTORY_SEPARATOR . $module_name , GLOB_ONLYDIR );
152
  foreach ( $directories as $directory ) {
153
  $filename = $directory . DIRECTORY_SEPARATOR . 'init.php';
154
  if ( is_readable( $filename ) ) {
93
  if ( substr( $class_name, 0, strlen( $namespace ) ) == $namespace ) {
94
  $found = true;
95
  }
96
+ if ( $namespace == 'OBFX_Module' && substr( $class_name, strlen( $namespace ) * ( -1 ), strlen( $namespace ) ) == $namespace ) {
97
  return static::module_loader( $class_name );
98
  }
99
  }
123
  $directory = new RecursiveDirectoryIterator( static::$path_top . DIRECTORY_SEPARATOR . 'core', RecursiveDirectoryIterator::SKIP_DOTS );
124
 
125
  if ( is_null( static::$file_iterator ) ) {
126
+ $Iterator = new RecursiveIteratorIterator( $directory );
127
+ $Regex = new RegexIterator( $Iterator, '/^.+\.php$/i', RecursiveRegexIterator::MATCH );
128
  static::$file_iterator = iterator_to_array( $Regex, false );
129
  }
130
 
148
  public static function module_loader( $class_name ) {
149
  $module_name = str_replace( '_', '-', strtolower( str_replace( '_OBFX_Module', '', $class_name ) ) );
150
  if ( static::$plugins_path != '' ) {
151
+ $directories = glob( static::$plugins_path . '*' . DIRECTORY_SEPARATOR . 'obfx_modules' . DIRECTORY_SEPARATOR . $module_name, GLOB_ONLYDIR );
152
  foreach ( $directories as $directory ) {
153
  $filename = $directory . DIRECTORY_SEPARATOR . 'init.php';
154
  if ( is_readable( $filename ) ) {
core/app/abstract/class-orbit-fox-module-abstract.php CHANGED
@@ -90,6 +90,14 @@ abstract class Orbit_Fox_Module_Abstract {
90
  */
91
  protected $version;
92
 
 
 
 
 
 
 
 
 
93
  /**
94
  * Orbit_Fox_Module_Abstract constructor.
95
  *
@@ -97,7 +105,7 @@ abstract class Orbit_Fox_Module_Abstract {
97
  * @access public
98
  */
99
  public function __construct() {
100
- $this->slug = str_replace( '_', '-',strtolower( str_replace( '_OBFX_Module', '', get_class( $this ) ) ) );
101
  }
102
 
103
  /**
@@ -114,6 +122,18 @@ abstract class Orbit_Fox_Module_Abstract {
114
  return dirname( $reflector->getFileName() );
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  /**
118
  * Utility method to return active theme dir name.
119
  *
@@ -304,8 +324,8 @@ abstract class Orbit_Fox_Module_Abstract {
304
  */
305
  final public function get_option( $key ) {
306
  $default_options = $this->get_options_defaults();
307
- $db_option = $this->model->get_module_option( $this->slug, $key );
308
- $value = $db_option;
309
  if ( $db_option === false ) {
310
  $value = $default_options[ $key ];
311
  }
@@ -353,7 +373,7 @@ abstract class Orbit_Fox_Module_Abstract {
353
  * @return array
354
  */
355
  final public function get_options_defaults() {
356
- $options = $this->options();
357
  $defaults = array();
358
  foreach ( $options as $opt ) {
359
  if ( ! isset( $opt['default'] ) ) {
@@ -375,10 +395,10 @@ abstract class Orbit_Fox_Module_Abstract {
375
  */
376
  final public function get_options() {
377
  $model_options = $this->options();
378
- $options = array();
379
- $index = 0;
380
  foreach ( $model_options as $opt ) {
381
- $options[ $index ] = $opt;
382
  $options[ $index ]['value'] = $this->get_option( $opt['name'] );
383
  $index++;
384
  }
@@ -412,63 +432,63 @@ abstract class Orbit_Fox_Module_Abstract {
412
  * @access public
413
  */
414
  public function set_admin_styles() {
415
- $enqueue = $this->admin_enqueue();
416
- $module_dir = $this->slug;
417
- if ( ! empty( $enqueue ) ) {
418
- if ( isset( $enqueue['css'] ) && ! empty( $enqueue['css'] ) ) {
419
- $order = 0;
420
- foreach ( $enqueue['css'] as $file_name => $dependencies ) {
421
- if ( $dependencies == false ) {
422
- $dependencies = array();
423
- }
424
- $url = filter_var( $file_name, FILTER_SANITIZE_URL );
425
- $resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/css/' . $file_name . '.css';
426
- if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
427
- $resource = $url;
428
- }
429
- wp_enqueue_style(
430
- 'obfx-module-css-' . str_replace( ' ', '-', strtolower( $this->name ) ) . '-' . $order,
431
- $resource,
432
- $dependencies,
433
- $this->version,
434
- 'all'
435
- );
436
- $order++;
437
- }
438
- }
439
- }
440
  }
441
 
442
  /**
443
- * Sets the scripts for admin from the module array.
444
  *
445
  * @codeCoverageIgnore
446
  *
447
  * @since 1.0.0
448
- * @access public
 
 
449
  */
450
- public function set_admin_scripts() {
451
- $enqueue = $this->admin_enqueue();
 
452
  $module_dir = $this->slug;
453
  if ( ! empty( $enqueue ) ) {
454
  if ( isset( $enqueue['js'] ) && ! empty( $enqueue['js'] ) ) {
455
  $order = 0;
 
456
  foreach ( $enqueue['js'] as $file_name => $dependencies ) {
457
  if ( $dependencies == false ) {
458
  $dependencies = array();
 
 
 
 
 
 
 
 
459
  }
460
- $url = filter_var( $file_name, FILTER_SANITIZE_URL );
461
  $resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/js/' . $file_name . '.js';
462
  if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
463
  $resource = $url;
464
  }
 
 
 
465
  wp_enqueue_script(
466
- 'obfx-module-js-' . str_replace( ' ', '-', strtolower( $this->name ) ) . '-' . $order,
467
  $resource,
468
  $dependencies,
469
  $this->version,
470
  false
471
  );
 
 
 
 
 
 
 
 
 
472
  $order++;
473
  }
474
  }
@@ -476,30 +496,42 @@ abstract class Orbit_Fox_Module_Abstract {
476
  }
477
 
478
  /**
479
- * Sets the styles for public from the module array.
480
  *
481
  * @codeCoverageIgnore
482
  *
483
  * @since 1.0.0
484
- * @access public
 
 
485
  */
486
- public function set_public_styles() {
487
- $enqueue = $this->public_enqueue();
488
  $module_dir = $this->slug;
489
  if ( ! empty( $enqueue ) ) {
490
  if ( isset( $enqueue['css'] ) && ! empty( $enqueue['css'] ) ) {
491
  $order = 0;
 
492
  foreach ( $enqueue['css'] as $file_name => $dependencies ) {
493
  if ( $dependencies == false ) {
494
  $dependencies = array();
 
 
 
 
 
 
 
 
495
  }
496
- $url = filter_var( $file_name, FILTER_SANITIZE_URL );
497
  $resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/css/' . $file_name . '.css';
498
  if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
499
  $resource = $url;
500
  }
 
 
501
  wp_enqueue_style(
502
- 'obfx-module-pub-css-' . str_replace( ' ', '-', strtolower( $this->name ) ) . '-' . $order,
503
  $resource,
504
  $dependencies,
505
  $this->version,
@@ -511,6 +543,30 @@ abstract class Orbit_Fox_Module_Abstract {
511
  }
512
  }
513
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
514
  /**
515
  * Sets the scripts for public from the module array.
516
  *
@@ -520,32 +576,7 @@ abstract class Orbit_Fox_Module_Abstract {
520
  * @access public
521
  */
522
  public function set_public_scripts() {
523
- $enqueue = $this->public_enqueue();
524
- $module_dir = $this->slug;
525
- if ( ! empty( $enqueue ) ) {
526
- if ( isset( $enqueue['js'] ) && ! empty( $enqueue['js'] ) ) {
527
- $order = 0;
528
- foreach ( $enqueue['js'] as $file_name => $dependencies ) {
529
- if ( $dependencies == false ) {
530
- $dependencies = array();
531
- }
532
- $url = filter_var( $file_name, FILTER_SANITIZE_URL );
533
- $resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/js/' . $file_name . '.js';
534
- if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
535
- $resource = $url;
536
- }
537
-
538
- wp_enqueue_script(
539
- 'obfx-module-pub-js-' . str_replace( ' ', '-', strtolower( $this->name ) ) . '-' . $order,
540
- $resource,
541
- $dependencies,
542
- $this->version,
543
- false
544
- );
545
- $order++;
546
- }
547
- }
548
- }
549
  }
550
 
551
  /**
90
  */
91
  protected $version;
92
 
93
+ /**
94
+ * Stores the localized arrays for both public and admin JS files that need to be loaded.
95
+ *
96
+ * @access protected
97
+ * @var array $localized The localized arrays for both public and admin JS files that need to be loaded.
98
+ */
99
+ protected $localized = array();
100
+
101
  /**
102
  * Orbit_Fox_Module_Abstract constructor.
103
  *
105
  * @access public
106
  */
107
  public function __construct() {
108
+ $this->slug = str_replace( '_', '-', strtolower( str_replace( '_OBFX_Module', '', get_class( $this ) ) ) );
109
  }
110
 
111
  /**
122
  return dirname( $reflector->getFileName() );
123
  }
124
 
125
+ /**
126
+ * Method to return URL to child class in a Reflective Way.
127
+ *
128
+ * @codeCoverageIgnore
129
+ *
130
+ * @access protected
131
+ * @return string
132
+ */
133
+ protected function get_url() {
134
+ return plugin_dir_url( $this->get_dir() ) . $this->slug;
135
+ }
136
+
137
  /**
138
  * Utility method to return active theme dir name.
139
  *
324
  */
325
  final public function get_option( $key ) {
326
  $default_options = $this->get_options_defaults();
327
+ $db_option = $this->model->get_module_option( $this->slug, $key );
328
+ $value = $db_option;
329
  if ( $db_option === false ) {
330
  $value = $default_options[ $key ];
331
  }
373
  * @return array
374
  */
375
  final public function get_options_defaults() {
376
+ $options = $this->options();
377
  $defaults = array();
378
  foreach ( $options as $opt ) {
379
  if ( ! isset( $opt['default'] ) ) {
395
  */
396
  final public function get_options() {
397
  $model_options = $this->options();
398
+ $options = array();
399
+ $index = 0;
400
  foreach ( $model_options as $opt ) {
401
+ $options[ $index ] = $opt;
402
  $options[ $index ]['value'] = $this->get_option( $opt['name'] );
403
  $index++;
404
  }
432
  * @access public
433
  */
434
  public function set_admin_styles() {
435
+ $this->set_styles( $this->admin_enqueue(), 'adm' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
436
  }
437
 
438
  /**
439
+ * Actually sets the scripts.
440
  *
441
  * @codeCoverageIgnore
442
  *
443
  * @since 1.0.0
444
+ * @access private
445
+ * @param array $enqueue The array of files to enqueue.
446
+ * @param string $prefix The string to prefix in the enqueued name.
447
  */
448
+ private function set_scripts( $enqueue, $prefix ) {
449
+ $sanitized = str_replace( ' ', '-', strtolower( $this->name ) );
450
+
451
  $module_dir = $this->slug;
452
  if ( ! empty( $enqueue ) ) {
453
  if ( isset( $enqueue['js'] ) && ! empty( $enqueue['js'] ) ) {
454
  $order = 0;
455
+ $map = array();
456
  foreach ( $enqueue['js'] as $file_name => $dependencies ) {
457
  if ( $dependencies == false ) {
458
  $dependencies = array();
459
+ } else {
460
+ // check if any dependency has been loaded by us. If yes, then use that id as the dependency.
461
+ foreach ( $dependencies as $index => $dep ) {
462
+ if ( array_key_exists( $dep, $map ) ) {
463
+ unset( $dependencies[ $index ] );
464
+ $dependencies[ $index ] = $map[ $dep ];
465
+ }
466
+ }
467
  }
468
+ $url = filter_var( $file_name, FILTER_SANITIZE_URL );
469
  $resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/js/' . $file_name . '.js';
470
  if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
471
  $resource = $url;
472
  }
473
+ $id = 'obfx-module-' . $prefix . '-js-' . $sanitized . '-' . $order;
474
+ $map[ $file_name ] = $id;
475
+
476
  wp_enqueue_script(
477
+ $id,
478
  $resource,
479
  $dependencies,
480
  $this->version,
481
  false
482
  );
483
+
484
+ // check if we need to enqueue or localize.
485
+ if ( array_key_exists( $file_name, $this->localized ) ) {
486
+ wp_localize_script(
487
+ $id,
488
+ str_replace( '-', '_', $sanitized ),
489
+ $this->localized[ $file_name ]
490
+ );
491
+ }
492
  $order++;
493
  }
494
  }
496
  }
497
 
498
  /**
499
+ * Actually sets the styles.
500
  *
501
  * @codeCoverageIgnore
502
  *
503
  * @since 1.0.0
504
+ * @access private
505
+ * @param array $enqueue The array of files to enqueue.
506
+ * @param string $prefix The string to prefix in the enqueued name.
507
  */
508
+ private function set_styles( $enqueue, $prefix ) {
 
509
  $module_dir = $this->slug;
510
  if ( ! empty( $enqueue ) ) {
511
  if ( isset( $enqueue['css'] ) && ! empty( $enqueue['css'] ) ) {
512
  $order = 0;
513
+ $map = array();
514
  foreach ( $enqueue['css'] as $file_name => $dependencies ) {
515
  if ( $dependencies == false ) {
516
  $dependencies = array();
517
+ } else {
518
+ // check if any dependency has been loaded by us. If yes, then use that id as the dependency.
519
+ foreach ( $dependencies as $index => $dep ) {
520
+ if ( array_key_exists( $dep, $map ) ) {
521
+ unset( $dependencies[ $index ] );
522
+ $dependencies[ $index ] = $map[ $dep ];
523
+ }
524
+ }
525
  }
526
+ $url = filter_var( $file_name, FILTER_SANITIZE_URL );
527
  $resource = plugin_dir_url( $this->get_dir() ) . $module_dir . '/css/' . $file_name . '.css';
528
  if ( ! filter_var( $url, FILTER_VALIDATE_URL ) === false ) {
529
  $resource = $url;
530
  }
531
+ $id = 'obfx-module-' . $prefix . '-css-' . str_replace( ' ', '-', strtolower( $this->name ) ) . '-' . $order;
532
+ $map[ $file_name ] = $id;
533
  wp_enqueue_style(
534
+ $id,
535
  $resource,
536
  $dependencies,
537
  $this->version,
543
  }
544
  }
545
 
546
+ /**
547
+ * Sets the scripts for admin from the module array.
548
+ *
549
+ * @codeCoverageIgnore
550
+ *
551
+ * @since 1.0.0
552
+ * @access public
553
+ */
554
+ public function set_admin_scripts() {
555
+ $this->set_scripts( $this->admin_enqueue(), 'adm' );
556
+ }
557
+
558
+ /**
559
+ * Sets the styles for public from the module array.
560
+ *
561
+ * @codeCoverageIgnore
562
+ *
563
+ * @since 1.0.0
564
+ * @access public
565
+ */
566
+ public function set_public_styles() {
567
+ $this->set_styles( $this->public_enqueue(), 'pub' );
568
+ }
569
+
570
  /**
571
  * Sets the scripts for public from the module array.
572
  *
576
  * @access public
577
  */
578
  public function set_public_scripts() {
579
+ $this->set_scripts( $this->public_enqueue(), 'pub' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
  }
581
 
582
  /**
core/app/class-orbit-fox-admin.php CHANGED
@@ -78,8 +78,8 @@ class Orbit_Fox_Admin {
78
  }
79
  if ( in_array( $screen->id, array( 'tools_page_obfx_companion' ) ) ) {
80
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/css/orbit-fox-admin.css', array(), $this->version, 'all' );
81
- do_action( 'obfx_admin_enqueue_styles' );
82
  }
 
83
  }
84
 
85
  /**
@@ -107,8 +107,8 @@ class Orbit_Fox_Admin {
107
  }
108
  if ( in_array( $screen->id, array( 'tools_page_obfx_companion' ) ) ) {
109
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/js/orbit-fox-admin.js', array( 'jquery' ), $this->version, false );
110
- do_action( 'obfx_admin_enqueue_scripts' );
111
  }
 
112
  }
113
 
114
  /**
@@ -294,7 +294,7 @@ class Orbit_Fox_Admin {
294
  $checked = 'checked';
295
  }
296
 
297
- $data = array(
298
  'slug' => $slug,
299
  'name' => $module->name,
300
  'description' => $module->description,
78
  }
79
  if ( in_array( $screen->id, array( 'tools_page_obfx_companion' ) ) ) {
80
  wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/css/orbit-fox-admin.css', array(), $this->version, 'all' );
 
81
  }
82
+ do_action( 'obfx_admin_enqueue_styles' );
83
  }
84
 
85
  /**
107
  }
108
  if ( in_array( $screen->id, array( 'tools_page_obfx_companion' ) ) ) {
109
  wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . '../assets/js/orbit-fox-admin.js', array( 'jquery' ), $this->version, false );
 
110
  }
111
+ do_action( 'obfx_admin_enqueue_scripts' );
112
  }
113
 
114
  /**
294
  $checked = 'checked';
295
  }
296
 
297
+ $data = array(
298
  'slug' => $slug,
299
  'name' => $module->name,
300
  'description' => $module->description,
core/app/class-orbit-fox-global-settings.php CHANGED
@@ -57,13 +57,15 @@ class Orbit_Fox_Global_Settings {
57
  */
58
  public static function instance() {
59
  if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Orbit_Fox_Global_Settings ) ) {
60
- self::$instance = new Orbit_Fox_Global_Settings;
61
  self::$instance->modules = apply_filters(
62
  'obfx_modules',
63
  array(
64
  'stats',
65
  'social-sharing',
66
  'companion-legacy',
 
 
67
  )
68
  );
69
  }// End if().
57
  */
58
  public static function instance() {
59
  if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Orbit_Fox_Global_Settings ) ) {
60
+ self::$instance = new Orbit_Fox_Global_Settings;
61
  self::$instance->modules = apply_filters(
62
  'obfx_modules',
63
  array(
64
  'stats',
65
  'social-sharing',
66
  'companion-legacy',
67
+ 'menu-icons',
68
+ 'mystock-import',
69
  )
70
  );
71
  }// End if().
core/app/class-orbit-fox-module-factory.php CHANGED
@@ -28,7 +28,7 @@ class Orbit_Fox_Module_Factory {
28
  * @throws Exception Thrown if no module class exists for provided $module_name.
29
  */
30
  public static function build( $module_name ) {
31
- $module = str_replace( '-','_', ucwords( $module_name ) ) . '_OBFX_Module';
32
  if ( class_exists( $module ) ) {
33
  return new $module;
34
  }
28
  * @throws Exception Thrown if no module class exists for provided $module_name.
29
  */
30
  public static function build( $module_name ) {
31
+ $module = str_replace( '-', '_', ucwords( $module_name ) ) . '_OBFX_Module';
32
  if ( class_exists( $module ) ) {
33
  return new $module;
34
  }
core/app/class-orbit-fox-public.php CHANGED
@@ -49,7 +49,7 @@ class Orbit_Fox_Public {
49
  public function __construct( $plugin_name, $version ) {
50
 
51
  $this->plugin_name = $plugin_name;
52
- $this->version = $version;
53
 
54
  }
55
 
49
  public function __construct( $plugin_name, $version ) {
50
 
51
  $this->plugin_name = $plugin_name;
52
+ $this->version = $version;
53
 
54
  }
55
 
core/app/helpers/class-orbit-fox-render-helper.php CHANGED
@@ -76,18 +76,18 @@ class Orbit_Fox_Render_Helper {
76
  */
77
  private function sanitize_option( $option ) {
78
  $general_defaults = array(
79
- 'id' => null,
80
- 'class' => null,
81
- 'name' => null,
82
- 'label' => 'Module Text Label',
83
- 'title' => false,
84
  'description' => false,
85
- 'type' => null,
86
- 'value' => '',
87
- 'default' => '',
88
  'placeholder' => 'Add some text',
89
- 'disabled' => false,
90
- 'options' => array(),
91
  );
92
 
93
  return wp_parse_args( $option, $general_defaults );
@@ -152,7 +152,7 @@ class Orbit_Fox_Render_Helper {
152
  * @return string
153
  */
154
  private function wrap_element( $option, $element ) {
155
- $title = $this->get_title( $option['id'], $option['title'] );
156
  $description = $this->get_description( $option['description'] );
157
 
158
  $before_wrap = '';
@@ -207,8 +207,8 @@ class Orbit_Fox_Render_Helper {
207
  */
208
  private function field_text( $option = array() ) {
209
  $field_value = $this->set_field_value( $option );
210
- $field = '<input class="form-input ' . $option['class'] . '" type="text" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" value="' . $field_value . '">';
211
- $field = $this->wrap_element( $option, $field );
212
 
213
  return $field;
214
  }
@@ -223,8 +223,8 @@ class Orbit_Fox_Render_Helper {
223
  */
224
  private function field_textarea( $option = array() ) {
225
  $field_value = $this->set_field_value( $option );
226
- $field = '<textarea class="form-input ' . $option['class'] . '" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" rows="3">' . $field_value . '</textarea>';
227
- $field = $this->wrap_element( $option, $field );
228
 
229
  return $field;
230
  }
@@ -238,7 +238,7 @@ class Orbit_Fox_Render_Helper {
238
  * @return mixed
239
  */
240
  private function field_select( $option = array() ) {
241
- $field_value = $this->set_field_value( $option );
242
  $select_options = '';
243
  foreach ( $option['options'] as $value => $label ) {
244
  $is_selected = '';
@@ -265,7 +265,7 @@ class Orbit_Fox_Render_Helper {
265
  * @return mixed
266
  */
267
  private function field_radio( $option = array() ) {
268
- $field_value = $this->set_field_value( $option );
269
  $select_options = '';
270
  foreach ( $option['options'] as $value => $label ) {
271
  $checked = '';
@@ -289,12 +289,12 @@ class Orbit_Fox_Render_Helper {
289
  */
290
  private function field_checkbox( $option = array() ) {
291
  $field_value = $this->set_field_value( $option );
292
- $checked = '';
293
  if ( $field_value ) {
294
  $checked = 'checked';
295
  }
296
  $select_options = $this->generate_check_type( 'checkbox', 1, $checked, $option['label'], $option );
297
- $field = $this->wrap_element( $option, $select_options );
298
 
299
  return $field;
300
  }
@@ -309,7 +309,7 @@ class Orbit_Fox_Render_Helper {
309
  */
310
  private function field_toggle( $option = array() ) {
311
  $field_value = $this->set_field_value( $option );
312
- $checked = '';
313
  if ( $field_value ) {
314
  $checked = 'checked';
315
  }
76
  */
77
  private function sanitize_option( $option ) {
78
  $general_defaults = array(
79
+ 'id' => null,
80
+ 'class' => null,
81
+ 'name' => null,
82
+ 'label' => 'Module Text Label',
83
+ 'title' => false,
84
  'description' => false,
85
+ 'type' => null,
86
+ 'value' => '',
87
+ 'default' => '',
88
  'placeholder' => 'Add some text',
89
+ 'disabled' => false,
90
+ 'options' => array(),
91
  );
92
 
93
  return wp_parse_args( $option, $general_defaults );
152
  * @return string
153
  */
154
  private function wrap_element( $option, $element ) {
155
+ $title = $this->get_title( $option['id'], $option['title'] );
156
  $description = $this->get_description( $option['description'] );
157
 
158
  $before_wrap = '';
207
  */
208
  private function field_text( $option = array() ) {
209
  $field_value = $this->set_field_value( $option );
210
+ $field = '<input class="form-input ' . $option['class'] . '" type="text" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" value="' . $field_value . '">';
211
+ $field = $this->wrap_element( $option, $field );
212
 
213
  return $field;
214
  }
223
  */
224
  private function field_textarea( $option = array() ) {
225
  $field_value = $this->set_field_value( $option );
226
+ $field = '<textarea class="form-input ' . $option['class'] . '" id="' . $option['id'] . '" name="' . $option['name'] . '" placeholder="' . $option['placeholder'] . '" rows="3">' . $field_value . '</textarea>';
227
+ $field = $this->wrap_element( $option, $field );
228
 
229
  return $field;
230
  }
238
  * @return mixed
239
  */
240
  private function field_select( $option = array() ) {
241
+ $field_value = $this->set_field_value( $option );
242
  $select_options = '';
243
  foreach ( $option['options'] as $value => $label ) {
244
  $is_selected = '';
265
  * @return mixed
266
  */
267
  private function field_radio( $option = array() ) {
268
+ $field_value = $this->set_field_value( $option );
269
  $select_options = '';
270
  foreach ( $option['options'] as $value => $label ) {
271
  $checked = '';
289
  */
290
  private function field_checkbox( $option = array() ) {
291
  $field_value = $this->set_field_value( $option );
292
+ $checked = '';
293
  if ( $field_value ) {
294
  $checked = 'checked';
295
  }
296
  $select_options = $this->generate_check_type( 'checkbox', 1, $checked, $option['label'], $option );
297
+ $field = $this->wrap_element( $option, $select_options );
298
 
299
  return $field;
300
  }
309
  */
310
  private function field_toggle( $option = array() ) {
311
  $field_value = $this->set_field_value( $option );
312
+ $checked = '';
313
  if ( $field_value ) {
314
  $checked = 'checked';
315
  }
core/app/models/class-orbit-fox-model.php CHANGED
@@ -73,27 +73,27 @@ class Orbit_Fox_Model {
73
  * @param array $modules The modules array passed by Orbit_Fox.
74
  */
75
  public function register_modules_data( $modules = array() ) {
76
- $module_status = array();
77
  $module_settings = array();
78
  if ( ! empty( $modules ) ) {
79
  foreach ( $modules as $slug => $module ) {
80
- $is_enabled = $module->enable_module();
81
- $is_auto = $module->auto;
82
- $active = false;
83
  $showed_notices = array();
84
 
85
  $module_status[ $slug ] = array(
86
- 'enabled' => $is_enabled,
87
- 'autoload' => $is_auto,
88
  'showed_notices' => $showed_notices,
89
- 'active' => $active,
90
  );
91
 
92
  $module_settings[ $slug ] = $module->get_options_defaults();
93
  }
94
  }
95
 
96
- $this->module_status = $module_status;
97
  $this->module_settings = $module_settings;
98
 
99
  }
@@ -107,8 +107,8 @@ class Orbit_Fox_Model {
107
  */
108
  public function default_data() {
109
  $data = array(
110
- 'core_settings' => $this->core_settings,
111
- 'module_status' => $this->module_status,
112
  'module_settings' => $this->module_settings,
113
  );
114
 
@@ -159,7 +159,7 @@ class Orbit_Fox_Model {
159
  * @return mixed
160
  */
161
  public function set_module_option( $slug, $key, $value ) {
162
- $new = array();
163
  $new['module_settings'][ $slug ][ $key ] = $value;
164
  return $this->save( $new );
165
  }
@@ -206,7 +206,7 @@ class Orbit_Fox_Model {
206
  * @return mixed
207
  */
208
  public function set_module_status( $slug, $key, $value ) {
209
- $new = array();
210
  $new['module_status'][ $slug ][ $key ] = $value;
211
  return $this->save( $new );
212
  }
73
  * @param array $modules The modules array passed by Orbit_Fox.
74
  */
75
  public function register_modules_data( $modules = array() ) {
76
+ $module_status = array();
77
  $module_settings = array();
78
  if ( ! empty( $modules ) ) {
79
  foreach ( $modules as $slug => $module ) {
80
+ $is_enabled = $module->enable_module();
81
+ $is_auto = $module->auto;
82
+ $active = false;
83
  $showed_notices = array();
84
 
85
  $module_status[ $slug ] = array(
86
+ 'enabled' => $is_enabled,
87
+ 'autoload' => $is_auto,
88
  'showed_notices' => $showed_notices,
89
+ 'active' => $active,
90
  );
91
 
92
  $module_settings[ $slug ] = $module->get_options_defaults();
93
  }
94
  }
95
 
96
+ $this->module_status = $module_status;
97
  $this->module_settings = $module_settings;
98
 
99
  }
107
  */
108
  public function default_data() {
109
  $data = array(
110
+ 'core_settings' => $this->core_settings,
111
+ 'module_status' => $this->module_status,
112
  'module_settings' => $this->module_settings,
113
  );
114
 
159
  * @return mixed
160
  */
161
  public function set_module_option( $slug, $key, $value ) {
162
+ $new = array();
163
  $new['module_settings'][ $slug ][ $key ] = $value;
164
  return $this->save( $new );
165
  }
206
  * @return mixed
207
  */
208
  public function set_module_status( $slug, $key, $value ) {
209
+ $new = array();
210
  $new['module_status'][ $slug ][ $key ] = $value;
211
  return $this->save( $new );
212
  }
core/app/views/partials/module-panel-tpl.php CHANGED
@@ -31,10 +31,10 @@ if ( ! isset( $options_fields ) ) {
31
  $options_fields = __( 'No options provided.', 'themeisle-companion' );
32
  }
33
 
34
- $display = '';
35
  $disabled_fields = '';
36
  if ( ! $active ) {
37
- $display = 'style="display: none;"';
38
  $disabled_fields = 'disabled';
39
  }
40
  ?>
31
  $options_fields = __( 'No options provided.', 'themeisle-companion' );
32
  }
33
 
34
+ $display = '';
35
  $disabled_fields = '';
36
  if ( ! $active ) {
37
+ $display = 'style="display: none;"';
38
  $disabled_fields = 'disabled';
39
  }
40
  ?>
core/assets/css/orbit-fox-admin.css CHANGED
@@ -7,8 +7,8 @@
7
  * @author ThemeIsle
8
  * Extends Spectre.css Library
9
  */
10
- /*
11
- Version: 2.0.6
12
  */
13
 
14
  /* Document
@@ -76,7 +76,6 @@ html {
76
  .obfx-wrapper hr {
77
  /* 1 */
78
  overflow: visible;
79
- -webkit-box-sizing: content-box;
80
  box-sizing: content-box;
81
  /* 1 */
82
  height: 0;
@@ -291,7 +290,6 @@ html {
291
  */
292
  .obfx-wrapper legend {
293
  display: table;
294
- -webkit-box-sizing: border-box;
295
  box-sizing: border-box;
296
  max-width: 100%;
297
  padding: 0;
@@ -323,7 +321,6 @@ html {
323
  */
324
  .obfx-wrapper [type="checkbox"],
325
  .obfx-wrapper [type="radio"] {
326
- -webkit-box-sizing: border-box;
327
  box-sizing: border-box;
328
  /* 1 */
329
  padding: 0;
@@ -416,12 +413,10 @@ html {
416
  .obfx-wrapper *,
417
  .obfx-wrapper *::before,
418
  .obfx-wrapper *::after {
419
- -webkit-box-sizing: inherit;
420
  box-sizing: inherit;
421
  }
422
 
423
  .obfx-wrapper {
424
- -webkit-box-sizing: border-box;
425
  box-sizing: border-box;
426
  font-size: 10px;
427
  line-height: 1.42857143;
@@ -448,7 +443,6 @@ html {
448
  }
449
 
450
  .obfx-wrapper a:focus {
451
- -webkit-box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
452
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
453
  }
454
 
@@ -661,7 +655,6 @@ html {
661
 
662
  .obfx-wrapper .btn:focus {
663
  background: #fbfbfe;
664
- -webkit-box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
665
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
666
  text-decoration: none;
667
  }
@@ -877,7 +870,6 @@ html {
877
 
878
  .obfx-wrapper .form-input:focus {
879
  border-color: #5764c6;
880
- -webkit-box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
881
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
882
  }
883
 
@@ -966,7 +958,6 @@ html {
966
 
967
  .obfx-wrapper .form-select:focus {
968
  border-color: #5764c6;
969
- -webkit-box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
970
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
971
  }
972
 
@@ -997,7 +988,6 @@ html {
997
  .obfx-wrapper .has-success .form-select:focus,
998
  .obfx-wrapper .form-input.is-success:focus,
999
  .obfx-wrapper .form-select.is-success:focus {
1000
- -webkit-box-shadow: 0 0 0 0.2rem rgba(50, 182, 67, 0.15);
1001
  box-shadow: 0 0 0 0.2rem rgba(50, 182, 67, 0.15);
1002
  }
1003
 
@@ -1012,7 +1002,6 @@ html {
1012
  .obfx-wrapper .has-error .form-select:focus,
1013
  .obfx-wrapper .form-input.is-error:focus,
1014
  .obfx-wrapper .form-select.is-error:focus {
1015
- -webkit-box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
1016
  box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
1017
  }
1018
 
@@ -1021,7 +1010,6 @@ html {
1021
  }
1022
 
1023
  .obfx-wrapper .form-input:not(:placeholder-shown):invalid:focus {
1024
- -webkit-box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
1025
  box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
1026
  }
1027
 
@@ -1084,7 +1072,6 @@ html {
1084
  .obfx-wrapper .form-radio input:focus + .form-icon,
1085
  .obfx-wrapper .form-switch input:focus + .form-icon {
1086
  border-color: #5764c6;
1087
- -webkit-box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
1088
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
1089
  }
1090
 
@@ -2160,7 +2147,6 @@ html {
2160
 
2161
  .obfx-wrapper .form-autocomplete .form-autocomplete-input.is-focused {
2162
  border-color: #5764c6;
2163
- -webkit-box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
2164
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
2165
  }
2166
 
@@ -2170,7 +2156,6 @@ html {
2170
  height: 2.8rem;
2171
  padding: 0.3rem 0.8rem;
2172
  border-color: transparent;
2173
- -webkit-box-shadow: none;
2174
  box-shadow: none;
2175
 
2176
  -webkit-box-flex: 1;
@@ -2275,7 +2260,6 @@ html {
2275
  color: #fff;
2276
  background: #5764c6;
2277
  background-clip: padding-box;
2278
- -webkit-box-shadow: 0 0 0 0.2rem #fff;
2279
  box-shadow: 0 0 0 0.2rem #fff;
2280
  content: attr(data-badge);
2281
  -webkit-transform: translate(-0.2rem, -1rem);
@@ -2411,7 +2395,6 @@ html {
2411
  }
2412
 
2413
  .obfx-wrapper .bar-slider .bar-slider-btn:active {
2414
- -webkit-box-shadow: 0 0 0 0.2rem #5764c6;
2415
  box-shadow: 0 0 0 0.2rem #5764c6;
2416
  }
2417
 
@@ -2530,7 +2513,6 @@ html {
2530
  padding: 1rem;
2531
  border-radius: 0.2rem;
2532
  background: #fff;
2533
- -webkit-box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
2534
  box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
2535
  list-style: none;
2536
  -webkit-transform: translateY(0.5rem);
@@ -2637,7 +2619,6 @@ html {
2637
  padding: 0;
2638
  border-radius: 0.2rem;
2639
  background: #fff;
2640
- -webkit-box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
2641
  box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
2642
  text-align: left;
2643
  }
@@ -2938,7 +2919,6 @@ html {
2938
 
2939
  .obfx-wrapper .popover .card {
2940
  border: 0;
2941
- -webkit-box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
2942
  box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
2943
  }
2944
 
@@ -3569,27 +3549,22 @@ html {
3569
  }
3570
 
3571
  .obfx-wrapper .shadow-0 {
3572
- -webkit-box-shadow: 0 0 0.2rem rgba(69, 77, 93, 0.3);
3573
  box-shadow: 0 0 0.2rem rgba(69, 77, 93, 0.3);
3574
  }
3575
 
3576
  .obfx-wrapper .shadow-1 {
3577
- -webkit-box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
3578
  box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
3579
  }
3580
 
3581
  .obfx-wrapper .shadow-2 {
3582
- -webkit-box-shadow: 0 0.2rem 0.6rem rgba(69, 77, 93, 0.3);
3583
  box-shadow: 0 0.2rem 0.6rem rgba(69, 77, 93, 0.3);
3584
  }
3585
 
3586
  .obfx-wrapper .shadow-3 {
3587
- -webkit-box-shadow: 0 0.3rem 0.8rem rgba(69, 77, 93, 0.3);
3588
  box-shadow: 0 0.3rem 0.8rem rgba(69, 77, 93, 0.3);
3589
  }
3590
 
3591
  .obfx-wrapper .shadow-4 {
3592
- -webkit-box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
3593
  box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
3594
  }
3595
 
7
  * @author ThemeIsle
8
  * Extends Spectre.css Library
9
  */
10
+ /*
11
+ Version: 2.1.1
12
  */
13
 
14
  /* Document
76
  .obfx-wrapper hr {
77
  /* 1 */
78
  overflow: visible;
 
79
  box-sizing: content-box;
80
  /* 1 */
81
  height: 0;
290
  */
291
  .obfx-wrapper legend {
292
  display: table;
 
293
  box-sizing: border-box;
294
  max-width: 100%;
295
  padding: 0;
321
  */
322
  .obfx-wrapper [type="checkbox"],
323
  .obfx-wrapper [type="radio"] {
 
324
  box-sizing: border-box;
325
  /* 1 */
326
  padding: 0;
413
  .obfx-wrapper *,
414
  .obfx-wrapper *::before,
415
  .obfx-wrapper *::after {
 
416
  box-sizing: inherit;
417
  }
418
 
419
  .obfx-wrapper {
 
420
  box-sizing: border-box;
421
  font-size: 10px;
422
  line-height: 1.42857143;
443
  }
444
 
445
  .obfx-wrapper a:focus {
 
446
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
447
  }
448
 
655
 
656
  .obfx-wrapper .btn:focus {
657
  background: #fbfbfe;
 
658
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
659
  text-decoration: none;
660
  }
870
 
871
  .obfx-wrapper .form-input:focus {
872
  border-color: #5764c6;
 
873
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
874
  }
875
 
958
 
959
  .obfx-wrapper .form-select:focus {
960
  border-color: #5764c6;
 
961
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
962
  }
963
 
988
  .obfx-wrapper .has-success .form-select:focus,
989
  .obfx-wrapper .form-input.is-success:focus,
990
  .obfx-wrapper .form-select.is-success:focus {
 
991
  box-shadow: 0 0 0 0.2rem rgba(50, 182, 67, 0.15);
992
  }
993
 
1002
  .obfx-wrapper .has-error .form-select:focus,
1003
  .obfx-wrapper .form-input.is-error:focus,
1004
  .obfx-wrapper .form-select.is-error:focus {
 
1005
  box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
1006
  }
1007
 
1010
  }
1011
 
1012
  .obfx-wrapper .form-input:not(:placeholder-shown):invalid:focus {
 
1013
  box-shadow: 0 0 0 0.2rem rgba(232, 86, 0, 0.15);
1014
  }
1015
 
1072
  .obfx-wrapper .form-radio input:focus + .form-icon,
1073
  .obfx-wrapper .form-switch input:focus + .form-icon {
1074
  border-color: #5764c6;
 
1075
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
1076
  }
1077
 
2147
 
2148
  .obfx-wrapper .form-autocomplete .form-autocomplete-input.is-focused {
2149
  border-color: #5764c6;
 
2150
  box-shadow: 0 0 0 0.2rem rgba(87, 100, 198, 0.15);
2151
  }
2152
 
2156
  height: 2.8rem;
2157
  padding: 0.3rem 0.8rem;
2158
  border-color: transparent;
 
2159
  box-shadow: none;
2160
 
2161
  -webkit-box-flex: 1;
2260
  color: #fff;
2261
  background: #5764c6;
2262
  background-clip: padding-box;
 
2263
  box-shadow: 0 0 0 0.2rem #fff;
2264
  content: attr(data-badge);
2265
  -webkit-transform: translate(-0.2rem, -1rem);
2395
  }
2396
 
2397
  .obfx-wrapper .bar-slider .bar-slider-btn:active {
 
2398
  box-shadow: 0 0 0 0.2rem #5764c6;
2399
  }
2400
 
2513
  padding: 1rem;
2514
  border-radius: 0.2rem;
2515
  background: #fff;
 
2516
  box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
2517
  list-style: none;
2518
  -webkit-transform: translateY(0.5rem);
2619
  padding: 0;
2620
  border-radius: 0.2rem;
2621
  background: #fff;
 
2622
  box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
2623
  text-align: left;
2624
  }
2919
 
2920
  .obfx-wrapper .popover .card {
2921
  border: 0;
 
2922
  box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
2923
  }
2924
 
3549
  }
3550
 
3551
  .obfx-wrapper .shadow-0 {
 
3552
  box-shadow: 0 0 0.2rem rgba(69, 77, 93, 0.3);
3553
  }
3554
 
3555
  .obfx-wrapper .shadow-1 {
 
3556
  box-shadow: 0 0.1rem 0.4rem rgba(69, 77, 93, 0.3);
3557
  }
3558
 
3559
  .obfx-wrapper .shadow-2 {
 
3560
  box-shadow: 0 0.2rem 0.6rem rgba(69, 77, 93, 0.3);
3561
  }
3562
 
3563
  .obfx-wrapper .shadow-3 {
 
3564
  box-shadow: 0 0.3rem 0.8rem rgba(69, 77, 93, 0.3);
3565
  }
3566
 
3567
  .obfx-wrapper .shadow-4 {
 
3568
  box-shadow: 0 0.4rem 1rem rgba(69, 77, 93, 0.3);
3569
  }
3570
 
core/includes/class-orbit-fox.php CHANGED
@@ -68,7 +68,8 @@ class Orbit_Fox {
68
  public function __construct() {
69
 
70
  $this->plugin_name = 'orbit-fox';
71
- $this->version = '2.0.6';
 
72
 
73
  $this->load_dependencies();
74
  $this->set_locale();
@@ -123,7 +124,7 @@ class Orbit_Fox {
123
  private function prepare_modules() {
124
  $global_settings = new Orbit_Fox_Global_Settings();
125
  $modules_to_load = $global_settings->instance()->get_modules();
126
- $obfx_model = new Orbit_Fox_Model();
127
 
128
  $module_factory = new Orbit_Fox_Module_Factory();
129
  foreach ( $modules_to_load as $module_name ) {
68
  public function __construct() {
69
 
70
  $this->plugin_name = 'orbit-fox';
71
+
72
+ $this->version = '2.1.1';
73
 
74
  $this->load_dependencies();
75
  $this->set_locale();
124
  private function prepare_modules() {
125
  $global_settings = new Orbit_Fox_Global_Settings();
126
  $modules_to_load = $global_settings->instance()->get_modules();
127
+ $obfx_model = new Orbit_Fox_Model();
128
 
129
  $module_factory = new Orbit_Fox_Module_Factory();
130
  foreach ( $modules_to_load as $module_name ) {
languages/themeisle-companion.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Orbit Fox Companion 2.0.2\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/orbit-fox/issues\n"
7
- "POT-Creation-Date: 2017-08-22 14:27:35+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -24,7 +24,7 @@ msgstr ""
24
  "X-Poedit-Bookmarks: \n"
25
  "X-Textdomain-Support: yes\n"
26
 
27
- #: core/app/class-orbit-fox-admin.php:110
28
  msgid "Orbit Fox"
29
  msgstr ""
30
 
@@ -32,48 +32,48 @@ msgstr ""
32
  msgid "Orbit Fox Companion"
33
  msgstr ""
34
 
35
- #: core/app/class-orbit-fox-admin.php:144
 
 
 
 
 
36
  msgid "No module found! No data was updated."
37
  msgstr ""
38
 
39
- #: core/app/class-orbit-fox-admin.php:150
40
  msgid "Something went wrong, data might not be saved!"
41
  msgstr ""
42
 
43
- #: core/app/class-orbit-fox-admin.php:154
44
  msgid "Options updated, successfully!"
45
  msgstr ""
46
 
47
- #: core/app/class-orbit-fox-admin.php:173
48
- #: core/app/class-orbit-fox-admin.php:224
49
- msgid "Could not process the request!"
50
- msgstr ""
51
-
52
- #: core/app/class-orbit-fox-admin.php:197
53
  msgid "No module found!"
54
  msgstr ""
55
 
56
- #: core/app/class-orbit-fox-admin.php:201
57
  msgid "Something went wrong, can not change module status!"
58
  msgstr ""
59
 
60
- #: core/app/class-orbit-fox-admin.php:205
61
  msgid "Module status changed!"
62
  msgstr ""
63
 
64
- #: core/app/class-orbit-fox-admin.php:317
65
  msgid "No modules found."
66
  msgstr ""
67
 
68
- #: core/app/class-orbit-fox-admin.php:318
69
  msgid "Please contact support for more help."
70
  msgstr ""
71
 
72
- #: core/app/class-orbit-fox-admin.php:325
73
  msgid "No active modules."
74
  msgstr ""
75
 
76
- #: core/app/class-orbit-fox-admin.php:326
77
  msgid "Activate a module using the toggles above."
78
  msgstr ""
79
 
@@ -125,216 +125,275 @@ msgstr ""
125
  msgid "Activate"
126
  msgstr ""
127
 
128
- #: obfx_modules/companion-legacy/inc/hestia/functions.php:67
129
  msgid "Front Page"
130
  msgstr ""
131
 
132
- #: obfx_modules/companion-legacy/inc/hestia/functions.php:69
133
  msgid "Blog"
134
  msgstr ""
135
 
136
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:18
137
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:24
138
  msgid "Why our product is the best"
139
  msgstr ""
140
 
141
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:23
142
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:38
143
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:51
144
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:25
145
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:172
146
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:179
147
  #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:186
148
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:25
149
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:23
 
 
150
  msgid ""
151
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "
152
  "tempor incididunt ut labore et dolore magna aliqua."
153
  msgstr ""
154
 
155
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:34
156
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:24
157
  msgid "Meet our team"
158
  msgstr ""
159
 
160
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:47
161
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:22
162
  msgid "What clients say"
163
  msgstr ""
164
 
165
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:21
166
- msgid "Features"
167
- msgstr ""
168
-
169
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:37
170
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:37
171
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:37
172
- msgid "Disable section"
173
  msgstr ""
174
 
 
175
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:52
 
176
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:52
177
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:52
178
- msgid "Section Title"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
  msgstr ""
180
 
181
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:67
182
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:67
183
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:67
 
 
 
 
 
 
184
  msgid "Section Subtitle"
185
  msgstr ""
186
 
187
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:84
188
  msgid "Features Content"
189
  msgstr ""
190
 
191
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:87
192
  msgid "Add new Feature"
193
  msgstr ""
194
 
195
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:88
196
  msgid "Feature"
197
  msgstr ""
198
 
199
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  msgid "Team"
201
  msgstr ""
202
 
203
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:84
204
  msgid "Team Content"
205
  msgstr ""
206
 
207
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:87
208
  msgid "Add new Team Member"
209
  msgstr ""
210
 
211
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:88
212
  msgid "Team Member"
213
  msgstr ""
214
 
215
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:21
 
216
  msgid "Testimonials"
217
  msgstr ""
218
 
219
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:84
220
  msgid "Testimonials Content"
221
  msgstr ""
222
 
223
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:87
224
  msgid "Add new Testimonial"
225
  msgstr ""
226
 
227
- #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:88
228
  msgid "Testimonial"
229
  msgstr ""
230
 
231
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:171
232
  msgid "Responsive"
233
  msgstr ""
234
 
235
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:178
236
  msgid "Quality"
237
  msgstr ""
238
 
239
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:185
240
  msgid "Support"
241
  msgstr ""
242
 
243
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:193
244
  msgid "Desmond Purpleson"
245
  msgstr ""
246
 
247
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:194
248
  msgid "CEO"
249
  msgstr ""
250
 
251
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:195
252
  msgid ""
253
  "Locavore pinterest chambray affogato art party, forage coloring book "
254
  "typewriter. Bitters cold selfies, retro celiac sartorial mustache."
255
  msgstr ""
256
 
257
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:224
258
  msgid "Parsley Pepperspray"
259
  msgstr ""
260
 
261
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:225
262
  msgid "Marketing Specialist"
263
  msgstr ""
264
 
265
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:226
266
  msgid ""
267
  "Craft beer salvia celiac mlkshk. Pinterest celiac tumblr, portland salvia "
268
  "skateboard cliche thundercats. Tattooed chia austin hell."
269
  msgstr ""
270
 
271
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:255
272
  msgid "Desmond Eagle"
273
  msgstr ""
274
 
275
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:256
276
  msgid "Graphic Designer"
277
  msgstr ""
278
 
279
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:257
280
  msgid ""
281
  "Pok pok direct trade godard street art, poutine fam typewriter food truck "
282
  "narwhal kombucha wolf cardigan butcher whatever pickled you."
283
  msgstr ""
284
 
285
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:286
286
  msgid "Ruby Von Rails"
287
  msgstr ""
288
 
289
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:287
290
  msgid "Lead Developer"
291
  msgstr ""
292
 
293
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:288
294
  msgid ""
295
  "Small batch vexillologist 90's blue bottle stumptown bespoke. Pok pok tilde "
296
  "fixie chartreuse, VHS gluten-free selfies wolf hot."
297
  msgstr ""
298
 
299
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:160
300
  msgid "Inverness McKenzie"
301
  msgstr ""
302
 
303
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:161
304
  msgid "Business Owner"
305
  msgstr ""
306
 
307
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:162
308
  msgid ""
309
  "\"We have no regrets! After using your product my business skyrocketed! I "
310
  "made back the purchase price in just 48 hours! I couldn't have asked for "
311
  "more than this.\""
312
  msgstr ""
313
 
314
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:167
315
  msgid "Hanson Deck"
316
  msgstr ""
317
 
318
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:168
319
  msgid "Independent Artist"
320
  msgstr ""
321
 
322
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:169
323
  msgid ""
324
  "\"Your company is truly upstanding and is behind its product 100 percent. "
325
  "Hestia is worth much more than I paid. I like Hestia more each day because "
326
  "it makes easier.\""
327
  msgstr ""
328
 
329
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:174
330
  msgid "Natalya Undergrowth"
331
  msgstr ""
332
 
333
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:175
334
  msgid "Freelancer"
335
  msgstr ""
336
 
337
- #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:176
338
  msgid ""
339
  "\"Thank you for making it painless, pleasant and most of all hassle free! I "
340
  "am so pleased with this product. Dude, your stuff is great! I will refer "
@@ -441,18 +500,6 @@ msgstr ""
441
  msgid "Remove"
442
  msgstr ""
443
 
444
- #: obfx_modules/companion-legacy/inc/rhea/widgets/features.widget.php:84
445
- #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-focus.php:176
446
- #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-testimonial.php:195
447
- msgid "Text"
448
- msgstr ""
449
-
450
- #: obfx_modules/companion-legacy/inc/rhea/widgets/features.widget.php:88
451
- #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-clients.php:115
452
- #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-focus.php:183
453
- msgid "Link"
454
- msgstr ""
455
-
456
  #: obfx_modules/companion-legacy/inc/rhea/widgets/hours.widget.php:9
457
  msgid "[Rhea] Company Program"
458
  msgstr ""
@@ -658,6 +705,103 @@ msgstr ""
658
  msgid "All Icons"
659
  msgstr ""
660
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
661
  #: obfx_modules/social-sharing/init.php:30
662
  msgid "Social Sharing Module"
663
  msgstr ""
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Orbit Fox Companion 2.0.11\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/orbit-fox/issues\n"
7
+ "POT-Creation-Date: 2017-11-07 14:30:58+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
24
  "X-Poedit-Bookmarks: \n"
25
  "X-Textdomain-Support: yes\n"
26
 
27
+ #: core/app/class-orbit-fox-admin.php:122
28
  msgid "Orbit Fox"
29
  msgstr ""
30
 
32
  msgid "Orbit Fox Companion"
33
  msgstr ""
34
 
35
+ #: core/app/class-orbit-fox-admin.php:153
36
+ #: core/app/class-orbit-fox-admin.php:209
37
+ msgid "Could not process the request!"
38
+ msgstr ""
39
+
40
+ #: core/app/class-orbit-fox-admin.php:179
41
  msgid "No module found! No data was updated."
42
  msgstr ""
43
 
44
+ #: core/app/class-orbit-fox-admin.php:185
45
  msgid "Something went wrong, data might not be saved!"
46
  msgstr ""
47
 
48
+ #: core/app/class-orbit-fox-admin.php:189
49
  msgid "Options updated, successfully!"
50
  msgstr ""
51
 
52
+ #: core/app/class-orbit-fox-admin.php:235
 
 
 
 
 
53
  msgid "No module found!"
54
  msgstr ""
55
 
56
+ #: core/app/class-orbit-fox-admin.php:239
57
  msgid "Something went wrong, can not change module status!"
58
  msgstr ""
59
 
60
+ #: core/app/class-orbit-fox-admin.php:243
61
  msgid "Module status changed!"
62
  msgstr ""
63
 
64
+ #: core/app/class-orbit-fox-admin.php:335
65
  msgid "No modules found."
66
  msgstr ""
67
 
68
+ #: core/app/class-orbit-fox-admin.php:336
69
  msgid "Please contact support for more help."
70
  msgstr ""
71
 
72
+ #: core/app/class-orbit-fox-admin.php:343
73
  msgid "No active modules."
74
  msgstr ""
75
 
76
+ #: core/app/class-orbit-fox-admin.php:344
77
  msgid "Activate a module using the toggles above."
78
  msgstr ""
79
 
125
  msgid "Activate"
126
  msgstr ""
127
 
128
+ #: obfx_modules/companion-legacy/inc/hestia/functions.php:66
129
  msgid "Front Page"
130
  msgstr ""
131
 
132
+ #: obfx_modules/companion-legacy/inc/hestia/functions.php:68
133
  msgid "Blog"
134
  msgstr ""
135
 
136
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:18
137
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:28
138
  msgid "Why our product is the best"
139
  msgstr ""
140
 
141
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:23
142
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:38
143
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:51
144
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:29
 
 
145
  #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:186
146
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:193
147
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:200
148
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:32
149
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:31
150
  msgid ""
151
  "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod "
152
  "tempor incididunt ut labore et dolore magna aliqua."
153
  msgstr ""
154
 
155
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:34
156
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:31
157
  msgid "Meet our team"
158
  msgstr ""
159
 
160
  #: obfx_modules/companion-legacy/inc/hestia/inc/customizer.php:47
161
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:30
162
  msgid "What clients say"
163
  msgstr ""
164
 
165
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php:24
166
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php:34
167
+ msgid "Clients Bar"
 
 
 
 
 
168
  msgstr ""
169
 
170
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php:52
171
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:52
172
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:55
173
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:52
174
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:52
175
+ msgid "Disable section"
176
+ msgstr ""
177
+
178
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php:69
179
+ msgid "Clients Bar Content"
180
+ msgstr ""
181
+
182
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php:72
183
+ msgid "Add new client"
184
+ msgstr ""
185
+
186
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php:73
187
+ msgid "Clients"
188
+ msgstr ""
189
+
190
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:24
191
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:34
192
+ msgid "Features"
193
  msgstr ""
194
 
195
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:67
196
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:67
197
  #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:67
198
+ msgid "Section Title"
199
+ msgstr ""
200
+
201
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:82
202
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:82
203
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:82
204
  msgid "Section Subtitle"
205
  msgstr ""
206
 
207
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:99
208
  msgid "Features Content"
209
  msgstr ""
210
 
211
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:102
212
  msgid "Add new Feature"
213
  msgstr ""
214
 
215
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php:103
216
  msgid "Feature"
217
  msgstr ""
218
 
219
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:27
220
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:37
221
+ msgid "Ribbon"
222
+ msgstr ""
223
+
224
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:73
225
+ msgid "Background Image"
226
+ msgstr ""
227
+
228
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:80
229
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php:35
230
+ msgid "Subscribe to our Newsletter"
231
+ msgstr ""
232
+
233
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:92
234
+ #: obfx_modules/companion-legacy/inc/rhea/widgets/features.widget.php:84
235
+ #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-focus.php:176
236
+ #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-testimonial.php:195
237
+ msgid "Text"
238
+ msgstr ""
239
+
240
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:98
241
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php:38
242
+ msgid "Subscribe"
243
+ msgstr ""
244
+
245
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:109
246
+ msgid "Button Text"
247
+ msgstr ""
248
+
249
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php:126
250
+ #: obfx_modules/companion-legacy/inc/rhea/widgets/features.widget.php:88
251
+ #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-clients.php:115
252
+ #: obfx_modules/companion-legacy/inc/zerif-lite/widgets/widget-focus.php:183
253
+ msgid "Link"
254
+ msgstr ""
255
+
256
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:24
257
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:34
258
  msgid "Team"
259
  msgstr ""
260
 
261
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:99
262
  msgid "Team Content"
263
  msgstr ""
264
 
265
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:102
266
  msgid "Add new Team Member"
267
  msgstr ""
268
 
269
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php:103
270
  msgid "Team Member"
271
  msgstr ""
272
 
273
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:24
274
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:34
275
  msgid "Testimonials"
276
  msgstr ""
277
 
278
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:99
279
  msgid "Testimonials Content"
280
  msgstr ""
281
 
282
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:102
283
  msgid "Add new Testimonial"
284
  msgstr ""
285
 
286
+ #: obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php:103
287
  msgid "Testimonial"
288
  msgstr ""
289
 
290
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:185
291
  msgid "Responsive"
292
  msgstr ""
293
 
294
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:192
295
  msgid "Quality"
296
  msgstr ""
297
 
298
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php:199
299
  msgid "Support"
300
  msgstr ""
301
 
302
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:216
303
  msgid "Desmond Purpleson"
304
  msgstr ""
305
 
306
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:217
307
  msgid "CEO"
308
  msgstr ""
309
 
310
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:218
311
  msgid ""
312
  "Locavore pinterest chambray affogato art party, forage coloring book "
313
  "typewriter. Bitters cold selfies, retro celiac sartorial mustache."
314
  msgstr ""
315
 
316
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:247
317
  msgid "Parsley Pepperspray"
318
  msgstr ""
319
 
320
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:248
321
  msgid "Marketing Specialist"
322
  msgstr ""
323
 
324
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:249
325
  msgid ""
326
  "Craft beer salvia celiac mlkshk. Pinterest celiac tumblr, portland salvia "
327
  "skateboard cliche thundercats. Tattooed chia austin hell."
328
  msgstr ""
329
 
330
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:278
331
  msgid "Desmond Eagle"
332
  msgstr ""
333
 
334
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:279
335
  msgid "Graphic Designer"
336
  msgstr ""
337
 
338
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:280
339
  msgid ""
340
  "Pok pok direct trade godard street art, poutine fam typewriter food truck "
341
  "narwhal kombucha wolf cardigan butcher whatever pickled you."
342
  msgstr ""
343
 
344
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:309
345
  msgid "Ruby Von Rails"
346
  msgstr ""
347
 
348
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:310
349
  msgid "Lead Developer"
350
  msgstr ""
351
 
352
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php:311
353
  msgid ""
354
  "Small batch vexillologist 90's blue bottle stumptown bespoke. Pok pok tilde "
355
  "fixie chartreuse, VHS gluten-free selfies wolf hot."
356
  msgstr ""
357
 
358
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:187
359
  msgid "Inverness McKenzie"
360
  msgstr ""
361
 
362
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:188
363
  msgid "Business Owner"
364
  msgstr ""
365
 
366
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:189
367
  msgid ""
368
  "\"We have no regrets! After using your product my business skyrocketed! I "
369
  "made back the purchase price in just 48 hours! I couldn't have asked for "
370
  "more than this.\""
371
  msgstr ""
372
 
373
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:194
374
  msgid "Hanson Deck"
375
  msgstr ""
376
 
377
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:195
378
  msgid "Independent Artist"
379
  msgstr ""
380
 
381
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:196
382
  msgid ""
383
  "\"Your company is truly upstanding and is behind its product 100 percent. "
384
  "Hestia is worth much more than I paid. I like Hestia more each day because "
385
  "it makes easier.\""
386
  msgstr ""
387
 
388
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:201
389
  msgid "Natalya Undergrowth"
390
  msgstr ""
391
 
392
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:202
393
  msgid "Freelancer"
394
  msgstr ""
395
 
396
+ #: obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php:203
397
  msgid ""
398
  "\"Thank you for making it painless, pleasant and most of all hassle free! I "
399
  "am so pleased with this product. Dude, your stuff is great! I will refer "
500
  msgid "Remove"
501
  msgstr ""
502
 
 
 
 
 
 
 
 
 
 
 
 
 
503
  #: obfx_modules/companion-legacy/inc/rhea/widgets/hours.widget.php:9
504
  msgid "[Rhea] Company Program"
505
  msgstr ""
705
  msgid "All Icons"
706
  msgstr ""
707
 
708
+ #: obfx_modules/menu-icons/init.php:33
709
+ msgid "Menu Icons"
710
+ msgstr ""
711
+
712
+ #: obfx_modules/menu-icons/init.php:34
713
+ msgid "Module to define menu icons for navigation."
714
+ msgstr ""
715
+
716
+ #: obfx_modules/mystock-import/inc/photos.php:28
717
+ #: obfx_modules/mystock-import/init.php:188
718
+ msgid "Deselect"
719
+ msgstr ""
720
+
721
+ #: obfx_modules/mystock-import/init.php:44
722
+ msgid "Mystock Import"
723
+ msgstr ""
724
+
725
+ #: obfx_modules/mystock-import/init.php:45
726
+ msgid "Module to import images from mystock."
727
+ msgstr ""
728
+
729
+ #: obfx_modules/mystock-import/init.php:108
730
+ #: obfx_modules/mystock-import/init.php:115
731
+ #: obfx_modules/mystock-import/init.php:122
732
+ #: obfx_modules/mystock-import/init.php:130
733
+ #: obfx_modules/mystock-import/init.php:135
734
+ msgid "Image failed to upload"
735
+ msgstr ""
736
+
737
+ #: obfx_modules/mystock-import/init.php:222
738
+ msgid "Square"
739
+ msgstr ""
740
+
741
+ #: obfx_modules/mystock-import/init.php:223
742
+ msgid "Large Square"
743
+ msgstr ""
744
+
745
+ #: obfx_modules/mystock-import/init.php:224
746
+ msgid "Thumbnail"
747
+ msgstr ""
748
+
749
+ #: obfx_modules/mystock-import/init.php:225
750
+ msgid "Small"
751
+ msgstr ""
752
+
753
+ #: obfx_modules/mystock-import/init.php:226
754
+ msgid "Small 320"
755
+ msgstr ""
756
+
757
+ #: obfx_modules/mystock-import/init.php:227
758
+ msgid "Medium"
759
+ msgstr ""
760
+
761
+ #: obfx_modules/mystock-import/init.php:228
762
+ msgid "Medium 640"
763
+ msgstr ""
764
+
765
+ #: obfx_modules/mystock-import/init.php:229
766
+ msgid "Medium 800"
767
+ msgstr ""
768
+
769
+ #: obfx_modules/mystock-import/init.php:230
770
+ msgid "Large"
771
+ msgstr ""
772
+
773
+ #: obfx_modules/mystock-import/init.php:231
774
+ msgid "Original"
775
+ msgstr ""
776
+
777
+ #: obfx_modules/mystock-import/init.php:239
778
+ msgid "Attachement display settings"
779
+ msgstr ""
780
+
781
+ #: obfx_modules/mystock-import/init.php:241
782
+ msgid "Size"
783
+ msgstr ""
784
+
785
+ #: obfx_modules/mystock-import/init.php:291
786
+ msgid "Fetching data"
787
+ msgstr ""
788
+
789
+ #: obfx_modules/mystock-import/init.php:292
790
+ msgid "Downloading image. Please wait..."
791
+ msgstr ""
792
+
793
+ #: obfx_modules/mystock-import/init.php:293
794
+ msgid "Your image was imported. Go to Media Library tab to use it."
795
+ msgstr ""
796
+
797
+ #: obfx_modules/mystock-import/init.php:294
798
+ msgid "Loading more photos..."
799
+ msgstr ""
800
+
801
+ #: obfx_modules/mystock-import/init.php:295
802
+ msgid "MyStock Library"
803
+ msgstr ""
804
+
805
  #: obfx_modules/social-sharing/init.php:30
806
  msgid "Social Sharing Module"
807
  msgstr ""
obfx_modules/companion-legacy/inc/hestia/inc/features/feature-clients-bar-section.php CHANGED
@@ -11,23 +11,38 @@ if ( ! function_exists( 'hestia_clients_bar_customize_register' ) ) :
11
  * Hook controls for Clients bar section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.47
15
  */
16
  function hestia_clients_bar_customize_register( $wp_customize ) {
17
 
18
- $selective_refresh = isset( $wp_customize->selective_refresh ) ? true : false;
19
- $wp_customize->add_section(
20
- 'hestia_clients_bar', array(
21
- 'title' => esc_html__( 'Clients Bar', 'themeisle-companion' ),
22
- 'panel' => 'hestia_frontpage_sections',
23
- 'priority' => apply_filters( 'hestia_section_priority', 50, 'hestia_clients_bar' ),
24
- )
25
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  $wp_customize->add_setting(
28
  'hestia_clients_bar_hide', array(
29
  'sanitize_callback' => 'hestia_sanitize_checkbox',
30
  'default' => true,
 
31
  )
32
  );
33
 
@@ -44,7 +59,7 @@ if ( ! function_exists( 'hestia_clients_bar_customize_register' ) ) :
44
  $wp_customize->add_setting(
45
  'hestia_clients_bar_content', array(
46
  'sanitize_callback' => 'hestia_repeater_sanitize',
47
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
48
  )
49
  );
50
 
@@ -78,6 +93,16 @@ function hestia_register_clients_bar_partials( $wp_customize ) {
78
  if ( ! isset( $wp_customize->selective_refresh ) ) {
79
  return;
80
  }
 
 
 
 
 
 
 
 
 
 
81
  $wp_customize->selective_refresh->add_partial(
82
  'hestia_clients_bar_content', array(
83
  'selector' => '.hestia-clients-bar',
11
  * Hook controls for Clients bar section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
+ * @modified 1.1.49
15
  */
16
  function hestia_clients_bar_customize_register( $wp_customize ) {
17
 
18
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
19
+
20
+ if ( class_exists( 'Hestia_Hiding_Section' ) ) {
21
+ $wp_customize->add_section(
22
+ new Hestia_Hiding_Section(
23
+ $wp_customize, 'hestia_clients_bar', array(
24
+ 'title' => esc_html__( 'Clients Bar', 'themeisle-companion' ),
25
+ 'panel' => 'hestia_frontpage_sections',
26
+ 'priority' => apply_filters( 'hestia_section_priority', 50, 'hestia_clients_bar' ),
27
+ 'hiding_control' => 'hestia_clients_bar_hide',
28
+ )
29
+ )
30
+ );
31
+ } else {
32
+ $wp_customize->add_section(
33
+ 'hestia_clients_bar', array(
34
+ 'title' => esc_html__( 'Clients Bar', 'themeisle-companion' ),
35
+ 'panel' => 'hestia_frontpage_sections',
36
+ 'priority' => apply_filters( 'hestia_section_priority', 50, 'hestia_clients_bar' ),
37
+ )
38
+ );
39
+ }
40
 
41
  $wp_customize->add_setting(
42
  'hestia_clients_bar_hide', array(
43
  'sanitize_callback' => 'hestia_sanitize_checkbox',
44
  'default' => true,
45
+ 'transport' => $selective_refresh,
46
  )
47
  );
48
 
59
  $wp_customize->add_setting(
60
  'hestia_clients_bar_content', array(
61
  'sanitize_callback' => 'hestia_repeater_sanitize',
62
+ 'transport' => $selective_refresh,
63
  )
64
  );
65
 
93
  if ( ! isset( $wp_customize->selective_refresh ) ) {
94
  return;
95
  }
96
+
97
+ $wp_customize->selective_refresh->add_partial(
98
+ 'hestia_clients_bar_hide', array(
99
+ 'selector' => '.hestia-clients-bar:not(.is-shortcode)',
100
+ 'container_inclusive' => true,
101
+ 'render_callback' => 'hestia_clients_bar',
102
+ 'fallback_refresh' => false,
103
+ )
104
+ );
105
+
106
  $wp_customize->selective_refresh->add_partial(
107
  'hestia_clients_bar_content', array(
108
  'selector' => '.hestia-clients-bar',
obfx_modules/companion-legacy/inc/hestia/inc/features/feature-features-section.php CHANGED
@@ -11,23 +11,38 @@ if ( ! function_exists( 'hestia_features_customize_register' ) ) :
11
  * Hook controls for Features section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.30
15
  */
16
  function hestia_features_customize_register( $wp_customize ) {
17
 
18
- $selective_refresh = isset( $wp_customize->selective_refresh ) ? true : false;
19
- $wp_customize->add_section(
20
- 'hestia_features', array(
21
- 'title' => esc_html__( 'Features', 'themeisle-companion' ),
22
- 'panel' => 'hestia_frontpage_sections',
23
- 'priority' => apply_filters( 'hestia_section_priority', 10, 'hestia_features' ),
24
- )
25
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  $wp_customize->add_setting(
28
  'hestia_features_hide', array(
29
  'sanitize_callback' => 'hestia_sanitize_checkbox',
30
  'default' => false,
 
31
  )
32
  );
33
 
@@ -43,7 +58,7 @@ if ( ! function_exists( 'hestia_features_customize_register' ) ) :
43
  $wp_customize->add_setting(
44
  'hestia_features_title', array(
45
  'sanitize_callback' => 'sanitize_text_field',
46
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
47
  )
48
  );
49
 
@@ -58,7 +73,7 @@ if ( ! function_exists( 'hestia_features_customize_register' ) ) :
58
  $wp_customize->add_setting(
59
  'hestia_features_subtitle', array(
60
  'sanitize_callback' => 'sanitize_text_field',
61
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
62
  )
63
  );
64
 
@@ -74,7 +89,7 @@ if ( ! function_exists( 'hestia_features_customize_register' ) ) :
74
  $wp_customize->add_setting(
75
  'hestia_features_content', array(
76
  'sanitize_callback' => 'hestia_repeater_sanitize',
77
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
78
  )
79
  );
80
 
@@ -115,11 +130,21 @@ function hestia_register_features_partials( $wp_customize ) {
115
  return;
116
  }
117
 
 
 
 
 
 
 
 
 
 
118
  $wp_customize->selective_refresh->add_partial(
119
  'hestia_features_title', array(
120
  'selector' => '.hestia-features h2.hestia-title',
121
  'settings' => 'hestia_features_title',
122
  'render_callback' => 'hestia_features_title_callback',
 
123
  )
124
  );
125
 
@@ -128,6 +153,7 @@ function hestia_register_features_partials( $wp_customize ) {
128
  'selector' => '.hestia-features h5.description',
129
  'settings' => 'hestia_features_subtitle',
130
  'render_callback' => 'hestia_features_subtitle_callback',
 
131
  )
132
  );
133
 
11
  * Hook controls for Features section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
+ * @modified 1.1.49
15
  */
16
  function hestia_features_customize_register( $wp_customize ) {
17
 
18
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
19
+
20
+ if ( class_exists( 'Hestia_Hiding_Section' ) ) {
21
+ $wp_customize->add_section(
22
+ new Hestia_Hiding_Section(
23
+ $wp_customize, 'hestia_features', array(
24
+ 'title' => esc_html__( 'Features', 'themeisle-companion' ),
25
+ 'panel' => 'hestia_frontpage_sections',
26
+ 'priority' => apply_filters( 'hestia_section_priority', 10, 'hestia_features' ),
27
+ 'hiding_control' => 'hestia_features_hide',
28
+ )
29
+ )
30
+ );
31
+ } else {
32
+ $wp_customize->add_section(
33
+ 'hestia_features', array(
34
+ 'title' => esc_html__( 'Features', 'themeisle-companion' ),
35
+ 'panel' => 'hestia_frontpage_sections',
36
+ 'priority' => apply_filters( 'hestia_section_priority', 10, 'hestia_features' ),
37
+ )
38
+ );
39
+ }
40
 
41
  $wp_customize->add_setting(
42
  'hestia_features_hide', array(
43
  'sanitize_callback' => 'hestia_sanitize_checkbox',
44
  'default' => false,
45
+ 'transport' => $selective_refresh,
46
  )
47
  );
48
 
58
  $wp_customize->add_setting(
59
  'hestia_features_title', array(
60
  'sanitize_callback' => 'sanitize_text_field',
61
+ 'transport' => $selective_refresh,
62
  )
63
  );
64
 
73
  $wp_customize->add_setting(
74
  'hestia_features_subtitle', array(
75
  'sanitize_callback' => 'sanitize_text_field',
76
+ 'transport' => $selective_refresh,
77
  )
78
  );
79
 
89
  $wp_customize->add_setting(
90
  'hestia_features_content', array(
91
  'sanitize_callback' => 'hestia_repeater_sanitize',
92
+ 'transport' => $selective_refresh,
93
  )
94
  );
95
 
130
  return;
131
  }
132
 
133
+ $wp_customize->selective_refresh->add_partial(
134
+ 'hestia_features_hide', array(
135
+ 'selector' => '.hestia-features:not(.is-shortcode)',
136
+ 'render_callback' => 'hestia_features',
137
+ 'container_inclusive' => true,
138
+ 'fallback_refresh' => false,
139
+ )
140
+ );
141
+
142
  $wp_customize->selective_refresh->add_partial(
143
  'hestia_features_title', array(
144
  'selector' => '.hestia-features h2.hestia-title',
145
  'settings' => 'hestia_features_title',
146
  'render_callback' => 'hestia_features_title_callback',
147
+ 'fallback_refresh' => false,
148
  )
149
  );
150
 
153
  'selector' => '.hestia-features h5.description',
154
  'settings' => 'hestia_features_subtitle',
155
  'render_callback' => 'hestia_features_subtitle_callback',
156
+ 'fallback_refresh' => false,
157
  )
158
  );
159
 
obfx_modules/companion-legacy/inc/hestia/inc/features/feature-ribbon-section.php CHANGED
@@ -14,22 +14,38 @@ if ( ! function_exists( 'hestia_ribbon_customize_register' ) ) :
14
  *
15
  * @param WP_Customize_Manager $wp_customize Customizer manager.
16
  * @since 1.1.47
 
17
  */
18
  function hestia_ribbon_customize_register( $wp_customize ) {
19
 
20
- $selective_refresh = isset( $wp_customize->selective_refresh ) ? true : false;
21
- $wp_customize->add_section(
22
- 'hestia_ribbon', array(
23
- 'title' => esc_html__( 'Ribbon', 'themeisle-companion' ),
24
- 'panel' => 'hestia_frontpage_sections',
25
- 'priority' => apply_filters( 'hestia_section_priority', 35, 'hestia_ribbon' ),
26
- )
27
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
29
  $wp_customize->add_setting(
30
  'hestia_ribbon_hide', array(
31
  'sanitize_callback' => 'hestia_sanitize_checkbox',
32
  'default' => true,
 
33
  )
34
  );
35
 
@@ -47,7 +63,7 @@ if ( ! function_exists( 'hestia_ribbon_customize_register' ) ) :
47
  'hestia_ribbon_background', array(
48
  'sanitize_callback' => 'esc_url_raw',
49
  'default' => $default,
50
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
51
  )
52
  );
53
 
@@ -66,7 +82,7 @@ if ( ! function_exists( 'hestia_ribbon_customize_register' ) ) :
66
  'hestia_ribbon_text', array(
67
  'sanitize_callback' => 'sanitize_text_field',
68
  'default' => $default,
69
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
70
  )
71
  );
72
 
@@ -84,7 +100,7 @@ if ( ! function_exists( 'hestia_ribbon_customize_register' ) ) :
84
  'hestia_ribbon_button_text', array(
85
  'sanitize_callback' => 'sanitize_text_field',
86
  'default' => $default,
87
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
88
  )
89
  );
90
 
@@ -100,7 +116,7 @@ if ( ! function_exists( 'hestia_ribbon_customize_register' ) ) :
100
  $wp_customize->add_setting(
101
  'hestia_ribbon_button_url', array(
102
  'sanitize_callback' => 'esc_url_raw',
103
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
104
  'default' => $default,
105
  )
106
  );
@@ -133,6 +149,15 @@ if ( ! function_exists( 'hestia_register_ribbon_partials' ) ) :
133
  return;
134
  }
135
 
 
 
 
 
 
 
 
 
 
136
  $wp_customize->selective_refresh->add_partial(
137
  'hestia_ribbon_background', array(
138
  'selector' => '.hestia-ribbon-style',
14
  *
15
  * @param WP_Customize_Manager $wp_customize Customizer manager.
16
  * @since 1.1.47
17
+ * @modified 1.1.49
18
  */
19
  function hestia_ribbon_customize_register( $wp_customize ) {
20
 
21
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
22
+
23
+ if ( class_exists( 'Hestia_Hiding_Section' ) ) {
24
+ $wp_customize->add_section(
25
+ new Hestia_Hiding_Section(
26
+ $wp_customize, 'hestia_ribbon', array(
27
+ 'title' => esc_html__( 'Ribbon', 'themeisle-companion' ),
28
+ 'panel' => 'hestia_frontpage_sections',
29
+ 'priority' => apply_filters( 'hestia_section_priority', 35, 'hestia_ribbon' ),
30
+ 'hiding_control' => 'hestia_ribbon_hide',
31
+ )
32
+ )
33
+ );
34
+ } else {
35
+ $wp_customize->add_section(
36
+ 'hestia_ribbon', array(
37
+ 'title' => esc_html__( 'Ribbon', 'themeisle-companion' ),
38
+ 'panel' => 'hestia_frontpage_sections',
39
+ 'priority' => apply_filters( 'hestia_section_priority', 35, 'hestia_ribbon' ),
40
+ )
41
+ );
42
+ }
43
 
44
  $wp_customize->add_setting(
45
  'hestia_ribbon_hide', array(
46
  'sanitize_callback' => 'hestia_sanitize_checkbox',
47
  'default' => true,
48
+ 'transport' => $selective_refresh,
49
  )
50
  );
51
 
63
  'hestia_ribbon_background', array(
64
  'sanitize_callback' => 'esc_url_raw',
65
  'default' => $default,
66
+ 'transport' => $selective_refresh,
67
  )
68
  );
69
 
82
  'hestia_ribbon_text', array(
83
  'sanitize_callback' => 'sanitize_text_field',
84
  'default' => $default,
85
+ 'transport' => $selective_refresh,
86
  )
87
  );
88
 
100
  'hestia_ribbon_button_text', array(
101
  'sanitize_callback' => 'sanitize_text_field',
102
  'default' => $default,
103
+ 'transport' => $selective_refresh,
104
  )
105
  );
106
 
116
  $wp_customize->add_setting(
117
  'hestia_ribbon_button_url', array(
118
  'sanitize_callback' => 'esc_url_raw',
119
+ 'transport' => $selective_refresh,
120
  'default' => $default,
121
  )
122
  );
149
  return;
150
  }
151
 
152
+ $wp_customize->selective_refresh->add_partial(
153
+ 'hestia_ribbon_hide', array(
154
+ 'selector' => '.hestia-ribbon:not(.is-shortcode)',
155
+ 'container_inclusive' => true,
156
+ 'render_callback' => 'hestia_ribbon',
157
+ 'fallback_refresh' => false,
158
+ )
159
+ );
160
+
161
  $wp_customize->selective_refresh->add_partial(
162
  'hestia_ribbon_background', array(
163
  'selector' => '.hestia-ribbon-style',
obfx_modules/companion-legacy/inc/hestia/inc/features/feature-team-section.php CHANGED
@@ -11,23 +11,38 @@ if ( ! function_exists( 'hestia_team_customize_register' ) ) :
11
  * Hook controls for Team section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.30
15
  */
16
  function hestia_team_customize_register( $wp_customize ) {
17
 
18
- $selective_refresh = isset( $wp_customize->selective_refresh ) ? true : false;
19
- $wp_customize->add_section(
20
- 'hestia_team', array(
21
- 'title' => esc_html__( 'Team', 'themeisle-companion' ),
22
- 'panel' => 'hestia_frontpage_sections',
23
- 'priority' => apply_filters( 'hestia_section_priority', 30, 'hestia_team' ),
24
- )
25
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  $wp_customize->add_setting(
28
  'hestia_team_hide', array(
29
  'sanitize_callback' => 'hestia_sanitize_checkbox',
30
  'default' => false,
 
31
  )
32
  );
33
 
@@ -43,7 +58,7 @@ if ( ! function_exists( 'hestia_team_customize_register' ) ) :
43
  $wp_customize->add_setting(
44
  'hestia_team_title', array(
45
  'sanitize_callback' => 'sanitize_text_field',
46
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
47
  )
48
  );
49
 
@@ -58,7 +73,7 @@ if ( ! function_exists( 'hestia_team_customize_register' ) ) :
58
  $wp_customize->add_setting(
59
  'hestia_team_subtitle', array(
60
  'sanitize_callback' => 'sanitize_text_field',
61
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
62
  )
63
  );
64
 
@@ -74,7 +89,7 @@ if ( ! function_exists( 'hestia_team_customize_register' ) ) :
74
  $wp_customize->add_setting(
75
  'hestia_team_content', array(
76
  'sanitize_callback' => 'hestia_repeater_sanitize',
77
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
78
  )
79
  );
80
 
@@ -116,11 +131,21 @@ function hestia_register_team_partials( $wp_customize ) {
116
  return;
117
  }
118
 
 
 
 
 
 
 
 
 
 
119
  $wp_customize->selective_refresh->add_partial(
120
  'hestia_team_title', array(
121
  'selector' => '#team h2.hestia-title',
122
  'settings' => 'hestia_team_title',
123
  'render_callback' => 'hestia_team_title_callback',
 
124
  )
125
  );
126
 
@@ -129,6 +154,7 @@ function hestia_register_team_partials( $wp_customize ) {
129
  'selector' => '#team h5.description',
130
  'settings' => 'hestia_team_subtitle',
131
  'render_callback' => 'hestia_team_subtitle_callback',
 
132
  )
133
  );
134
 
11
  * Hook controls for Team section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
+ * @modified 1.1.49
15
  */
16
  function hestia_team_customize_register( $wp_customize ) {
17
 
18
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
19
+
20
+ if ( class_exists( 'Hestia_Hiding_Section' ) ) {
21
+ $wp_customize->add_section(
22
+ new Hestia_Hiding_Section(
23
+ $wp_customize, 'hestia_team', array(
24
+ 'title' => esc_html__( 'Team', 'themeisle-companion' ),
25
+ 'panel' => 'hestia_frontpage_sections',
26
+ 'priority' => apply_filters( 'hestia_section_priority', 30, 'hestia_team' ),
27
+ 'hiding_control' => 'hestia_team_hide',
28
+ )
29
+ )
30
+ );
31
+ } else {
32
+ $wp_customize->add_section(
33
+ 'hestia_team', array(
34
+ 'title' => esc_html__( 'Team', 'themeisle-companion' ),
35
+ 'panel' => 'hestia_frontpage_sections',
36
+ 'priority' => apply_filters( 'hestia_section_priority', 30, 'hestia_team' ),
37
+ )
38
+ );
39
+ }
40
 
41
  $wp_customize->add_setting(
42
  'hestia_team_hide', array(
43
  'sanitize_callback' => 'hestia_sanitize_checkbox',
44
  'default' => false,
45
+ 'transport' => $selective_refresh,
46
  )
47
  );
48
 
58
  $wp_customize->add_setting(
59
  'hestia_team_title', array(
60
  'sanitize_callback' => 'sanitize_text_field',
61
+ 'transport' => $selective_refresh,
62
  )
63
  );
64
 
73
  $wp_customize->add_setting(
74
  'hestia_team_subtitle', array(
75
  'sanitize_callback' => 'sanitize_text_field',
76
+ 'transport' => $selective_refresh,
77
  )
78
  );
79
 
89
  $wp_customize->add_setting(
90
  'hestia_team_content', array(
91
  'sanitize_callback' => 'hestia_repeater_sanitize',
92
+ 'transport' => $selective_refresh,
93
  )
94
  );
95
 
131
  return;
132
  }
133
 
134
+ $wp_customize->selective_refresh->add_partial(
135
+ 'hestia_team_hide', array(
136
+ 'selector' => '.hestia-team:not(.is-shortcode)',
137
+ 'container_inclusive' => true,
138
+ 'render_callback' => 'hestia_team',
139
+ 'fallback_refresh' => false,
140
+ )
141
+ );
142
+
143
  $wp_customize->selective_refresh->add_partial(
144
  'hestia_team_title', array(
145
  'selector' => '#team h2.hestia-title',
146
  'settings' => 'hestia_team_title',
147
  'render_callback' => 'hestia_team_title_callback',
148
+ 'fallback_refresh' => false,
149
  )
150
  );
151
 
154
  'selector' => '#team h5.description',
155
  'settings' => 'hestia_team_subtitle',
156
  'render_callback' => 'hestia_team_subtitle_callback',
157
+ 'fallback_refresh' => false,
158
  )
159
  );
160
 
obfx_modules/companion-legacy/inc/hestia/inc/features/feature-testimonials-section.php CHANGED
@@ -11,23 +11,38 @@ if ( ! function_exists( 'hestia_testimonials_customize_register' ) ) :
11
  * Hook controls for Testimonials section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.30
15
  */
16
  function hestia_testimonials_customize_register( $wp_customize ) {
17
 
18
- $selective_refresh = isset( $wp_customize->selective_refresh ) ? true : false;
19
- $wp_customize->add_section(
20
- 'hestia_testimonials', array(
21
- 'title' => esc_html__( 'Testimonials', 'themeisle-companion' ),
22
- 'panel' => 'hestia_frontpage_sections',
23
- 'priority' => apply_filters( 'hestia_section_priority', 45, 'hestia_testimonials' ),
24
- )
25
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  $wp_customize->add_setting(
28
  'hestia_testimonials_hide', array(
29
  'sanitize_callback' => 'hestia_sanitize_checkbox',
30
  'default' => false,
 
31
  )
32
  );
33
 
@@ -43,7 +58,7 @@ if ( ! function_exists( 'hestia_testimonials_customize_register' ) ) :
43
  $wp_customize->add_setting(
44
  'hestia_testimonials_title', array(
45
  'sanitize_callback' => 'sanitize_text_field',
46
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
47
  )
48
  );
49
 
@@ -58,7 +73,7 @@ if ( ! function_exists( 'hestia_testimonials_customize_register' ) ) :
58
  $wp_customize->add_setting(
59
  'hestia_testimonials_subtitle', array(
60
  'sanitize_callback' => 'sanitize_text_field',
61
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
62
  )
63
  );
64
 
@@ -74,7 +89,7 @@ if ( ! function_exists( 'hestia_testimonials_customize_register' ) ) :
74
  $wp_customize->add_setting(
75
  'hestia_testimonials_content', array(
76
  'sanitize_callback' => 'hestia_repeater_sanitize',
77
- 'transport' => $selective_refresh ? 'postMessage' : 'refresh',
78
  )
79
  );
80
 
@@ -115,11 +130,21 @@ function hestia_register_testimonials_partials( $wp_customize ) {
115
  return;
116
  }
117
 
 
 
 
 
 
 
 
 
 
118
  $wp_customize->selective_refresh->add_partial(
119
  'hestia_testimonials_title', array(
120
  'selector' => '#testimonials h2.hestia-title',
121
  'settings' => 'hestia_testimonials_title',
122
  'render_callback' => 'hestia_testimonials_title_callback',
 
123
  )
124
  );
125
 
@@ -128,6 +153,7 @@ function hestia_register_testimonials_partials( $wp_customize ) {
128
  'selector' => '#testimonials h5.description',
129
  'settings' => 'hestia_testimonials_subtitle',
130
  'render_callback' => 'hestia_testimonials_subtitle_callback',
 
131
  )
132
  );
133
 
11
  * Hook controls for Testimonials section to Customizer.
12
  *
13
  * @since Hestia 1.0
14
+ * @modified 1.1.49
15
  */
16
  function hestia_testimonials_customize_register( $wp_customize ) {
17
 
18
+ $selective_refresh = isset( $wp_customize->selective_refresh ) ? 'postMessage' : 'refresh';
19
+
20
+ if ( class_exists( 'Hestia_Hiding_Section' ) ) {
21
+ $wp_customize->add_section(
22
+ new Hestia_Hiding_Section(
23
+ $wp_customize, 'hestia_testimonials', array(
24
+ 'title' => esc_html__( 'Testimonials', 'themeisle-companion' ),
25
+ 'panel' => 'hestia_frontpage_sections',
26
+ 'priority' => apply_filters( 'hestia_section_priority', 40, 'hestia_testimonials' ),
27
+ 'hiding_control' => 'hestia_testimonials_hide',
28
+ )
29
+ )
30
+ );
31
+ } else {
32
+ $wp_customize->add_section(
33
+ 'hestia_testimonials', array(
34
+ 'title' => esc_html__( 'Testimonials', 'themeisle-companion' ),
35
+ 'panel' => 'hestia_frontpage_sections',
36
+ 'priority' => apply_filters( 'hestia_section_priority', 45, 'hestia_testimonials' ),
37
+ )
38
+ );
39
+ }
40
 
41
  $wp_customize->add_setting(
42
  'hestia_testimonials_hide', array(
43
  'sanitize_callback' => 'hestia_sanitize_checkbox',
44
  'default' => false,
45
+ 'transport' => $selective_refresh,
46
  )
47
  );
48
 
58
  $wp_customize->add_setting(
59
  'hestia_testimonials_title', array(
60
  'sanitize_callback' => 'sanitize_text_field',
61
+ 'transport' => $selective_refresh,
62
  )
63
  );
64
 
73
  $wp_customize->add_setting(
74
  'hestia_testimonials_subtitle', array(
75
  'sanitize_callback' => 'sanitize_text_field',
76
+ 'transport' => $selective_refresh,
77
  )
78
  );
79
 
89
  $wp_customize->add_setting(
90
  'hestia_testimonials_content', array(
91
  'sanitize_callback' => 'hestia_repeater_sanitize',
92
+ 'transport' => $selective_refresh,
93
  )
94
  );
95
 
130
  return;
131
  }
132
 
133
+ $wp_customize->selective_refresh->add_partial(
134
+ 'hestia_testimonials_hide', array(
135
+ 'selector' => '.hestia-testimonials:not(.is-shortcode)',
136
+ 'render_callback' => 'hestia_testimonials',
137
+ 'container_inclusive' => true,
138
+ 'fallback_refresh' => false,
139
+ )
140
+ );
141
+
142
  $wp_customize->selective_refresh->add_partial(
143
  'hestia_testimonials_title', array(
144
  'selector' => '#testimonials h2.hestia-title',
145
  'settings' => 'hestia_testimonials_title',
146
  'render_callback' => 'hestia_testimonials_title_callback',
147
+ 'fallback_refresh' => false,
148
  )
149
  );
150
 
153
  'selector' => '#testimonials h5.description',
154
  'settings' => 'hestia_testimonials_subtitle',
155
  'render_callback' => 'hestia_testimonials_subtitle_callback',
156
+ 'fallback_refresh' => false,
157
  )
158
  );
159
 
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-clients-bar-section.php CHANGED
@@ -10,22 +10,36 @@ if ( ! function_exists( 'hestia_clients_bar' ) ) :
10
 
11
  /**
12
  * Clients bar section content.
 
 
 
13
  *
14
  * @since Hestia 1.1.47
 
15
  */
16
- function hestia_clients_bar() {
17
- $hestia_clients_bar_hide = get_theme_mod( 'hestia_clients_bar_hide', true );
18
- $hestia_clients_bar_content = get_theme_mod( 'hestia_clients_bar_content' );
19
- if ( (bool) $hestia_clients_bar_hide === true || empty( $hestia_clients_bar_content ) ) {
20
- return;
21
  }
22
 
 
 
23
  $hestia_clients_bar_content_decoded = json_decode( $hestia_clients_bar_content );
24
- if ( empty( $hestia_clients_bar_content_decoded ) ) {
 
 
 
 
 
25
  return;
26
  }
 
 
 
27
  ?>
28
- <section class="hestia-clients-bar text-center">
29
  <div class="container">
30
  <div class="row">
31
  <?php
@@ -44,7 +58,12 @@ if ( ! function_exists( 'hestia_clients_bar' ) ) :
44
  if ( ! empty( $image ) ) {
45
  echo '<div class="col-md-3">';
46
  if ( ! empty( $link ) ) {
47
- echo '<a href="' . esc_url( $link ) . '">';
 
 
 
 
 
48
  }
49
  echo '<img src="' . esc_url( $image ) . '" ' . wp_kses_post( $alt_text ) . '>';
50
  if ( ! empty( $link ) ) {
10
 
11
  /**
12
  * Clients bar section content.
13
+ * This function can be called from a shortcode too.
14
+ * When it's called as shortcode, the title and the subtitle shouldn't appear and it should be visible all the time,
15
+ * it shouldn't matter if is disable on front page.
16
  *
17
  * @since Hestia 1.1.47
18
+ * @modified 1.1.51
19
  */
20
+ function hestia_clients_bar( $is_shortcode = false ) {
21
+
22
+ // When this function is called from selective refresh, $is_shortcode gets the value of WP_Customize_Selective_Refresh object. We don't need that.
23
+ if ( ! is_bool( $is_shortcode ) ) {
24
+ $is_shortcode = false;
25
  }
26
 
27
+ $hide_section = get_theme_mod( 'hestia_clients_bar_hide', true );
28
+ $hestia_clients_bar_content = get_theme_mod( 'hestia_clients_bar_content' );
29
  $hestia_clients_bar_content_decoded = json_decode( $hestia_clients_bar_content );
30
+
31
+ /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
32
+ if ( $is_shortcode === false && ( empty( $hestia_clients_bar_content ) || (bool) $hide_section === true ) || empty( $hestia_clients_bar_content_decoded ) ) {
33
+ if ( is_customize_preview() ) {
34
+ echo '<section class="hestia-clients-bar text-center" data-sorder="hestia_clients_bar" style="display: none"></section>';
35
+ }
36
  return;
37
  }
38
+
39
+ $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
40
+
41
  ?>
42
+ <section class="hestia-clients-bar text-center <?php echo esc_attr( $wrapper_class ); ?>" data-sorder="hestia_clients_bar">
43
  <div class="container">
44
  <div class="row">
45
  <?php
58
  if ( ! empty( $image ) ) {
59
  echo '<div class="col-md-3">';
60
  if ( ! empty( $link ) ) {
61
+ $link_html = '<a href="' . esc_url( $link ) . '"';
62
+ if ( function_exists( 'hestia_is_external_url' ) ) {
63
+ $link_html .= hestia_is_external_url( $link );
64
+ }
65
+ $link_html .= '>';
66
+ echo wp_kses_post( $link_html );
67
  }
68
  echo '<img src="' . esc_url( $image ) . '" ' . wp_kses_post( $alt_text ) . '>';
69
  if ( ! empty( $link ) ) {
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-features-section.php CHANGED
@@ -7,63 +7,72 @@
7
  */
8
 
9
  if ( ! function_exists( 'hestia_features' ) ) :
 
10
  /**
11
  * Features section content.
 
 
 
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.34
15
  */
16
  function hestia_features( $is_shortcode = false ) {
17
- $hide_section = get_theme_mod( 'hestia_features_hide', false );
18
-
19
- $default_title = false;
20
- $default_subtitle = false;
21
- $default_content = false;
22
 
23
- if ( current_user_can( 'edit_theme_options' ) ) {
24
- $default_title = esc_html__( 'Why our product is the best', 'themeisle-companion' );
25
- $default_subtitle = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
26
- $default_content = hestia_get_features_default();
27
  }
28
 
 
 
 
 
29
  $hestia_features_title = get_theme_mod( 'hestia_features_title', $default_title );
30
  $hestia_features_subtitle = get_theme_mod( 'hestia_features_subtitle', $default_subtitle );
31
- if ( $is_shortcode ) {
32
- $hestia_features_title = '';
33
- $hestia_features_subtitle = '';
34
- }
35
  $hestia_features_content = get_theme_mod( 'hestia_features_content', $default_content );
 
36
 
37
- if ( ! $is_shortcode && ( is_front_page() && ( (bool) $hide_section === true ) ) || ((empty( $hestia_features_title )) && (empty( $hestia_features_subtitle )) && (empty( $hestia_features_content ))) ) {
 
 
 
 
38
  return;
39
  }
40
 
41
- $class_to_add = 'container';
42
- if ( $is_shortcode ) {
43
- $class_to_add = '';
44
- }
45
 
46
  hestia_before_features_section_trigger();
47
  ?>
48
- <section class="features hestia-features" id="features" data-sorder="hestia_features">
49
  <?php hestia_before_features_section_content_trigger(); ?>
50
- <div class="<?php echo esc_attr( $class_to_add ); ?>">
51
- <?php hestia_top_features_section_content_trigger(); ?>
52
- <div class="row">
53
- <div class="col-md-8 col-md-offset-2">
54
- <?php if ( ! empty( $hestia_features_title ) || is_customize_preview() ) : ?>
55
- <h2 class="hestia-title"><?php echo esc_html( $hestia_features_title ); ?></h2>
56
- <?php endif; ?>
57
- <?php if ( ! empty( $hestia_features_subtitle ) || is_customize_preview() ) : ?>
58
- <h5 class="description"><?php echo esc_html( $hestia_features_subtitle ); ?></h5>
59
- <?php endif; ?>
60
- </div>
61
- </div>
62
- <?php hestia_features_content( $hestia_features_content ); ?>
 
 
 
 
 
 
 
 
63
  <?php hestia_bottom_features_section_content_trigger(); ?>
64
- </div>
65
  <?php hestia_after_features_section_content_trigger(); ?>
66
- </section>
67
  <?php
68
  hestia_after_features_section_trigger();
69
  }
@@ -80,8 +89,8 @@ endif;
80
  */
81
  function hestia_features_content( $hestia_features_content, $is_callback = false ) {
82
  if ( ! $is_callback ) {
83
- ?>
84
- <div class="hestia-features-content">
85
  <?php
86
  }
87
  if ( ! empty( $hestia_features_content ) ) :
@@ -99,47 +108,52 @@ function hestia_features_content( $hestia_features_content, $is_callback = false
99
  $color = ! empty( $features_item->color ) ? $features_item->color : '';
100
  $choice = ! empty( $features_item->choice ) ? $features_item->choice : 'customizer_repeater_icon';
101
  ?>
102
- <div class="col-md-4 feature-box">
103
- <div class="info hestia-info">
104
- <?php if ( ! empty( $link ) ) : ?>
105
- <a href="<?php echo esc_url( $link ); ?>">
106
- <?php
107
- endif;
 
 
 
 
 
108
 
109
- switch ( $choice ) {
110
- case 'customizer_repeater_image':
111
- if ( ! empty( $image ) ) {
112
- ?>
113
- <div class="card card-plain">
114
- <img src="<?php echo esc_url( $image ); ?>"/>
115
- </div>
116
  <?php
117
- }
118
- break;
119
- case 'customizer_repeater_icon':
120
- if ( ! empty( $icon ) ) {
121
- ?>
122
- <div class="icon" <?php echo ( ! empty( $color ) ? 'style="color:' . $color . '"' : '' ); ?>>
123
- <i class="fa <?php echo esc_html( $icon ); ?>"></i>
124
- </div>
125
  <?php
126
- }
127
- break;
128
- }
129
  ?>
130
  <?php if ( ! empty( $title ) ) : ?>
131
- <h4 class="info-title"><?php echo esc_html( $title ); ?></h4>
132
  <?php endif; ?>
133
  <?php if ( ! empty( $link ) ) : ?>
134
- </a>
135
  <?php endif; ?>
136
- <?php if ( ! empty( $text ) ) : ?>
137
- <p><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
138
  <?php endif; ?>
139
- </div>
140
- </div>
141
  <?php
142
- if ( $i % 3 == 0 ) {
143
  echo '</div><!-- /.row -->';
144
  echo '<div class="row">';
145
  }
@@ -148,10 +162,10 @@ function hestia_features_content( $hestia_features_content, $is_callback = false
148
  endforeach;
149
  echo '</div>';
150
  }// End if().
151
- endif;
152
  if ( ! $is_callback ) {
153
- ?>
154
- </div>
155
  <?php
156
  }
157
  }
7
  */
8
 
9
  if ( ! function_exists( 'hestia_features' ) ) :
10
+
11
  /**
12
  * Features section content.
13
+ * This function can be called from a shortcode too.
14
+ * When it's called as shortcode, the title and the subtitle shouldn't appear and it should be visible all the time,
15
+ * it shouldn't matter if is disable on front page.
16
  *
17
  * @since Hestia 1.0
18
+ * @modified 1.1.51
19
  */
20
  function hestia_features( $is_shortcode = false ) {
 
 
 
 
 
21
 
22
+ // When this function is called from selective refresh, $is_shortcode gets the value of WP_Customize_Selective_Refresh object. We don't need that.
23
+ if ( ! is_bool( $is_shortcode ) ) {
24
+ $is_shortcode = false;
 
25
  }
26
 
27
+ $hide_section = get_theme_mod( 'hestia_features_hide', false );
28
+ $default_title = current_user_can( 'edit_theme_options' ) ? esc_html__( 'Why our product is the best', 'themeisle-companion' ) : false;
29
+ $default_subtitle = current_user_can( 'edit_theme_options' ) ? esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' ) : false;
30
+ $default_content = current_user_can( 'edit_theme_options' ) ? hestia_get_features_default() : false;
31
  $hestia_features_title = get_theme_mod( 'hestia_features_title', $default_title );
32
  $hestia_features_subtitle = get_theme_mod( 'hestia_features_subtitle', $default_subtitle );
 
 
 
 
33
  $hestia_features_content = get_theme_mod( 'hestia_features_content', $default_content );
34
+ $section_is_empty = empty( $hestia_features_content ) && empty( $hestia_features_subtitle ) && empty( $hestia_features_title );
35
 
36
+ /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
37
+ if ( $is_shortcode === false && ( $section_is_empty || (bool) $hide_section === true ) ) {
38
+ if ( is_customize_preview() ) {
39
+ echo '<section class="hestia-features" id="features" data-sorder="hestia_features" style="display: none"></section>';
40
+ }
41
  return;
42
  }
43
 
44
+ $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
45
+ $container_class = $is_shortcode === true ? '' : 'container';
 
 
46
 
47
  hestia_before_features_section_trigger();
48
  ?>
49
+ <section class="hestia-features <?php echo esc_attr( $wrapper_class ); ?>" id="features" data-sorder="hestia_features">
50
  <?php hestia_before_features_section_content_trigger(); ?>
51
+ <div class="<?php echo esc_attr( $container_class ); ?>">
52
+ <?php
53
+ hestia_top_features_section_content_trigger();
54
+ if ( $is_shortcode === false ) {
55
+ ?>
56
+ <div class="row">
57
+ <div class="col-md-8 col-md-offset-2">
58
+ <?php
59
+ if ( ! empty( $hestia_features_title ) || is_customize_preview() ) {
60
+ echo '<h2 class="hestia-title">' . esc_html( $hestia_features_title ) . '</h2>';
61
+ }
62
+ if ( ! empty( $hestia_features_subtitle ) || is_customize_preview() ) {
63
+ echo '<h5 class="description">' . esc_html( $hestia_features_subtitle ) . '</h5>';
64
+ }
65
+ ?>
66
+ </div>
67
+ </div>
68
+ <?php
69
+ }
70
+ hestia_features_content( $hestia_features_content );
71
+ ?>
72
  <?php hestia_bottom_features_section_content_trigger(); ?>
73
+ </div>
74
  <?php hestia_after_features_section_content_trigger(); ?>
75
+ </section>
76
  <?php
77
  hestia_after_features_section_trigger();
78
  }
89
  */
90
  function hestia_features_content( $hestia_features_content, $is_callback = false ) {
91
  if ( ! $is_callback ) {
92
+ ?>
93
+ <div class="hestia-features-content">
94
  <?php
95
  }
96
  if ( ! empty( $hestia_features_content ) ) :
108
  $color = ! empty( $features_item->color ) ? $features_item->color : '';
109
  $choice = ! empty( $features_item->choice ) ? $features_item->choice : 'customizer_repeater_icon';
110
  ?>
111
+ <div class="<?php echo apply_filters( 'hestia_features_per_row_class','col-md-4' ); ?> feature-box">
112
+ <div class="hestia-info">
113
+ <?php
114
+ if ( ! empty( $link ) ) {
115
+ $link_html = '<a href="' . esc_url( $link ) . '"';
116
+ if ( function_exists( 'hestia_is_external_url' ) ) {
117
+ $link_html .= hestia_is_external_url( $link );
118
+ }
119
+ $link_html .= '>';
120
+ echo wp_kses_post( $link_html );
121
+ }
122
 
123
+ switch ( $choice ) {
124
+ case 'customizer_repeater_image':
125
+ if ( ! empty( $image ) ) {
126
+ ?>
127
+ <div class="card card-plain">
128
+ <img src="<?php echo esc_url( $image ); ?>"/>
129
+ </div>
130
  <?php
131
+ }
132
+ break;
133
+ case 'customizer_repeater_icon':
134
+ if ( ! empty( $icon ) ) {
135
+ ?>
136
+ <div class="icon" <?php echo ( ! empty( $color ) ? 'style="color:' . $color . '"' : '' ); ?>>
137
+ <i class="fa <?php echo esc_html( $icon ); ?>"></i>
138
+ </div>
139
  <?php
140
+ }
141
+ break;
142
+ }
143
  ?>
144
  <?php if ( ! empty( $title ) ) : ?>
145
+ <h4 class="info-title"><?php echo esc_html( $title ); ?></h4>
146
  <?php endif; ?>
147
  <?php if ( ! empty( $link ) ) : ?>
148
+ </a>
149
  <?php endif; ?>
150
+ <?php if ( ! empty( $text ) ) : ?>
151
+ <p><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
152
  <?php endif; ?>
153
+ </div>
154
+ </div>
155
  <?php
156
+ if ( $i % apply_filters( 'hestia_features_per_row_no', 3 ) == 0 ) {
157
  echo '</div><!-- /.row -->';
158
  echo '<div class="row">';
159
  }
162
  endforeach;
163
  echo '</div>';
164
  }// End if().
165
+ endif;
166
  if ( ! $is_callback ) {
167
+ ?>
168
+ </div>
169
  <?php
170
  }
171
  }
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-ribbon-section.php CHANGED
@@ -10,13 +10,26 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
10
 
11
  /**
12
  * Ribbon section content.
 
 
 
13
  *
14
  * @since 1.1.47
 
15
  */
16
- function hestia_ribbon() {
17
 
 
 
 
 
 
 
18
  $hestia_ribbon_hide = get_theme_mod( 'hestia_ribbon_hide', true );
19
- if ( (bool) $hestia_ribbon_hide === true ) {
 
 
 
20
  return;
21
  }
22
  $default = ( current_user_can( 'edit_theme_options' ) ? esc_html__( 'Subscribe to our Newsletter', 'themeisle-companion' ) : false );
@@ -27,8 +40,10 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
27
 
28
  $default = ( current_user_can( 'edit_theme_options' ) ? '#' : false );
29
  $hestia_ribbon_button_url = get_theme_mod( 'hestia_ribbon_button_url', $default );
 
 
30
  ?>
31
- <section class="hestia-ribbon section section-image" >
32
  <?php hestia_ribbon_background(); ?>
33
  <div class="container">
34
  <div class="row hestia-xs-text-center hestia-like-table">
@@ -42,12 +57,19 @@ if ( ! function_exists( 'hestia_ribbon' ) ) :
42
  ?>
43
  </div>
44
  <div class="col-md-4 text-center">
45
- <?php if ( ! empty( $hestia_ribbon_button_text ) && ! empty( $hestia_ribbon_button_url ) ) { ?>
46
- <a href="<?php echo esc_url( $hestia_ribbon_button_url ); ?>" class="btn btn-md btn-primary hestia-subscribe-button">
47
- <?php echo wp_kses_post( $hestia_ribbon_button_text ); ?>
48
- </a>
49
- <?php
50
- }
 
 
 
 
 
 
 
51
  ?>
52
  </div>
53
  </div>
10
 
11
  /**
12
  * Ribbon section content.
13
+ * This function can be called from a shortcode too.
14
+ * When it's called as shortcode, the title and the subtitle shouldn't appear and it should be visible all the time,
15
+ * it shouldn't matter if is disable on front page.
16
  *
17
  * @since 1.1.47
18
+ * @modified 1.1.51
19
  */
20
+ function hestia_ribbon( $is_shortcode = false ) {
21
 
22
+ // When this function is called from selective refresh, $is_shortcode gets the value of WP_Customize_Selective_Refresh object. We don't need that.
23
+ if ( ! is_bool( $is_shortcode ) ) {
24
+ $is_shortcode = false;
25
+ }
26
+
27
+ /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
28
  $hestia_ribbon_hide = get_theme_mod( 'hestia_ribbon_hide', true );
29
+ if ( $is_shortcode === false && (bool) $hestia_ribbon_hide === true ) {
30
+ if ( is_customize_preview() ) {
31
+ echo '<section class="hestia-ribbon section section-image" data-sorder="hestia_ribbon" style="display: none"></section>';
32
+ }
33
  return;
34
  }
35
  $default = ( current_user_can( 'edit_theme_options' ) ? esc_html__( 'Subscribe to our Newsletter', 'themeisle-companion' ) : false );
40
 
41
  $default = ( current_user_can( 'edit_theme_options' ) ? '#' : false );
42
  $hestia_ribbon_button_url = get_theme_mod( 'hestia_ribbon_button_url', $default );
43
+
44
+ $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
45
  ?>
46
+ <section class="hestia-ribbon section section-image <?php echo esc_attr( $wrapper_class ); ?>" data-sorder="hestia_ribbon">
47
  <?php hestia_ribbon_background(); ?>
48
  <div class="container">
49
  <div class="row hestia-xs-text-center hestia-like-table">
57
  ?>
58
  </div>
59
  <div class="col-md-4 text-center">
60
+ <?php
61
+
62
+ if ( ! empty( $hestia_ribbon_button_text ) && ! empty( $hestia_ribbon_button_url ) ) {
63
+
64
+ $link_html = '<a href="' . esc_url( $hestia_ribbon_button_url ) . '"';
65
+ if ( function_exists( 'hestia_is_external_url' ) ) {
66
+ $link_html .= hestia_is_external_url( $hestia_ribbon_button_url );
67
+ }
68
+ $link_html .= ' class="btn btn-md btn-primary hestia-subscribe-button">';
69
+ $link_html .= wp_kses_post( $hestia_ribbon_button_text );
70
+ $link_html .= '</a>';
71
+ echo wp_kses_post( $link_html );
72
+ }
73
  ?>
74
  </div>
75
  </div>
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-team-section.php CHANGED
@@ -9,18 +9,25 @@
9
  if ( ! function_exists( 'hestia_team' ) ) :
10
  /**
11
  * Team section content.
 
 
 
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.34
15
  */
16
  function hestia_team( $is_shortcode = false ) {
17
 
 
 
 
 
 
18
  $default_title = false;
19
  $default_subtitle = false;
20
  $default_content = false;
21
 
22
  if ( current_user_can( 'edit_theme_options' ) ) {
23
-
24
  $default_title = esc_html__( 'Meet our team', 'themeisle-companion' );
25
  $default_subtitle = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
26
  $default_content = hestia_get_team_default();
@@ -28,42 +35,51 @@ if ( ! function_exists( 'hestia_team' ) ) :
28
 
29
  $hestia_team_title = get_theme_mod( 'hestia_team_title', $default_title );
30
  $hestia_team_subtitle = get_theme_mod( 'hestia_team_subtitle', $default_subtitle );
31
- if ( $is_shortcode ) {
32
- $hestia_team_title = '';
33
- $hestia_team_subtitle = '';
34
- }
35
  $hestia_team_content = get_theme_mod( 'hestia_team_content', $default_content );
 
36
 
37
  $hide_section = get_theme_mod( 'hestia_team_hide', false );
38
- if ( ! $is_shortcode && ( (bool) $hide_section === true ) || ( empty( $hestia_team_title ) && empty( $hestia_team_subtitle ) && empty( $hestia_team_content ) ) ) {
 
 
 
 
 
39
  return;
40
  }
41
 
42
- $class_to_add = 'container';
43
- if ( $is_shortcode ) {
44
- $class_to_add = '';
45
- }
46
  hestia_before_team_section_trigger();
47
  ?>
48
- <section class="team hestia-team" id="team" data-sorder="hestia_team">
49
  <?php hestia_before_team_section_content_trigger(); ?>
50
- <div class="<?php echo esc_attr( $class_to_add ); ?>">
51
- <?php hestia_top_team_section_content_trigger(); ?>
52
- <div class="row">
53
- <div class="col-md-8 col-md-offset-2 text-center">
54
- <?php if ( ! empty( $hestia_team_title ) || is_customize_preview() ) : ?>
55
- <h2 class="hestia-title"><?php echo esc_html( $hestia_team_title ); ?></h2>
56
- <?php endif; ?>
57
- <?php if ( ! empty( $hestia_team_subtitle ) || is_customize_preview() ) : ?>
58
- <h5 class="description"><?php echo esc_html( $hestia_team_subtitle ); ?></h5>
59
- <?php endif; ?>
60
- </div>
61
- </div>
62
- <?php hestia_team_content( $hestia_team_content ); ?>
63
- <?php hestia_bottom_team_section_content_trigger(); ?>
64
- </div>
 
 
 
 
 
 
 
 
65
  <?php hestia_after_team_section_content_trigger(); ?>
66
- </section>
67
  <?php
68
  hestia_after_team_section_trigger();
69
  }
@@ -80,100 +96,107 @@ endif;
80
  */
81
  function hestia_team_content( $hestia_team_content, $is_callback = false ) {
82
  if ( ! $is_callback ) {
83
- ?>
84
- <div class="hestia-team-content">
85
  <?php
86
  }
87
  ?>
88
- <?php
89
- if ( ! empty( $hestia_team_content ) ) :
90
- $hestia_team_content = json_decode( $hestia_team_content );
91
 
92
- if ( ! empty( $hestia_team_content ) ) {
93
 
94
- $i = 1;
95
- echo '<div class="row">';
96
- foreach ( $hestia_team_content as $team_item ) :
97
- $image = ! empty( $team_item->image_url ) ? apply_filters( 'hestia_translate_single_string', $team_item->image_url, 'Team section' ) : '';
98
- $title = ! empty( $team_item->title ) ? apply_filters( 'hestia_translate_single_string', $team_item->title, 'Team section' ) : '';
99
- $subtitle = ! empty( $team_item->subtitle ) ? apply_filters( 'hestia_translate_single_string', $team_item->subtitle, 'Team section' ) : '';
100
- $text = ! empty( $team_item->text ) ? apply_filters( 'hestia_translate_single_string', $team_item->text, 'Team section' ) : '';
101
- $link = ! empty( $team_item->link ) ? apply_filters( 'hestia_translate_single_string', $team_item->link, 'Team section' ) : '';
102
- ?>
103
- <div class="col-md-6">
104
- <div class="card card-profile card-plain">
105
- <div class="col-md-5">
106
- <div class="card-image">
107
- <?php if ( ! empty( $image ) ) : ?>
108
- <?php if ( ! empty( $link ) ) : ?>
109
- <a href="<?php echo esc_url( $link ); ?>">
110
- <?php endif; ?>
111
- <img class="img"
112
- src="<?php echo esc_url( $image ); ?>"
113
  <?php
114
- if ( ! empty( $title ) ) :
115
- ?>
116
- alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
117
- <?php if ( ! empty( $link ) ) : ?>
118
- </a>
119
- <?php endif; ?>
120
- <?php endif; ?>
121
- </div>
122
- </div>
123
- <div class="col-md-7">
124
- <div class="content">
125
- <?php if ( ! empty( $title ) ) : ?>
126
- <h4 class="card-title"><?php echo esc_html( $title ); ?></h4>
127
- <?php endif; ?>
128
- <?php if ( ! empty( $subtitle ) ) : ?>
129
- <h6 class="category text-muted"><?php echo esc_html( $subtitle ); ?></h6>
130
- <?php endif; ?>
131
- <?php if ( ! empty( $text ) ) : ?>
132
- <p class="card-description"><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
133
- <?php endif; ?>
134
- <?php
135
- if ( ! empty( $team_item->social_repeater ) ) :
136
- $icons = html_entity_decode( $team_item->social_repeater );
137
- $icons_decoded = json_decode( $icons, true );
138
- if ( ! empty( $icons_decoded ) ) :
139
  ?>
140
- <div class="footer">
 
141
  <?php
142
- foreach ( $icons_decoded as $value ) :
143
- $social_icon = ! empty( $value['icon'] ) ? apply_filters( 'hestia_translate_single_string', $value['icon'], 'Team section' ) : '';
144
- $social_link = ! empty( $value['link'] ) ? apply_filters( 'hestia_translate_single_string', $value['link'], 'Team section' ) : '';
145
  ?>
146
- <?php if ( ! empty( $social_icon ) ) : ?>
147
- <a href="<?php echo esc_url( $social_link ); ?>"
148
- class="btn btn-just-icon btn-simple">
149
- <i class="fa <?php echo esc_attr( $social_icon ); ?>"></i>
150
- </a>
151
- <?php endif; ?>
152
- <?php endforeach; ?>
153
- </div>
154
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
155
  endif;
156
- endif;
157
- ?>
158
- </div>
159
- </div>
160
- </div>
161
- </div>
162
- <?php
163
- if ( $i % 2 == 0 ) {
164
- echo '</div><!-- /.row -->';
165
- echo '<div class="row">';
166
- }
167
- $i++;
168
- endforeach;
169
- echo '</div>';
170
- }// End if().
171
- endif;
172
- if ( ! $is_callback ) {
173
  ?>
174
- </div>
175
- <?php
176
- }
177
 
178
  }
179
 
9
  if ( ! function_exists( 'hestia_team' ) ) :
10
  /**
11
  * Team section content.
12
+ * This function can be called from a shortcode too.
13
+ * When it's called as shortcode, the title and the subtitle shouldn't appear and it should be visible all the time,
14
+ * it shouldn't matter if is disable on front page.
15
  *
16
  * @since Hestia 1.0
17
+ * @modified 1.1.51
18
  */
19
  function hestia_team( $is_shortcode = false ) {
20
 
21
+ // When this function is called from selective refresh, $is_shortcode gets the value of WP_Customize_Selective_Refresh object. We don't need that.
22
+ if ( ! is_bool( $is_shortcode ) ) {
23
+ $is_shortcode = false;
24
+ }
25
+
26
  $default_title = false;
27
  $default_subtitle = false;
28
  $default_content = false;
29
 
30
  if ( current_user_can( 'edit_theme_options' ) ) {
 
31
  $default_title = esc_html__( 'Meet our team', 'themeisle-companion' );
32
  $default_subtitle = esc_html__( 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'themeisle-companion' );
33
  $default_content = hestia_get_team_default();
35
 
36
  $hestia_team_title = get_theme_mod( 'hestia_team_title', $default_title );
37
  $hestia_team_subtitle = get_theme_mod( 'hestia_team_subtitle', $default_subtitle );
 
 
 
 
38
  $hestia_team_content = get_theme_mod( 'hestia_team_content', $default_content );
39
+ $section_is_empty = empty( $hestia_team_title ) && empty( $hestia_team_subtitle ) && empty( $hestia_team_content );
40
 
41
  $hide_section = get_theme_mod( 'hestia_team_hide', false );
42
+
43
+ /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
44
+ if ( ( $is_shortcode === false ) && ( $section_is_empty || (bool) $hide_section === true ) ) {
45
+ if ( is_customize_preview() ) {
46
+ echo '<section class="hestia-team" id="team" data-sorder="hestia_team" style="display: none"></section>';
47
+ }
48
  return;
49
  }
50
 
51
+ $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
52
+ $container_class = $is_shortcode === true ? '' : 'container';
53
+
 
54
  hestia_before_team_section_trigger();
55
  ?>
56
+ <section class="hestia-team <?php echo esc_attr( $wrapper_class ); ?>" id="team" data-sorder="hestia_team">
57
  <?php hestia_before_team_section_content_trigger(); ?>
58
+ <div class="<?php echo esc_attr( $container_class ); ?>">
59
+ <?php
60
+ hestia_top_team_section_content_trigger();
61
+ if ( $is_shortcode === false ) {
62
+ ?>
63
+ <div class="row">
64
+ <div class="col-md-8 col-md-offset-2 text-center">
65
+ <?php
66
+ if ( ! empty( $hestia_team_title ) || is_customize_preview() ) {
67
+ echo '<h2 class="hestia-title">' . esc_html( $hestia_team_title ) . '</h2>';
68
+ }
69
+ if ( ! empty( $hestia_team_subtitle ) || is_customize_preview() ) {
70
+ echo '<h5 class="description">' . esc_html( $hestia_team_subtitle ) . '</h5>';
71
+ }
72
+ ?>
73
+ </div>
74
+ </div>
75
+ <?php
76
+ }
77
+ hestia_team_content( $hestia_team_content );
78
+ hestia_bottom_team_section_content_trigger();
79
+ ?>
80
+ </div>
81
  <?php hestia_after_team_section_content_trigger(); ?>
82
+ </section>
83
  <?php
84
  hestia_after_team_section_trigger();
85
  }
96
  */
97
  function hestia_team_content( $hestia_team_content, $is_callback = false ) {
98
  if ( ! $is_callback ) {
99
+ ?>
100
+ <div class="hestia-team-content">
101
  <?php
102
  }
103
  ?>
104
+ <?php
105
+ if ( ! empty( $hestia_team_content ) ) :
106
+ $hestia_team_content = json_decode( $hestia_team_content );
107
 
108
+ if ( ! empty( $hestia_team_content ) ) {
109
 
110
+ $i = 1;
111
+ echo '<div class="row">';
112
+ foreach ( $hestia_team_content as $team_item ) :
113
+ $image = ! empty( $team_item->image_url ) ? apply_filters( 'hestia_translate_single_string', $team_item->image_url, 'Team section' ) : '';
114
+ $title = ! empty( $team_item->title ) ? apply_filters( 'hestia_translate_single_string', $team_item->title, 'Team section' ) : '';
115
+ $subtitle = ! empty( $team_item->subtitle ) ? apply_filters( 'hestia_translate_single_string', $team_item->subtitle, 'Team section' ) : '';
116
+ $text = ! empty( $team_item->text ) ? apply_filters( 'hestia_translate_single_string', $team_item->text, 'Team section' ) : '';
117
+ $link = ! empty( $team_item->link ) ? apply_filters( 'hestia_translate_single_string', $team_item->link, 'Team section' ) : '';
118
+ ?>
119
+ <div class="col-xs-12 col-ms-6 col-sm-6">
120
+ <div class="card card-profile card-plain">
121
+ <div class="col-md-5">
122
+ <div class="card-image">
123
+ <?php if ( ! empty( $image ) ) : ?>
 
 
 
 
 
124
  <?php
125
+ if ( ! empty( $link ) ) :
126
+ $link_html = '<a href="' . esc_url( $link ) . '"';
127
+ if ( function_exists( 'hestia_is_external_url' ) ) {
128
+ $link_html .= hestia_is_external_url( $link );
129
+ }
130
+ $link_html .= '>';
131
+ echo wp_kses_post( $link_html );
132
+ endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  ?>
134
+ <img class="img"
135
+ src="<?php echo esc_url( $image ); ?>"
136
  <?php
137
+ if ( ! empty( $title ) ) :
 
 
138
  ?>
139
+ alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
140
+ <?php if ( ! empty( $link ) ) : ?>
141
+ </a>
142
+ <?php endif; ?>
143
+ <?php endif; ?>
144
+ </div>
145
+ </div>
146
+ <div class="col-md-7">
147
+ <div class="content">
148
+ <?php if ( ! empty( $title ) ) : ?>
149
+ <h4 class="card-title"><?php echo esc_html( $title ); ?></h4>
150
+ <?php endif; ?>
151
+ <?php if ( ! empty( $subtitle ) ) : ?>
152
+ <h6 class="category text-muted"><?php echo esc_html( $subtitle ); ?></h6>
153
+ <?php endif; ?>
154
+ <?php if ( ! empty( $text ) ) : ?>
155
+ <p class="card-description"><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
156
+ <?php endif; ?>
157
+ <?php
158
+ if ( ! empty( $team_item->social_repeater ) ) :
159
+ $icons = html_entity_decode( $team_item->social_repeater );
160
+ $icons_decoded = json_decode( $icons, true );
161
+ if ( ! empty( $icons_decoded ) ) :
162
+ ?>
163
+ <div class="footer">
164
+ <?php
165
+ foreach ( $icons_decoded as $value ) :
166
+ $social_icon = ! empty( $value['icon'] ) ? apply_filters( 'hestia_translate_single_string', $value['icon'], 'Team section' ) : '';
167
+ $social_link = ! empty( $value['link'] ) ? apply_filters( 'hestia_translate_single_string', $value['link'], 'Team section' ) : '';
168
+ ?>
169
+ <?php if ( ! empty( $social_icon ) ) : ?>
170
+ <a href="<?php echo esc_url( $social_link ); ?>"
171
+ class="btn btn-just-icon btn-simple">
172
+ <i class="fa <?php echo esc_attr( $social_icon ); ?>"></i>
173
+ </a>
174
+ <?php endif; ?>
175
+ <?php endforeach; ?>
176
+ </div>
177
+ <?php
178
+ endif;
179
  endif;
180
+ ?>
181
+ </div>
182
+ </div>
183
+ </div>
184
+ </div>
185
+ <?php
186
+ if ( $i % 2 == 0 ) {
187
+ echo '</div><!-- /.row -->';
188
+ echo '<div class="row">';
189
+ }
190
+ $i++;
191
+ endforeach;
192
+ echo '</div>';
193
+ }// End if().
194
+ endif;
195
+ if ( ! $is_callback ) {
 
196
  ?>
197
+ </div>
198
+ <?php
199
+ }
200
 
201
  }
202
 
obfx_modules/companion-legacy/inc/hestia/inc/sections/hestia-testimonials-section.php CHANGED
@@ -9,12 +9,20 @@
9
  if ( ! function_exists( 'hestia_testimonials' ) ) :
10
  /**
11
  * Testimonials section content.
 
 
 
12
  *
13
  * @since Hestia 1.0
14
- * @modified 1.1.34
15
  */
16
  function hestia_testimonials( $is_shortcode = false ) {
17
 
 
 
 
 
 
18
  $default_title = '';
19
  $default_subtitle = '';
20
  $default_content = '';
@@ -33,36 +41,48 @@ if ( ! function_exists( 'hestia_testimonials' ) ) :
33
  $hestia_testimonials_content = get_theme_mod( 'hestia_testimonials_content', $default_content );
34
 
35
  $hide_section = get_theme_mod( 'hestia_testimonials_hide', false );
36
- if ( ! $is_shortcode && ( (bool) $hide_section === true ) || ( empty( $hestia_testimonials_title ) && empty( $hestia_testimonials_subtitle ) && empty( $hestia_testimonials_content ) ) ) {
 
 
 
 
 
 
37
  return;
38
  }
39
 
40
- $class_to_add = 'container';
41
- if ( $is_shortcode ) {
42
- $class_to_add = '';
43
- }
44
 
45
  hestia_before_testimonials_section_trigger();
46
  ?>
47
- <section class="testimonials hestia-testimonials" id="testimonials" data-sorder="hestia_testimonials">
48
  <?php hestia_before_testimonials_section_content_trigger(); ?>
49
- <div class="<?php echo esc_attr( $class_to_add ); ?>">
50
- <?php hestia_top_testimonials_section_content_trigger(); ?>
51
- <div class="row">
52
- <div class="col-md-8 col-md-offset-2 text-center">
53
- <?php if ( ! empty( $hestia_testimonials_title ) || is_customize_preview() ) : ?>
54
- <h2 class="hestia-title"><?php echo esc_html( $hestia_testimonials_title ); ?></h2>
55
- <?php endif; ?>
56
- <?php if ( ! empty( $hestia_testimonials_subtitle ) || is_customize_preview() ) : ?>
57
- <h5 class="description"><?php echo esc_html( $hestia_testimonials_subtitle ); ?></h5>
58
- <?php endif; ?>
59
- </div>
60
- </div>
61
- <?php hestia_testimonials_content( $hestia_testimonials_content ); ?>
62
- <?php hestia_bottom_testimonials_section_content_trigger(); ?>
63
- </div>
 
 
 
 
 
 
 
 
64
  <?php hestia_after_testimonials_section_content_trigger(); ?>
65
- </section>
66
  <?php
67
  hestia_after_testimonials_section_trigger();
68
  }
@@ -80,8 +100,8 @@ endif;
80
  function hestia_testimonials_content( $hestia_testimonials_content, $is_callback = false ) {
81
 
82
  if ( ! $is_callback ) {
83
- ?>
84
- <div class="hestia-testimonials-content">
85
  <?php
86
  }
87
  if ( ! empty( $hestia_testimonials_content ) ) :
@@ -96,39 +116,46 @@ function hestia_testimonials_content( $hestia_testimonials_content, $is_callback
96
  $text = ! empty( $testimonial_item->text ) ? apply_filters( 'hestia_translate_single_string', $testimonial_item->text, 'Testimonials section' ) : '';
97
  $link = ! empty( $testimonial_item->link ) ? apply_filters( 'hestia_translate_single_string', $testimonial_item->link, 'Testimonials section' ) : '';
98
  ?>
99
- <div class="col-md-4">
100
- <div class="card card-testimonial card-plain">
101
  <?php if ( ! empty( $image ) ) : ?>
102
- <div class="card-avatar">
103
- <?php if ( ! empty( $link ) ) : ?>
104
- <a href="<?php echo esc_url( $link ); ?>">
105
- <?php endif; ?>
106
- <img class="img"
107
- src="<?php echo esc_url( $image ); ?>"
 
 
 
 
 
 
 
108
  <?php
109
  if ( ! empty( $title ) ) :
110
  ?>
111
- alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
112
  <?php if ( ! empty( $link ) ) : ?>
113
- </a>
114
  <?php endif; ?>
115
- </div>
116
  <?php endif; ?>
117
- <div class="content">
118
  <?php if ( ! empty( $title ) ) : ?>
119
- <h4 class="card-title"><?php echo esc_html( $title ); ?></h4>
120
  <?php endif; ?>
121
  <?php if ( ! empty( $subtitle ) ) : ?>
122
- <h6 class="category text-muted"><?php echo esc_html( $subtitle ); ?></h6>
123
  <?php endif; ?>
124
  <?php if ( ! empty( $text ) ) : ?>
125
- <p class="card-description"><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
126
  <?php endif; ?>
127
- </div>
128
- </div>
129
- </div>
130
  <?php
131
- if ( $i % 3 == 0 ) {
132
  echo '</div><!-- /.row -->';
133
  echo '<div class="row">';
134
  }
@@ -138,8 +165,8 @@ function hestia_testimonials_content( $hestia_testimonials_content, $is_callback
138
  }// End if().
139
  endif;
140
  if ( ! $is_callback ) {
141
- ?>
142
- </div>
143
  <?php
144
  }
145
  }
9
  if ( ! function_exists( 'hestia_testimonials' ) ) :
10
  /**
11
  * Testimonials section content.
12
+ * This function can be called from a shortcode too.
13
+ * When it's called as shortcode, the title and the subtitle shouldn't appear and it should be visible all the time,
14
+ * it shouldn't matter if is disable on front page.
15
  *
16
  * @since Hestia 1.0
17
+ * @modified 1.1.51
18
  */
19
  function hestia_testimonials( $is_shortcode = false ) {
20
 
21
+ // When this function is called from selective refresh, $is_shortcode gets the value of WP_Customize_Selective_Refresh object. We don't need that.
22
+ if ( ! is_bool( $is_shortcode ) ) {
23
+ $is_shortcode = false;
24
+ }
25
+
26
  $default_title = '';
27
  $default_subtitle = '';
28
  $default_content = '';
41
  $hestia_testimonials_content = get_theme_mod( 'hestia_testimonials_content', $default_content );
42
 
43
  $hide_section = get_theme_mod( 'hestia_testimonials_hide', false );
44
+ $section_is_empty = empty( $hestia_testimonials_title ) && empty( $hestia_testimonials_subtitle ) && empty( $hestia_testimonials_content );
45
+
46
+ /* Don't show section if Disable section is checked or it doesn't have any content. Show it if it's called as a shortcode */
47
+ if ( ( $is_shortcode === false ) && ( $section_is_empty || (bool) $hide_section === true ) ) {
48
+ if ( is_customize_preview() ) {
49
+ echo '<section class="hestia-testimonials" id="testimonials" data-sorder="hestia_testimonials" style="display: none"></section>';
50
+ }
51
  return;
52
  }
53
 
54
+ $wrapper_class = $is_shortcode === true ? 'is-shortcode' : '';
55
+ $container_class = $is_shortcode === true ? '' : 'container';
 
 
56
 
57
  hestia_before_testimonials_section_trigger();
58
  ?>
59
+ <section class="hestia-testimonials <?php echo esc_attr( $wrapper_class ); ?>" id="testimonials" data-sorder="hestia_testimonials">
60
  <?php hestia_before_testimonials_section_content_trigger(); ?>
61
+ <div class="<?php echo esc_attr( $container_class ); ?>">
62
+ <?php
63
+ hestia_top_testimonials_section_content_trigger();
64
+ if ( $is_shortcode === false ) {
65
+ ?>
66
+ <div class="row">
67
+ <div class="col-md-8 col-md-offset-2 text-center">
68
+ <?php
69
+ if ( ! empty( $hestia_testimonials_title ) || is_customize_preview() ) {
70
+ echo '<h2 class="hestia-title">' . esc_html( $hestia_testimonials_title ) . '</h2>';
71
+ }
72
+ if ( ! empty( $hestia_testimonials_subtitle ) || is_customize_preview() ) {
73
+ echo '<h5 class="description">' . esc_html( $hestia_testimonials_subtitle ) . '</h5>';
74
+ }
75
+ ?>
76
+ </div>
77
+ </div>
78
+ <?php
79
+ }
80
+ hestia_testimonials_content( $hestia_testimonials_content );
81
+ hestia_bottom_testimonials_section_content_trigger();
82
+ ?>
83
+ </div>
84
  <?php hestia_after_testimonials_section_content_trigger(); ?>
85
+ </section>
86
  <?php
87
  hestia_after_testimonials_section_trigger();
88
  }
100
  function hestia_testimonials_content( $hestia_testimonials_content, $is_callback = false ) {
101
 
102
  if ( ! $is_callback ) {
103
+ ?>
104
+ <div class="hestia-testimonials-content">
105
  <?php
106
  }
107
  if ( ! empty( $hestia_testimonials_content ) ) :
116
  $text = ! empty( $testimonial_item->text ) ? apply_filters( 'hestia_translate_single_string', $testimonial_item->text, 'Testimonials section' ) : '';
117
  $link = ! empty( $testimonial_item->link ) ? apply_filters( 'hestia_translate_single_string', $testimonial_item->link, 'Testimonials section' ) : '';
118
  ?>
119
+ <div class="col-xs-12 col-ms-6 col-sm-6 <?php echo apply_filters( 'hestia_testimonials_per_row_class','col-md-4' ); ?>">
120
+ <div class="card card-testimonial card-plain">
121
  <?php if ( ! empty( $image ) ) : ?>
122
+ <div class="card-avatar">
123
+ <?php
124
+ if ( ! empty( $link ) ) :
125
+ $link_html = '<a href="' . esc_url( $link ) . '"';
126
+ if ( function_exists( 'hestia_is_external_url' ) ) {
127
+ $link_html .= hestia_is_external_url( $link );
128
+ }
129
+ $link_html .= '>';
130
+ echo wp_kses_post( $link_html );
131
+ endif;
132
+ ?>
133
+ <img class="img"
134
+ src="<?php echo esc_url( $image ); ?>"
135
  <?php
136
  if ( ! empty( $title ) ) :
137
  ?>
138
+ alt="<?php echo esc_attr( $title ); ?>" title="<?php echo esc_attr( $title ); ?>" <?php endif; ?> />
139
  <?php if ( ! empty( $link ) ) : ?>
140
+ </a>
141
  <?php endif; ?>
142
+ </div>
143
  <?php endif; ?>
144
+ <div class="content">
145
  <?php if ( ! empty( $title ) ) : ?>
146
+ <h4 class="card-title"><?php echo esc_html( $title ); ?></h4>
147
  <?php endif; ?>
148
  <?php if ( ! empty( $subtitle ) ) : ?>
149
+ <h6 class="category text-muted"><?php echo esc_html( $subtitle ); ?></h6>
150
  <?php endif; ?>
151
  <?php if ( ! empty( $text ) ) : ?>
152
+ <p class="card-description"><?php echo wp_kses_post( html_entity_decode( $text ) ); ?></p>
153
  <?php endif; ?>
154
+ </div>
155
+ </div>
156
+ </div>
157
  <?php
158
+ if ( $i % apply_filters( 'hestia_testimonials_per_row_no', 3 ) == 0 ) {
159
  echo '</div><!-- /.row -->';
160
  echo '<div class="row">';
161
  }
165
  }// End if().
166
  endif;
167
  if ( ! $is_callback ) {
168
+ ?>
169
+ </div>
170
  <?php
171
  }
172
  }
obfx_modules/companion-legacy/inc/rhea/assets/css/admin-style.css CHANGED
@@ -21,7 +21,6 @@
21
  .rhea-fontawesome-dialog {
22
  z-index: 999999;
23
  background: #fcfcfc;
24
- -webkit-box-shadow: 0 5px 15px rgba(0,0,0,0.7);
25
  box-shadow: 0 5px 15px rgba(0,0,0,0.7);
26
  }
27
 
@@ -41,7 +40,6 @@
41
 
42
  #fontawesome-popup .left-side {
43
  float: left;
44
- -webkit-box-sizing: border-box;
45
  box-sizing: border-box;
46
  width: 20%;
47
  padding: 15px;
@@ -50,7 +48,6 @@
50
  #fontawesome-popup .right-side {
51
  float: left;
52
  overflow-y: scroll;
53
- -webkit-box-sizing: border-box;
54
  box-sizing: border-box;
55
  width: 80%;
56
  height: 507px;
@@ -64,7 +61,6 @@
64
  padding-right: 0;
65
  border: 0 none;
66
  background: transparent;
67
- -webkit-box-shadow: none;
68
  box-shadow: none;
69
  cursor: pointer;
70
  }
21
  .rhea-fontawesome-dialog {
22
  z-index: 999999;
23
  background: #fcfcfc;
 
24
  box-shadow: 0 5px 15px rgba(0,0,0,0.7);
25
  }
26
 
40
 
41
  #fontawesome-popup .left-side {
42
  float: left;
 
43
  box-sizing: border-box;
44
  width: 20%;
45
  padding: 15px;
48
  #fontawesome-popup .right-side {
49
  float: left;
50
  overflow-y: scroll;
 
51
  box-sizing: border-box;
52
  width: 80%;
53
  height: 507px;
61
  padding-right: 0;
62
  border: 0 none;
63
  background: transparent;
 
64
  box-shadow: none;
65
  cursor: pointer;
66
  }
obfx_modules/companion-legacy/init.php CHANGED
@@ -207,6 +207,7 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
207
  * @access public
208
  */
209
  public function hooks() {
 
210
  if ( $this->is_zerif() ) {
211
  $this->loader->add_action( 'widgets_init', $this, 'zerif_register_widgets' );
212
  }
@@ -219,7 +220,6 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
219
  }
220
 
221
  if ( $this->is_hestia() ) {
222
- define( 'THEMEISLE_COMPANION_VERSION', '2.0.0' );
223
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_require' );
224
  $this->loader->add_action( 'customize_register', $this, 'hestia_require_customizer', 0 );
225
  $this->loader->add_action( 'after_switch_theme', $this, 'hestia_set_front_page' );
@@ -258,4 +258,4 @@ class Companion_Legacy_OBFX_Module extends Orbit_Fox_Module_Abstract {
258
  public function options() {
259
  return array();
260
  }
261
- }
207
  * @access public
208
  */
209
  public function hooks() {
210
+ define( 'THEMEISLE_COMPANION_VERSION', '2.0.0' );
211
  if ( $this->is_zerif() ) {
212
  $this->loader->add_action( 'widgets_init', $this, 'zerif_register_widgets' );
213
  }
220
  }
221
 
222
  if ( $this->is_hestia() ) {
 
223
  $this->loader->add_action( 'after_setup_theme', $this, 'hestia_require' );
224
  $this->loader->add_action( 'customize_register', $this, 'hestia_require_customizer', 0 );
225
  $this->loader->add_action( 'after_switch_theme', $this, 'hestia_set_front_page' );
258
  public function options() {
259
  return array();
260
  }
261
+ }
obfx_modules/menu-icons/css/admin.css ADDED
@@ -0,0 +1,134 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .menu-item-handle .item-title {
2
+ margin-right: 10em;
3
+ }
4
+
5
+ .fade {
6
+ opacity: 0;
7
+ -webkit-transition: opacity 0.15s linear;
8
+ transition: opacity 0.15s linear;
9
+ }
10
+
11
+ .fade.in {
12
+ opacity: 1;
13
+ }
14
+
15
+ .obfx-menu-icon-container ~ .popover {
16
+ z-index: 999999;
17
+ }
18
+
19
+ .obfx-menu-icon-container {
20
+ margin-right: 10px;
21
+ padding: 2px 5px 0;
22
+ border: 1px solid #ccc;
23
+ border-radius: 3px;
24
+ color: #555;
25
+ background: #f7f7f7;
26
+ box-shadow: 0 1px 0 #ccc;
27
+ vertical-align: top;
28
+ }
29
+
30
+ .obfx-menu-icon-container:hover {
31
+ border-color: #999;
32
+ color: #23282d;
33
+ background: #fafafa;
34
+ }
35
+
36
+ .obfx-menu-icon-container:active {
37
+ border-color: #999;
38
+ background: #eee;
39
+ box-shadow: inset 0 2px 5px -3px rgba(0,0,0,0.5);
40
+ -webkit-transform: translateY(1px);
41
+ -ms-transform: translateY(1px);
42
+ transform: translateY(1px);
43
+ }
44
+
45
+ .dashicons-obfx-default-icon:before {
46
+ color: #909090;
47
+ content: "\f132";
48
+ }
49
+
50
+ .obfx-menu-icon-container {
51
+ color: #333;
52
+ }
53
+
54
+ .iconpicker-items .dashicons-obfx-default-icon {
55
+ top: 1px;
56
+ right: 1px;
57
+ -webkit-transform: rotate(45deg);
58
+ -ms-transform: rotate(45deg);
59
+ transform: rotate(45deg);
60
+ }
61
+
62
+ .iconpicker-items .dashicons-obfx-default-icon:before {
63
+ color: red;
64
+ }
65
+
66
+ .iconpicker-item.obfx-menu-icon-selected .dashicons-obfx-default-icon:before {
67
+ color: #5eadd9;
68
+ }
69
+
70
+ .obfx-menu-icon-container ~ .iconpicker-popover.popover {
71
+ width: 252px;
72
+ box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
73
+ }
74
+
75
+ .obfx-menu-icon-container ~ .iconpicker-popover .iconpicker-item {
76
+ width: auto;
77
+ height: auto;
78
+ padding: 7px 7px;
79
+ border: 1px solid #f5f5f5;
80
+ border-top: none;
81
+ border-left: none;
82
+ color: #9da3a9;
83
+ text-decoration: none;
84
+ }
85
+
86
+ .obfx-menu-icon-container ~ .iconpicker-popover .iconpicker-item.obfx-menu-icon-selected {
87
+ color: #fff;
88
+ background-color: #5eadd9;
89
+ }
90
+
91
+ .obfx-menu-icon-container ~ .iconpicker-popover .iconpicker-search {
92
+ width: 100%;
93
+ padding-left: 25px;
94
+ font-weight: 100;
95
+ }
96
+
97
+ .obfx-menu-icon-container ~ .iconpicker-popover .popover-title {
98
+ padding: 7px;
99
+ border-bottom: 1px solid #f5f5f5;
100
+ background-color: #fff;
101
+ }
102
+
103
+ .obfx-menu-icon-container ~ .iconpicker-popover.popover.bottomLeft > .arrow {
104
+ display: none;
105
+ }
106
+
107
+ .obfx-menu-icon-container ~ .iconpicker-popover .popover-title:before {
108
+ position: absolute;
109
+ padding: 6px 0 0 7px;
110
+ color: #9da3a8;
111
+ font-family: FontAwesome;
112
+ font-size: 16px;
113
+ content: "\f002";
114
+ }
115
+
116
+ .obfx-menu-icon-container ~ .iconpicker-popover .iconpicker-item i {
117
+ width: 32px;
118
+ height: 32px;
119
+ font-size: 20px;
120
+ line-height: 32px;
121
+ -webkit-transition: all 200ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
122
+ transition: all 200ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
123
+ }
124
+
125
+ .obfx-menu-icon-container ~ .iconpicker-popover .iconpicker-item:not(.obfx-menu-icon-selected):hover {
126
+ color: #5eadd9;
127
+ background: transparent;
128
+ }
129
+
130
+ .obfx-menu-icon-container ~ .iconpicker-popover .iconpicker-item:hover > i:not(.dashicons-obfx-default-icon) {
131
+ -webkit-transform: scale(1.4);
132
+ -ms-transform: scale(1.4);
133
+ transform: scale(1.4);
134
+ }
obfx_modules/menu-icons/css/vendor/fontawesome-iconpicker.min.css ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Font Awesome Icon Picker
3
+ * https://farbelous.github.io/fontawesome-iconpicker/
4
+ *
5
+ * Originally written by (c) 2016 Javi Aguilar
6
+ * Licensed under the MIT License
7
+ * https://github.com/farbelous/fontawesome-iconpicker/blob/master/LICENSE
8
+ *
9
+ */
10
+ .iconpicker-popover.popover {
11
+ position: absolute;
12
+ top: 0;
13
+ left: 0;
14
+ display: none;
15
+ max-width: none;
16
+ padding: 1px;
17
+ text-align: left;
18
+ width: 216px;
19
+ background: #f7f7f7;
20
+ z-index: 9
21
+ }
22
+
23
+ .iconpicker-popover.popover.top, .iconpicker-popover.popover.topLeftCorner, .iconpicker-popover.popover.topLeft, .iconpicker-popover.popover.topRight, .iconpicker-popover.popover.topRightCorner {
24
+ margin-top: -10px
25
+ }
26
+
27
+ .iconpicker-popover.popover.right, .iconpicker-popover.popover.rightTop, .iconpicker-popover.popover.rightBottom {
28
+ margin-left: 10px
29
+ }
30
+
31
+ .iconpicker-popover.popover.bottom, .iconpicker-popover.popover.bottomRightCorner, .iconpicker-popover.popover.bottomRight, .iconpicker-popover.popover.bottomLeft, .iconpicker-popover.popover.bottomLeftCorner {
32
+ margin-top: 10px
33
+ }
34
+
35
+ .iconpicker-popover.popover.left, .iconpicker-popover.popover.leftBottom, .iconpicker-popover.popover.leftTop {
36
+ margin-left: -10px
37
+ }
38
+
39
+ .iconpicker-popover.popover.inline {
40
+ margin: 0 0 12px 0;
41
+ position: relative;
42
+ display: inline-block;
43
+ opacity: 1;
44
+ top: auto;
45
+ left: auto;
46
+ bottom: auto;
47
+ right: auto;
48
+ max-width: 100%;
49
+ box-shadow: none;
50
+ z-index: auto;
51
+ vertical-align: top
52
+ }
53
+
54
+ .iconpicker-popover.popover.inline > .arrow {
55
+ display: none
56
+ }
57
+
58
+ .dropdown-menu .iconpicker-popover.inline {
59
+ margin: 0;
60
+ border: none
61
+ }
62
+
63
+ .dropdown-menu.iconpicker-container {
64
+ padding: 0
65
+ }
66
+
67
+ .iconpicker-popover.popover .popover-title {
68
+ padding: 12px;
69
+ font-size: 13px;
70
+ line-height: 15px;
71
+ border-bottom: 1px solid #ebebeb;
72
+ background-color: #f7f7f7
73
+ }
74
+
75
+ .iconpicker-popover.popover .popover-title input[type=search].iconpicker-search {
76
+ margin: 0 0 2px 0
77
+ }
78
+
79
+ .iconpicker-popover.popover .popover-title-text ~ input[type=search].iconpicker-search {
80
+ margin-top: 12px
81
+ }
82
+
83
+ .iconpicker-popover.popover .popover-content {
84
+ padding: 0px;
85
+ text-align: center
86
+ }
87
+
88
+ .iconpicker-popover .popover-footer {
89
+ float: none;
90
+ clear: both;
91
+ padding: 12px;
92
+ text-align: right;
93
+ margin: 0;
94
+ border-top: 1px solid #ebebeb;
95
+ background-color: #f7f7f7
96
+ }
97
+
98
+ .iconpicker-popover .popover-footer:before, .iconpicker-popover .popover-footer:after {
99
+ content: " ";
100
+ display: table
101
+ }
102
+
103
+ .iconpicker-popover .popover-footer:after {
104
+ clear: both
105
+ }
106
+
107
+ .iconpicker-popover .popover-footer .iconpicker-btn {
108
+ margin-left: 10px
109
+ }
110
+
111
+ .iconpicker-popover .popover-footer input[type=search].iconpicker-search {
112
+ margin-bottom: 12px
113
+ }
114
+
115
+ .iconpicker-popover.popover > .arrow, .iconpicker-popover.popover > .arrow:after {
116
+ position: absolute;
117
+ display: block;
118
+ width: 0;
119
+ height: 0;
120
+ border-color: transparent;
121
+ border-style: solid
122
+ }
123
+
124
+ .iconpicker-popover.popover > .arrow {
125
+ border-width: 11px
126
+ }
127
+
128
+ .iconpicker-popover.popover > .arrow:after {
129
+ border-width: 10px;
130
+ content: ""
131
+ }
132
+
133
+ .iconpicker-popover.popover.top > .arrow, .iconpicker-popover.popover.topLeft > .arrow, .iconpicker-popover.popover.topRight > .arrow {
134
+ left: 50%;
135
+ margin-left: -11px;
136
+ border-bottom-width: 0;
137
+ border-top-color: #999;
138
+ border-top-color: rgba(0, 0, 0, 0.25);
139
+ bottom: -11px
140
+ }
141
+
142
+ .iconpicker-popover.popover.top > .arrow:after, .iconpicker-popover.popover.topLeft > .arrow:after, .iconpicker-popover.popover.topRight > .arrow:after {
143
+ content: " ";
144
+ bottom: 1px;
145
+ margin-left: -10px;
146
+ border-bottom-width: 0;
147
+ border-top-color: #fff
148
+ }
149
+
150
+ .iconpicker-popover.popover.topLeft > .arrow {
151
+ left: 8px;
152
+ margin-left: 0
153
+ }
154
+
155
+ .iconpicker-popover.popover.topRight > .arrow {
156
+ left: auto;
157
+ right: 8px;
158
+ margin-left: 0
159
+ }
160
+
161
+ .iconpicker-popover.popover.right > .arrow, .iconpicker-popover.popover.rightTop > .arrow, .iconpicker-popover.popover.rightBottom > .arrow {
162
+ top: 50%;
163
+ left: -11px;
164
+ margin-top: -11px;
165
+ border-left-width: 0;
166
+ border-right-color: #999;
167
+ border-right-color: rgba(0, 0, 0, 0.25)
168
+ }
169
+
170
+ .iconpicker-popover.popover.right > .arrow:after, .iconpicker-popover.popover.rightTop > .arrow:after, .iconpicker-popover.popover.rightBottom > .arrow:after {
171
+ content: " ";
172
+ left: 1px;
173
+ bottom: -10px;
174
+ border-left-width: 0;
175
+ border-right-color: #fff
176
+ }
177
+
178
+ .iconpicker-popover.popover.rightTop > .arrow {
179
+ top: auto;
180
+ bottom: 8px;
181
+ margin-top: 0
182
+ }
183
+
184
+ .iconpicker-popover.popover.rightBottom > .arrow {
185
+ top: 8px;
186
+ margin-top: 0
187
+ }
188
+
189
+ .iconpicker-popover.popover.bottom > .arrow, .iconpicker-popover.popover.bottomRight > .arrow, .iconpicker-popover.popover.bottomLeft > .arrow {
190
+ left: 50%;
191
+ margin-left: -11px;
192
+ border-top-width: 0;
193
+ border-bottom-color: #999;
194
+ border-bottom-color: rgba(0, 0, 0, 0.25);
195
+ top: -11px
196
+ }
197
+
198
+ .iconpicker-popover.popover.bottom > .arrow:after, .iconpicker-popover.popover.bottomRight > .arrow:after, .iconpicker-popover.popover.bottomLeft > .arrow:after {
199
+ content: " ";
200
+ top: 1px;
201
+ margin-left: -10px;
202
+ border-top-width: 0;
203
+ border-bottom-color: #fff
204
+ }
205
+
206
+ .iconpicker-popover.popover.bottomLeft > .arrow {
207
+ left: 8px;
208
+ margin-left: 0
209
+ }
210
+
211
+ .iconpicker-popover.popover.bottomRight > .arrow {
212
+ left: auto;
213
+ right: 8px;
214
+ margin-left: 0
215
+ }
216
+
217
+ .iconpicker-popover.popover.left > .arrow, .iconpicker-popover.popover.leftBottom > .arrow, .iconpicker-popover.popover.leftTop > .arrow {
218
+ top: 50%;
219
+ right: -11px;
220
+ margin-top: -11px;
221
+ border-right-width: 0;
222
+ border-left-color: #999;
223
+ border-left-color: rgba(0, 0, 0, 0.25)
224
+ }
225
+
226
+ .iconpicker-popover.popover.left > .arrow:after, .iconpicker-popover.popover.leftBottom > .arrow:after, .iconpicker-popover.popover.leftTop > .arrow:after {
227
+ content: " ";
228
+ right: 1px;
229
+ border-right-width: 0;
230
+ border-left-color: #fff;
231
+ bottom: -10px
232
+ }
233
+
234
+ .iconpicker-popover.popover.leftBottom > .arrow {
235
+ top: 8px;
236
+ margin-top: 0
237
+ }
238
+
239
+ .iconpicker-popover.popover.leftTop > .arrow {
240
+ top: auto;
241
+ bottom: 8px;
242
+ margin-top: 0
243
+ }
244
+
245
+ .iconpicker {
246
+ position: relative;
247
+ text-align: left;
248
+ text-shadow: none;
249
+ line-height: 0;
250
+ display: block;
251
+ margin: 0;
252
+ overflow: hidden
253
+ }
254
+
255
+ .iconpicker * {
256
+ -webkit-box-sizing: content-box;
257
+ -moz-box-sizing: content-box;
258
+ box-sizing: content-box;
259
+ position: relative
260
+ }
261
+
262
+ .iconpicker:before, .iconpicker:after {
263
+ content: " ";
264
+ display: table
265
+ }
266
+
267
+ .iconpicker:after {
268
+ clear: both
269
+ }
270
+
271
+ .iconpicker .iconpicker-items {
272
+ position: relative;
273
+ clear: both;
274
+ float: none;
275
+ background: #fff;
276
+ margin: 0;
277
+ overflow: hidden;
278
+ overflow-y: auto;
279
+ min-height: 49px;
280
+ max-height: 246px
281
+ }
282
+
283
+ .iconpicker .iconpicker-items:before, .iconpicker .iconpicker-items:after {
284
+ content: " ";
285
+ display: table
286
+ }
287
+
288
+ .iconpicker .iconpicker-items:after {
289
+ clear: both
290
+ }
291
+
292
+ .iconpicker .iconpicker-item {
293
+ float: left;
294
+ width: 14px;
295
+ height: 14px;
296
+ padding: 12px;
297
+ text-align: center;
298
+ cursor: pointer;
299
+ font-size: 14px;
300
+ color: inherit
301
+ }
302
+
303
+ .iconpicker .iconpicker-item:hover:not(.iconpicker-selected) {
304
+ background-color: #eee
305
+ }
306
+
307
+ .iconpicker .iconpicker-item.iconpicker-selected {
308
+ box-shadow: none;
309
+ color: #fff;
310
+ background: #000
311
+ }
312
+
313
+ .iconpicker-component {
314
+ cursor: pointer
315
+ }
obfx_modules/menu-icons/inc/class-menu-icons-obfx-walker.php ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Custom Walker for Nav Menu Editor.
4
+ *
5
+ * @package Orbit_Fox
6
+ */
7
+
8
+ /**
9
+ * Custom Walker for Nav Menu Editor.
10
+ */
11
+ class Menu_Icons_OBFX_Walker extends Walker_Nav_Menu_Edit {
12
+
13
+ /**
14
+ * Start the element output.
15
+ *
16
+ * @param string $output Passed by reference. Used to append additional content.
17
+ * @param object $item Menu item data object.
18
+ * @param int $depth Depth of menu item. Used for padding.
19
+ * @param array $args Menu item args.
20
+ * @param int $id Nav menu ID.
21
+ */
22
+ function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
23
+ parent::start_el( $output, $item, $depth, $args, $id );
24
+ $icon = isset( $item->icon ) ? $item->icon : '';
25
+ $output .= sprintf( '<input type="hidden" name="menu-item-icon[%d]" id="menu-item-icon-%d" value="%s">', $item->ID, $item->ID, $icon );
26
+ }
27
+ }
obfx_modules/menu-icons/init.php ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The module for menu icons.
4
+ *
5
+ * @link https://themeisle.com
6
+ * @since 1.0.0
7
+ *
8
+ * @package Menu_Icons_OBFX_Module
9
+ */
10
+
11
+ /**
12
+ * The class for menu icons.
13
+ *
14
+ * @package Menu_Icons_OBFX_Module
15
+ * @author Themeisle <friends@themeisle.com>
16
+ * @codeCoverageIgnore
17
+ */
18
+ class Menu_Icons_OBFX_Module extends Orbit_Fox_Module_Abstract {
19
+
20
+ /**
21
+ * The default icon to use.
22
+ */
23
+ const DEFAULT_ICON = 'dashicons-obfx-default-icon';
24
+
25
+ /**
26
+ * Menu_Icons_OBFX_Module constructor.
27
+ *
28
+ * @since 1.0.0
29
+ * @access public
30
+ */
31
+ public function __construct() {
32
+ parent::__construct();
33
+ $this->name = __( 'Menu Icons', 'themeisle-companion' );
34
+ $this->description = __( 'Module to define menu icons for navigation.', 'themeisle-companion' );
35
+ }
36
+
37
+
38
+ /**
39
+ * Determine if module should be loaded.
40
+ *
41
+ * @since 1.0.0
42
+ * @access public
43
+ * @return bool
44
+ */
45
+ public function enable_module() {
46
+ return true;
47
+ }
48
+
49
+ /**
50
+ * The loading logic for the module.
51
+ *
52
+ * @since 1.0.0
53
+ * @access public
54
+ */
55
+ public function load() {
56
+ }
57
+
58
+ /**
59
+ * Method to define hooks needed.
60
+ *
61
+ * @since 1.0.0
62
+ * @access public
63
+ */
64
+ public function hooks() {
65
+ $this->loader->add_action( 'wp_update_nav_menu_item', $this, 'save_fields', 10, 3 );
66
+ $this->loader->add_filter( 'wp_edit_nav_menu_walker', $this, 'custom_walker', 99 );
67
+ $this->loader->add_filter( 'wp_setup_nav_menu_item', $this, 'show_menu', 10, 1 );
68
+
69
+ }
70
+
71
+ /**
72
+ * Show the menu item.
73
+ *
74
+ * @access public
75
+ * @return WP_Post $menu the menu object.
76
+ */
77
+ public function show_menu( $menu ) {
78
+ $icon = get_post_meta( $menu->ID, 'obfx_menu_icon', true );
79
+ if ( ! empty( $icon ) ) {
80
+ $menu->icon = $icon;
81
+ if ( ! is_admin() ) {
82
+ // usually, icons are of the format fa-x or dashicons-x and when displayed they are displayed with classes 'fa fa-x' or 'dashicons dashicons-x'.
83
+ // so let's determine the prefix class.
84
+ $array = explode( '-', $icon );
85
+ $prefix = reset( $array );
86
+ $prefix = apply_filters( 'obfx_menu_icons_icon_class', $prefix, $icon );
87
+ $menu->title = sprintf( '<i class="obfx-menu-icon %s %s"></i>%s', $prefix, $icon, $menu->title );
88
+ }
89
+ }
90
+ return $menu;
91
+ }
92
+
93
+ /**
94
+ * Return the custom walker.
95
+ *
96
+ * @access public
97
+ * @return Walker_Nav_Menu_Edit $walker the walker.
98
+ */
99
+ public function custom_walker( $walker ) {
100
+ if ( ! class_exists( 'Menu_Icons_OBFX_Walker' ) ) {
101
+ require_once $this->get_dir() . DIRECTORY_SEPARATOR . 'inc' . DIRECTORY_SEPARATOR . 'class-menu-icons-obfx-walker.php';
102
+ }
103
+ $walker = 'Menu_Icons_OBFX_Walker';
104
+ return $walker;
105
+ }
106
+
107
+ /**
108
+ * Method that returns an array of scripts and styles to be loaded
109
+ * for the front end part.
110
+ *
111
+ * @since 1.0.0
112
+ * @access public
113
+ * @return array
114
+ */
115
+ public function public_enqueue() {
116
+ return array(
117
+ 'css' => array(
118
+ 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' => false,
119
+ ),
120
+ );
121
+ }
122
+
123
+ /**
124
+ * Method that returns an array of scripts and styles to be loaded
125
+ * for the admin part.
126
+ *
127
+ * @since 1.0.0
128
+ * @access public
129
+ * @return array
130
+ */
131
+ public function admin_enqueue() {
132
+ $current_screen = get_current_screen();
133
+
134
+ if ( ! isset( $current_screen->id ) ) {
135
+ return array();
136
+ }
137
+ if ( $current_screen->id != 'nav-menus' ) {
138
+ return array();
139
+ }
140
+
141
+ $this->localized = array(
142
+ 'admin' => array(
143
+ 'icons' => apply_filters( 'obfx_menu_icons_icon_list', $this->get_dashicons() ),
144
+ 'icon_default' => self::DEFAULT_ICON,
145
+ ),
146
+ );
147
+
148
+ return array(
149
+ 'css' => array(
150
+ 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' => false,
151
+ 'vendor/fontawesome-iconpicker.min' => array( 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css' ),
152
+ 'admin' => array( 'vendor/fontawesome-iconpicker.min' ),
153
+ ),
154
+ 'js' => array(
155
+ 'vendor/bootstrap.min' => array( 'jquery' ),
156
+ 'vendor/fontawesome-iconpicker.min' => array( 'vendor/bootstrap.min' ),
157
+ 'admin' => array( 'vendor/fontawesome-iconpicker.min', 'jquery' ),
158
+ ),
159
+ );
160
+ }
161
+
162
+ /**
163
+ * Method to define the options fields for the module
164
+ *
165
+ * @since 1.0.0
166
+ * @access public
167
+ * @return array
168
+ */
169
+ public function options() {
170
+ return array();
171
+ }
172
+
173
+ /**
174
+ * Return all the dashicons.
175
+ *
176
+ * @access private
177
+ * @return array
178
+ */
179
+ private function get_dashicons() {
180
+ return array( 'dashicons-menu', 'dashicons-admin-site', 'dashicons-dashboard', 'dashicons-admin-post', 'dashicons-admin-media', 'dashicons-admin-links', 'dashicons-admin-page', 'dashicons-admin-comments', 'dashicons-admin-appearance', 'dashicons-admin-plugins', 'dashicons-admin-users', 'dashicons-admin-tools', 'dashicons-admin-settings', 'dashicons-admin-network', 'dashicons-admin-home', 'dashicons-admin-generic', 'dashicons-admin-collapse', 'dashicons-welcome-write-blog', 'dashicons-welcome-add-page', 'dashicons-welcome-view-site', 'dashicons-welcome-widgets-menus', 'dashicons-welcome-comments', 'dashicons-welcome-learn-more', 'dashicons-format-aside', 'dashicons-format-image', 'dashicons-format-gallery', 'dashicons-format-video', 'dashicons-format-status', 'dashicons-format-quote', 'dashicons-format-chat', 'dashicons-format-audio', 'dashicons-camera', 'dashicons-images-alt', 'dashicons-images-alt2', 'dashicons-video-alt', 'dashicons-video-alt2', 'dashicons-video-alt3', 'dashicons-image-crop', 'dashicons-image-rotate-left', 'dashicons-image-rotate-right', 'dashicons-image-flip-vertical', 'dashicons-image-flip-horizontal', 'dashicons-undo', 'dashicons-redo', 'dashicons-editor-bold', 'dashicons-editor-italic', 'dashicons-editor-ul', 'dashicons-editor-ol', 'dashicons-editor-quote', 'dashicons-editor-alignleft', 'dashicons-editor-aligncenter', 'dashicons-editor-alignright', 'dashicons-editor-insertmore', 'dashicons-editor-spellcheck', 'dashicons-editor-distractionfree', 'dashicons-editor-kitchensink', 'dashicons-editor-underline', 'dashicons-editor-justify', 'dashicons-editor-textcolor', 'dashicons-editor-paste-word', 'dashicons-editor-paste-text', 'dashicons-editor-removeformatting', 'dashicons-editor-video', 'dashicons-editor-customchar', 'dashicons-editor-outdent', 'dashicons-editor-indent', 'dashicons-editor-help', 'dashicons-editor-strikethrough', 'dashicons-editor-unlink', 'dashicons-editor-rtl', 'dashicons-align-left', 'dashicons-align-right', 'dashicons-align-center', 'dashicons-align-none', 'dashicons-lock', 'dashicons-calendar', 'dashicons-visibility', 'dashicons-post-status', 'dashicons-edit', 'dashicons-trash', 'dashicons-arrow-up', 'dashicons-arrow-down', 'dashicons-arrow-right', 'dashicons-arrow-left', 'dashicons-arrow-up-alt', 'dashicons-arrow-down-alt', 'dashicons-arrow-right-alt', 'dashicons-arrow-left-alt', 'dashicons-arrow-up-alt2', 'dashicons-arrow-down-alt2', 'dashicons-arrow-right-alt2', 'dashicons-arrow-left-alt2', 'dashicons-sort', 'dashicons-leftright', 'dashicons-list-view', 'dashicons-exerpt-view', 'dashicons-share', 'dashicons-share-alt', 'dashicons-share-alt2', 'dashicons-twitter', 'dashicons-rss', 'dashicons-email', 'dashicons-email-alt', 'dashicons-facebook', 'dashicons-facebook-alt', 'dashicons-googleplus', 'dashicons-networking', 'dashicons-hammer', 'dashicons-art', 'dashicons-migrate', 'dashicons-performance', 'dashicons-wordpress', 'dashicons-wordpress-alt', 'dashicons-pressthis', 'dashicons-update', 'dashicons-screenoptions', 'dashicons-info', 'dashicons-cart', 'dashicons-feedback', 'dashicons-cloud', 'dashicons-translation', 'dashicons-tag', 'dashicons-category', 'dashicons-yes', 'dashicons-no', 'dashicons-no-alt', 'dashicons-plus', 'dashicons-minus', 'dashicons-dismiss', 'dashicons-marker', 'dashicons-star-filled', 'dashicons-star-half', 'dashicons-star-empty', 'dashicons-flag', 'dashicons-location', 'dashicons-location-alt', 'dashicons-vault', 'dashicons-shield', 'dashicons-shield-alt', 'dashicons-sos', 'dashicons-search', 'dashicons-slides', 'dashicons-analytics', 'dashicons-chart-pie', 'dashicons-chart-bar', 'dashicons-chart-line', 'dashicons-chart-area', 'dashicons-groups', 'dashicons-businessman', 'dashicons-id', 'dashicons-id-alt', 'dashicons-products', 'dashicons-awards', 'dashicons-forms', 'dashicons-testimonial', 'dashicons-portfolio', 'dashicons-book', 'dashicons-book-alt', 'dashicons-download', 'dashicons-upload', 'dashicons-backup', 'dashicons-clock', 'dashicons-lightbulb', 'dashicons-desktop', 'dashicons-tablet', 'dashicons-smartphone', 'dashicons-smiley' );
181
+ }
182
+
183
+ /**
184
+ * Save menu item's icon.
185
+ *
186
+ * @access public
187
+ *
188
+ * @param int $menu_id Nav menu ID.
189
+ * @param int $menu_item_db_id Menu item ID.
190
+ * @param array $menu_item_args Menu item data.
191
+ */
192
+ public static function save_fields( $menu_id, $menu_item_db_id, $menu_item_args ) {
193
+ if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
194
+ return;
195
+ }
196
+
197
+ $screen = get_current_screen();
198
+ if ( ! $screen instanceof WP_Screen || 'nav-menus' !== $screen->id ) {
199
+ return;
200
+ }
201
+
202
+ check_admin_referer( 'update-nav_menu', 'update-nav-menu-nonce' );
203
+
204
+ if ( isset( $_POST['menu-item-icon'][ $menu_item_db_id ] ) ) {
205
+ $icon = $_POST['menu-item-icon'][ $menu_item_db_id ];
206
+ if ( self::DEFAULT_ICON === $icon ) {
207
+ $icon = '';
208
+ }
209
+ update_post_meta( $menu_item_db_id, 'obfx_menu_icon', $icon );
210
+ }
211
+
212
+ }
213
+ }
obfx_modules/menu-icons/js/admin.js ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Menu Icons Module Admin Script
3
+ *
4
+ * @since 1.0.0
5
+ * @package obfx_modules/menu-icons/js
6
+ *
7
+ * @author ThemeIsle
8
+ */
9
+
10
+ /* global menu_icons */
11
+
12
+ var obfx_menuicons_module_admin = function( $, menu_icons ) {
13
+ 'use strict';
14
+
15
+ var default_icon = menu_icons.icon_default;
16
+
17
+ function get_prefix(icon){
18
+ if(icon.match(/^fa-/)){
19
+ return 'fa ';
20
+ }else if(icon.match(/^dashicons-/)){
21
+ return 'dashicons ';
22
+ }else if(icon.match(/glyphicon-/)){
23
+ return 'glyphicon ';
24
+ }
25
+ }
26
+
27
+ // lets observe for new li tags added to the ul for when items are added to the menu.
28
+ function listen_for_new_items(){
29
+ var mutateObserver = new MutationObserver(function(records) {
30
+ records.forEach(function(record) {
31
+ $(record.addedNodes).each(function(i, x){
32
+ // process only the li elements.
33
+ if($(x).prop('tagName') === 'LI'){
34
+ add_icon(x);
35
+ }
36
+ });
37
+ });
38
+ });
39
+
40
+ mutateObserver.observe($('ul#menu-to-edit').get(0), {childList: true});
41
+ }
42
+
43
+ function add_icon(el){
44
+ var item_id = $(el).find('input.menu-item-data-db-id').val();
45
+ var icon = $('#menu-item-icon-' + item_id).val();
46
+ var no_icon_class = '';
47
+ if('' === icon){
48
+ icon = default_icon;
49
+ no_icon_class = 'obfx-menu-icon-none';
50
+ }
51
+ var prefix = get_prefix(icon);
52
+
53
+ $(el).find('.menu-item-bar .menu-item-handle .item-title').prepend($(
54
+ '<div class="input-group obfx-menu-icon-container" style="display: inline-block"><input class="form-control obfx-menu-icon ' + no_icon_class + '" value="' + icon + '" style="display: none" type="text" data-menu-item-id="' + item_id + '"><span class="input-group-addon" style="cursor: pointer"><i class="' + prefix + icon + '"></i></span></div>'
55
+ ));
56
+
57
+ // ensure the popover comes over the menu bar.
58
+ $(el).find('.menu-item-bar .menu-item-handle').css('overflow', 'initial');
59
+
60
+ $(el).find('.obfx-menu-icon').iconpicker({
61
+ // added blank icon for deselection.
62
+ icons: $.merge([default_icon], $.merge(menu_icons.icons, $.iconpicker.defaultOptions.icons)),
63
+ fullClassFormatter: function(val){
64
+ return get_prefix(val) + val;
65
+ },
66
+ hideOnSelect: true,
67
+ placement: 'bottomLeft',
68
+ selectedCustomClass: 'obfx-menu-icon-selected'
69
+ });
70
+
71
+ // add the selected icon to the hidden element.
72
+ $(el).find('.obfx-menu-icon').on('iconpickerSelected', function(e) {
73
+ var icon = e.iconpickerValue;
74
+ var id = $(this).attr('data-menu-item-id');
75
+ $('#menu-item-icon-' + id).val(icon);
76
+ });
77
+
78
+ }
79
+
80
+ $( function() {
81
+ // add the existing menu item id to the dropdown as an attribute.
82
+ $('li.menu-item').each(function(i, x){
83
+ add_icon(x);
84
+ });
85
+
86
+ listen_for_new_items();
87
+ } );
88
+
89
+ };
90
+
91
+ obfx_menuicons_module_admin( jQuery, menu_icons );
obfx_modules/menu-icons/js/vendor/bootstrap.min.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.3.7 (http://getbootstrap.com)
3
+ * Copyright 2011-2017 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+
7
+ /*!
8
+ * Generated using the Bootstrap Customizer (http://getbootstrap.com/docs/3.3/customize/?id=2dd914cff1cf2ed27c391eaf8ae13392)
9
+ * Config saved to config.json and https://gist.github.com/2dd914cff1cf2ed27c391eaf8ae13392
10
+ */
11
+ if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){"use strict";var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.tooltip"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.tooltip",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",t,e)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},i.prototype.init=function(e,i,o){if(this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var n=this.options.trigger.split(" "),s=n.length;s--;){var r=n[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},i.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},i.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusin"==e.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState?void(i.hoverState="in"):(clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show())},i.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},i.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i)),e instanceof t.Event&&(i.inState["focusout"==e.type?"focus":"hover"]=!1),i.isInStateTrue()?void 0:(clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide())},i.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var n=this,s=this.tip(),r=this.getUID(this.type);this.setContent(),s.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&s.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,s[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,p=l.test(a);p&&(a=a.replace(l,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?s.appendTo(this.options.container):s.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var h=this.getPosition(),c=s[0].offsetWidth,d=s[0].offsetHeight;if(p){var u=a,f=this.getPosition(this.$viewport);a="bottom"==a&&h.bottom+d>f.bottom?"top":"top"==a&&h.top-d<f.top?"bottom":"right"==a&&h.right+c>f.width?"left":"left"==a&&h.left-c<f.left?"right":a,s.removeClass(u).addClass(a)}var g=this.getCalculatedOffset(a,h,c,d);this.applyPlacement(g,a);var v=function(){var t=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==t&&n.leave(n)};t.support.transition&&this.$tip.hasClass("fade")?s.one("bsTransitionEnd",v).emulateTransitionEnd(i.TRANSITION_DURATION):v()}},i.prototype.applyPlacement=function(e,i){var o=this.tip(),n=o[0].offsetWidth,s=o[0].offsetHeight,r=parseInt(o.css("margin-top"),10),a=parseInt(o.css("margin-left"),10);isNaN(r)&&(r=0),isNaN(a)&&(a=0),e.top+=r,e.left+=a,t.offset.setOffset(o[0],t.extend({using:function(t){o.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),o.addClass("in");var l=o[0].offsetWidth,p=o[0].offsetHeight;"top"==i&&p!=s&&(e.top=e.top+s-p);var h=this.getViewportAdjustedDelta(i,e,l,p);h.left?e.left+=h.left:e.top+=h.top;var c=/top|bottom/.test(i),d=c?2*h.left-n+l:2*h.top-s+p,u=c?"offsetWidth":"offsetHeight";o.offset(e),this.replaceArrow(d,o[0][u],c)},i.prototype.replaceArrow=function(t,e,i){this.arrow().css(i?"left":"top",50*(1-t/e)+"%").css(i?"top":"left","")},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},i.prototype.hide=function(e){function o(){"in"!=n.hoverState&&s.detach(),n.$element&&n.$element.removeAttr("aria-describedby").trigger("hidden.bs."+n.type),e&&e()}var n=this,s=t(this.$tip),r=t.Event("hide.bs."+this.type);return this.$element.trigger(r),r.isDefaultPrevented()?void 0:(s.removeClass("in"),t.support.transition&&s.hasClass("fade")?s.one("bsTransitionEnd",o).emulateTransitionEnd(i.TRANSITION_DURATION):o(),this.hoverState=null,this)},i.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},i.prototype.hasContent=function(){return this.getTitle()},i.prototype.getPosition=function(e){e=e||this.$element;var i=e[0],o="BODY"==i.tagName,n=i.getBoundingClientRect();null==n.width&&(n=t.extend({},n,{width:n.right-n.left,height:n.bottom-n.top}));var s=window.SVGElement&&i instanceof window.SVGElement,r=o?{top:0,left:0}:s?null:e.offset(),a={scroll:o?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},l=o?{width:t(window).width(),height:t(window).height()}:null;return t.extend({},n,a,l,r)},i.prototype.getCalculatedOffset=function(t,e,i,o){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-i/2}:"top"==t?{top:e.top-o,left:e.left+e.width/2-i/2}:"left"==t?{top:e.top+e.height/2-o/2,left:e.left-i}:{top:e.top+e.height/2-o/2,left:e.left+e.width}},i.prototype.getViewportAdjustedDelta=function(t,e,i,o){var n={top:0,left:0};if(!this.$viewport)return n;var s=this.options.viewport&&this.options.viewport.padding||0,r=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-s-r.scroll,l=e.top+s-r.scroll+o;a<r.top?n.top=r.top-a:l>r.top+r.height&&(n.top=r.top+r.height-l)}else{var p=e.left-s,h=e.left+s+i;p<r.left?n.left=r.left-p:h>r.right&&(n.left=r.left+r.width-h)}return n},i.prototype.getTitle=function(){var t,e=this.$element,i=this.options;return t=e.attr("data-original-title")||("function"==typeof i.title?i.title.call(e[0]):i.title)},i.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},i.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},i.prototype.enable=function(){this.enabled=!0},i.prototype.disable=function(){this.enabled=!1},i.prototype.toggleEnabled=function(){this.enabled=!this.enabled},i.prototype.toggle=function(e){var i=this;e&&(i=t(e.currentTarget).data("bs."+this.type),i||(i=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,i))),e?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)},i.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=i,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery),+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof e&&e;!n&&/destroy|hide/.test(e)||(n||o.data("bs.popover",n=new i(this,s)),"string"==typeof e&&n[e]())})}var i=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");i.VERSION="3.3.7",i.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),i.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),i.prototype.constructor=i,i.prototype.getDefaults=function(){return i.DEFAULTS},i.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof i?"html":"append":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},i.prototype.hasContent=function(){return this.getTitle()||this.getContent()},i.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},i.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=i,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery),+function(t){"use strict";function e(e){var i,o=e.attr("data-target")||(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function i(e){return this.each(function(){var i=t(this),n=i.data("bs.collapse"),s=t.extend({},o.DEFAULTS,i.data(),"object"==typeof e&&e);!n&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),n||i.data("bs.collapse",n=new o(this,s)),"string"==typeof e&&n[e]()})}var o=function(e,i){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,n=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(n&&n.length&&(e=n.data("bs.collapse"),e&&e.transitioning))){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){n&&n.length&&(i.call(n,"hide"),e||n.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[r](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[i](0).one("bsTransitionEnd",t.proxy(n,this)).emulateTransitionEnd(o.TRANSITION_DURATION):n.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(i,o){var n=t(o);this.addAriaAndCollapsedClass(e(n),n)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var i=t.hasClass("in");t.attr("aria-expanded",i),e.toggleClass("collapsed",!i).attr("aria-expanded",i)};var n=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=n,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var n=t(this);n.attr("data-target")||o.preventDefault();var s=e(n),r=s.data("bs.collapse"),a=r?"toggle":n.data();i.call(s,a)})}(jQuery),+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var i in e)if(void 0!==t.style[i])return{end:e[i]};return!1}t.fn.emulateTransitionEnd=function(e){var i=!1,o=this;t(this).one("bsTransitionEnd",function(){i=!0});var n=function(){i||t(o).trigger(t.support.transition.end)};return setTimeout(n,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){return t(e.target).is(this)?e.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery);
obfx_modules/menu-icons/js/vendor/fontawesome-iconpicker.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.ui=a.ui||{};a.ui.version="1.12.1";!function(){function b(a,b,c){return[parseFloat(a[0])*(l.test(a[0])?b/100:1),parseFloat(a[1])*(l.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}var e,f=Math.max,g=Math.abs,h=/left|center|right/,i=/top|center|bottom/,j=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,l=/%$/,m=a.fn.pos;a.pos={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth;return{width:"scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight?a.pos.scrollbarWidth():0,height:e?a.pos.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:d||e?{left:0,top:0}:a(b).offset(),scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:c.outerWidth(),height:c.outerHeight()}}},a.fn.pos=function(e){if(!e||!e.of)return m.apply(this,arguments);e=a.extend({},e);var l,n,o,p,q,r,s=a(e.of),t=a.pos.getWithinInfo(e.within),u=a.pos.getScrollInfo(t),v=(e.collision||"flip").split(" "),w={};return r=d(s),s[0].preventDefault&&(e.at="left top"),n=r.width,o=r.height,p=r.offset,q=a.extend({},p),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=h.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center","center"]),c[0]=h.test(c[0])?c[0]:"center",c[1]=i.test(c[1])?c[1]:"center",a=j.exec(c[0]),b=j.exec(c[1]),w[this]=[a?a[0]:0,b?b[0]:0],e[this]=[k.exec(c[0])[0],k.exec(c[1])[0]]}),1===v.length&&(v[1]=v[0]),"right"===e.at[0]?q.left+=n:"center"===e.at[0]&&(q.left+=n/2),"bottom"===e.at[1]?q.top+=o:"center"===e.at[1]&&(q.top+=o/2),l=b(w.at,n,o),q.left+=l[0],q.top+=l[1],this.each(function(){var d,h,i=a(this),j=i.outerWidth(),k=i.outerHeight(),m=c(this,"marginLeft"),r=c(this,"marginTop"),x=j+m+c(this,"marginRight")+u.width,y=k+r+c(this,"marginBottom")+u.height,z=a.extend({},q),A=b(w.my,i.outerWidth(),i.outerHeight());"right"===e.my[0]?z.left-=j:"center"===e.my[0]&&(z.left-=j/2),"bottom"===e.my[1]?z.top-=k:"center"===e.my[1]&&(z.top-=k/2),z.left+=A[0],z.top+=A[1],d={marginLeft:m,marginTop:r},a.each(["left","top"],function(b,c){a.ui.pos[v[b]]&&a.ui.pos[v[b]][c](z,{targetWidth:n,targetHeight:o,elemWidth:j,elemHeight:k,collisionPosition:d,collisionWidth:x,collisionHeight:y,offset:[l[0]+A[0],l[1]+A[1]],my:e.my,at:e.at,within:t,elem:i})}),e.using&&(h=function(a){var b=p.left-z.left,c=b+n-j,d=p.top-z.top,h=d+o-k,l={target:{element:s,left:p.left,top:p.top,width:n,height:o},element:{element:i,left:z.left,top:z.top,width:j,height:k},horizontal:c<0?"left":b>0?"right":"center",vertical:h<0?"top":d>0?"bottom":"middle"};n<j&&g(b+c)<n&&(l.horizontal="center"),o<k&&g(d+h)<o&&(l.vertical="middle"),f(g(b),g(c))>f(g(d),g(h))?l.important="horizontal":l.important="vertical",e.using.call(this,a,l)}),i.offset(a.extend(z,{using:h}))})},a.ui.pos={_trigger:function(a,b,c,d){b.elem&&b.elem.trigger({type:c,position:a,positionData:b,triggered:d})},fit:{left:function(b,c){a.ui.pos._trigger(b,c,"posCollide","fitLeft");var d,e=c.within,g=e.isWindow?e.scrollLeft:e.offset.left,h=e.width,i=b.left-c.collisionPosition.marginLeft,j=g-i,k=i+c.collisionWidth-h-g;c.collisionWidth>h?j>0&&k<=0?(d=b.left+j+c.collisionWidth-h-g,b.left+=j-d):b.left=k>0&&j<=0?g:j>k?g+h-c.collisionWidth:g:j>0?b.left+=j:k>0?b.left-=k:b.left=f(b.left-i,b.left),a.ui.pos._trigger(b,c,"posCollided","fitLeft")},top:function(b,c){a.ui.pos._trigger(b,c,"posCollide","fitTop");var d,e=c.within,g=e.isWindow?e.scrollTop:e.offset.top,h=c.within.height,i=b.top-c.collisionPosition.marginTop,j=g-i,k=i+c.collisionHeight-h-g;c.collisionHeight>h?j>0&&k<=0?(d=b.top+j+c.collisionHeight-h-g,b.top+=j-d):b.top=k>0&&j<=0?g:j>k?g+h-c.collisionHeight:g:j>0?b.top+=j:k>0?b.top-=k:b.top=f(b.top-i,b.top),a.ui.pos._trigger(b,c,"posCollided","fitTop")}},flip:{left:function(b,c){a.ui.pos._trigger(b,c,"posCollide","flipLeft");var d,e,f=c.within,h=f.offset.left+f.scrollLeft,i=f.width,j=f.isWindow?f.scrollLeft:f.offset.left,k=b.left-c.collisionPosition.marginLeft,l=k-j,m=k+c.collisionWidth-i-j,n="left"===c.my[0]?-c.elemWidth:"right"===c.my[0]?c.elemWidth:0,o="left"===c.at[0]?c.targetWidth:"right"===c.at[0]?-c.targetWidth:0,p=-2*c.offset[0];l<0?((d=b.left+n+o+p+c.collisionWidth-i-h)<0||d<g(l))&&(b.left+=n+o+p):m>0&&((e=b.left-c.collisionPosition.marginLeft+n+o+p-j)>0||g(e)<m)&&(b.left+=n+o+p),a.ui.pos._trigger(b,c,"posCollided","flipLeft")},top:function(b,c){a.ui.pos._trigger(b,c,"posCollide","flipTop");var d,e,f=c.within,h=f.offset.top+f.scrollTop,i=f.height,j=f.isWindow?f.scrollTop:f.offset.top,k=b.top-c.collisionPosition.marginTop,l=k-j,m=k+c.collisionHeight-i-j,n="top"===c.my[1],o=n?-c.elemHeight:"bottom"===c.my[1]?c.elemHeight:0,p="top"===c.at[1]?c.targetHeight:"bottom"===c.at[1]?-c.targetHeight:0,q=-2*c.offset[1];l<0?((e=b.top+o+p+q+c.collisionHeight-i-h)<0||e<g(l))&&(b.top+=o+p+q):m>0&&((d=b.top-c.collisionPosition.marginTop+o+p+q-j)>0||g(d)<m)&&(b.top+=o+p+q),a.ui.pos._trigger(b,c,"posCollided","flipTop")}},flipfit:{left:function(){a.ui.pos.flip.left.apply(this,arguments),a.ui.pos.fit.left.apply(this,arguments)},top:function(){a.ui.pos.flip.top.apply(this,arguments),a.ui.pos.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,f,g=document.getElementsByTagName("body")[0],h=document.createElement("div");b=document.createElement(g?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},g&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in d)b.style[f]=d[f];b.appendChild(h),c=g||document.documentElement,c.insertBefore(b,c.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",e=a(h).offset().left,a.support.offsetFractions=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}();a.ui.position}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):window.jQuery&&!window.jQuery.fn.iconpicker&&a(window.jQuery)}(function(a){"use strict";var b={isEmpty:function(a){return!1===a||""===a||null===a||void 0===a},isEmptyObject:function(a){return!0===this.isEmpty(a)||0===a.length},isElement:function(b){return a(b).length>0},isString:function(a){return"string"==typeof a||a instanceof String},isArray:function(b){return a.isArray(b)},inArray:function(b,c){return-1!==a.inArray(b,c)},throwError:function(a){throw"Font Awesome Icon Picker Exception: "+a}},c=function(d,e){this._id=c._idCounter++,this.element=a(d).addClass("iconpicker-element"),this._trigger("iconpickerCreate"),this.options=a.extend({},c.defaultOptions,this.element.data(),e),this.options.templates=a.extend({},c.defaultOptions.templates,this.options.templates),this.options.originalPlacement=this.options.placement,this.container=!!b.isElement(this.options.container)&&a(this.options.container),!1===this.container&&(this.element.is(".dropdown-toggle")?this.container=a("~ .dropdown-menu:first",this.element):this.container=this.element.is("input,textarea,button,.btn")?this.element.parent():this.element),this.container.addClass("iconpicker-container"),this.isDropdownMenu()&&(this.options.templates.search=!1,this.options.templates.buttons=!1,this.options.placement="inline"),this.input=!!this.element.is("input,textarea")&&this.element.addClass("iconpicker-input"),!1===this.input&&(this.input=this.container.find(this.options.input),this.input.is("input,textarea")||(this.input=!1)),this.component=this.isDropdownMenu()?this.container.parent().find(this.options.component):this.container.find(this.options.component),0===this.component.length?this.component=!1:this.component.find("i").addClass("iconpicker-component"),this._createPopover(),this._createIconpicker(),0===this.getAcceptButton().length&&(this.options.mustAccept=!1),this.isInputGroup()?this.container.parent().append(this.popover):this.container.append(this.popover),this._bindElementEvents(),this._bindWindowEvents(),this.update(this.options.selected),this.isInline()&&this.show(),this._trigger("iconpickerCreated")};c._idCounter=0,c.defaultOptions={title:!1,selected:!1,defaultValue:!1,placement:"bottom",collision:"none",animation:!0,hideOnSelect:!1,showFooter:!1,searchInFooter:!1,mustAccept:!1,selectedCustomClass:"bg-primary",icons:[],fullClassFormatter:function(a){return"fa "+a},input:"input,.iconpicker-input",inputSearch:!1,container:!1,component:".input-group-addon,.iconpicker-component",templates:{popover:'<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>',footer:'<div class="popover-footer"></div>',buttons:'<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',search:'<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',iconpicker:'<div class="iconpicker"><div class="iconpicker-items"></div></div>',iconpickerItem:'<a role="button" href="#" class="iconpicker-item"><i></i></a>'}},c.batch=function(b,c){var d=Array.prototype.slice.call(arguments,2);return a(b).each(function(){var b=a(this).data("iconpicker");b&&b[c].apply(b,d)})},c.prototype={constructor:c,options:{},_id:0,_trigger:function(b,c){c=c||{},this.element.trigger(a.extend({type:b,iconpickerInstance:this},c))},_createPopover:function(){this.popover=a(this.options.templates.popover);var c=this.popover.find(".popover-title");if(this.options.title&&c.append(a('<div class="popover-title-text">'+this.options.title+"</div>")),this.hasSeparatedSearchInput()&&!this.options.searchInFooter?c.append(this.options.templates.search):this.options.title||c.remove(),this.options.showFooter&&!b.isEmpty(this.options.templates.footer)){var d=a(this.options.templates.footer);this.hasSeparatedSearchInput()&&this.options.searchInFooter&&d.append(a(this.options.templates.search)),b.isEmpty(this.options.templates.buttons)||d.append(a(this.options.templates.buttons)),this.popover.append(d)}return!0===this.options.animation&&this.popover.addClass("fade"),this.popover},_createIconpicker:function(){var b=this;this.iconpicker=a(this.options.templates.iconpicker);var c=function(c){var d=a(this);return d.is("i")&&(d=d.parent()),b._trigger("iconpickerSelect",{iconpickerItem:d,iconpickerValue:b.iconpickerValue}),!1===b.options.mustAccept?(b.update(d.data("iconpickerValue")),b._trigger("iconpickerSelected",{iconpickerItem:this,iconpickerValue:b.iconpickerValue})):b.update(d.data("iconpickerValue"),!0),b.options.hideOnSelect&&!1===b.options.mustAccept&&b.hide(),c.preventDefault(),!1};for(var d in this.options.icons)if("string"==typeof this.options.icons[d]){var e=a(this.options.templates.iconpickerItem);e.find("i").addClass(this.options.fullClassFormatter(this.options.icons[d])),e.data("iconpickerValue",this.options.icons[d]).on("click.iconpicker",c),this.iconpicker.find(".iconpicker-items").append(e.attr("title","."+this.options.icons[d]))}return this.popover.find(".popover-content").append(this.iconpicker),this.iconpicker},_isEventInsideIconpicker:function(b){var c=a(b.target);return!((!c.hasClass("iconpicker-element")||c.hasClass("iconpicker-element")&&!c.is(this.element))&&0===c.parents(".iconpicker-popover").length)},_bindElementEvents:function(){var c=this;this.getSearchInput().on("keyup.iconpicker",function(){c.filter(a(this).val().toLowerCase())}),this.getAcceptButton().on("click.iconpicker",function(){var a=c.iconpicker.find(".iconpicker-selected").get(0);c.update(c.iconpickerValue),c._trigger("iconpickerSelected",{iconpickerItem:a,iconpickerValue:c.iconpickerValue}),c.isInline()||c.hide()}),this.getCancelButton().on("click.iconpicker",function(){c.isInline()||c.hide()}),this.element.on("focus.iconpicker",function(a){c.show(),a.stopPropagation()}),this.hasComponent()&&this.component.on("click.iconpicker",function(){c.toggle()}),this.hasInput()&&this.input.on("keyup.iconpicker",function(d){b.inArray(d.keyCode,[38,40,37,39,16,17,18,9,8,91,93,20,46,186,190,46,78,188,44,86])?c._updateFormGroupStatus(!1!==c.getValid(this.value)):c.update(),!0===c.options.inputSearch&&c.filter(a(this).val().toLowerCase())})},_bindWindowEvents:function(){var b=a(window.document),c=this,d=".iconpicker.inst"+this._id;return a(window).on("resize.iconpicker"+d+" orientationchange.iconpicker"+d,function(a){c.popover.hasClass("in")&&c.updatePlacement()}),c.isInline()||b.on("mouseup"+d,function(a){return c._isEventInsideIconpicker(a)||c.isInline()||c.hide(),a.stopPropagation(),a.preventDefault(),!1}),!1},_unbindElementEvents:function(){this.popover.off(".iconpicker"),this.element.off(".iconpicker"),this.hasInput()&&this.input.off(".iconpicker"),this.hasComponent()&&this.component.off(".iconpicker"),this.hasContainer()&&this.container.off(".iconpicker")},_unbindWindowEvents:function(){a(window).off(".iconpicker.inst"+this._id),a(window.document).off(".iconpicker.inst"+this._id)},updatePlacement:function(b,c){b=b||this.options.placement,this.options.placement=b,c=c||this.options.collision,c=!0===c?"flip":c;var d={at:"right bottom",my:"right top",of:this.hasInput()&&!this.isInputGroup()?this.input:this.container,collision:!0===c?"flip":c,within:window};if(this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"),"object"==typeof b)return this.popover.pos(a.extend({},d,b));switch(b){case"inline":d=!1;break;case"topLeftCorner":d.my="right bottom",d.at="left top";break;case"topLeft":d.my="left bottom",d.at="left top";break;case"top":d.my="center bottom",d.at="center top";break;case"topRight":d.my="right bottom",d.at="right top";break;case"topRightCorner":d.my="left bottom",d.at="right top";break;case"rightTop":d.my="left bottom",d.at="right center";break;case"right":d.my="left center",d.at="right center";break;case"rightBottom":d.my="left top",d.at="right center";break;case"bottomRightCorner":d.my="left top",d.at="right bottom";break;case"bottomRight":d.my="right top",d.at="right bottom";break;case"bottom":d.my="center top",d.at="center bottom";break;case"bottomLeft":d.my="left top",d.at="left bottom";break;case"bottomLeftCorner":d.my="right top",d.at="left bottom";break;case"leftBottom":d.my="right top",d.at="left center";break;case"left":d.my="right center",d.at="left center";break;case"leftTop":d.my="right bottom",d.at="left center";break;default:return!1}return this.popover.css({display:"inline"===this.options.placement?"":"block"}),!1!==d?this.popover.pos(d).css("maxWidth",a(window).width()-this.container.offset().left-5):this.popover.css({top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"none"}),this.popover.addClass(this.options.placement),!0},_updateComponents:function(){if(this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected "+this.options.selectedCustomClass),this.iconpickerValue&&this.iconpicker.find("."+this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g,".")).parent().addClass("iconpicker-selected "+this.options.selectedCustomClass),this.hasComponent()){var a=this.component.find("i");a.length>0?a.attr("class",this.options.fullClassFormatter(this.iconpickerValue)):this.component.html(this.getHtml())}},_updateFormGroupStatus:function(a){return!!this.hasInput()&&(!1!==a?this.input.parents(".form-group:first").removeClass("has-error"):this.input.parents(".form-group:first").addClass("has-error"),!0)},getValid:function(c){b.isString(c)||(c="");var d=""===c;return c=a.trim(c),!(!b.inArray(c,this.options.icons)&&!d)&&c},setValue:function(a){var b=this.getValid(a);return!1!==b?(this.iconpickerValue=b,this._trigger("iconpickerSetValue",{iconpickerValue:b}),this.iconpickerValue):(this._trigger("iconpickerInvalid",{iconpickerValue:a}),!1)},getHtml:function(){return'<i class="'+this.options.fullClassFormatter(this.iconpickerValue)+'"></i>'},setSourceValue:function(a){return a=this.setValue(a),!1!==a&&""!==a&&(this.hasInput()?this.input.val(this.iconpickerValue):this.element.data("iconpickerValue",this.iconpickerValue),this._trigger("iconpickerSetSourceValue",{iconpickerValue:a})),a},getSourceValue:function(a){a=a||this.options.defaultValue;var b=a;return b=this.hasInput()?this.input.val():this.element.data("iconpickerValue"),void 0!==b&&""!==b&&null!==b&&!1!==b||(b=a),b},hasInput:function(){return!1!==this.input},isInputSearch:function(){return this.hasInput()&&!0===this.options.inputSearch},isInputGroup:function(){return this.container.is(".input-group")},isDropdownMenu:function(){return this.container.is(".dropdown-menu")},hasSeparatedSearchInput:function(){return!1!==this.options.templates.search&&!this.isInputSearch()},hasComponent:function(){return!1!==this.component},hasContainer:function(){return!1!==this.container},getAcceptButton:function(){return this.popover.find(".iconpicker-btn-accept")},getCancelButton:function(){return this.popover.find(".iconpicker-btn-cancel")},getSearchInput:function(){return this.popover.find(".iconpicker-search")},filter:function(c){if(b.isEmpty(c))return this.iconpicker.find(".iconpicker-item").show(),a(!1);var d=[];return this.iconpicker.find(".iconpicker-item").each(function(){var b=a(this),e=b.attr("title").toLowerCase(),f=!1;try{f=new RegExp(c,"g")}catch(a){f=!1}!1!==f&&e.match(f)?(d.push(b),b.show()):b.hide()}),d},show:function(){if(this.popover.hasClass("in"))return!1;a.iconpicker.batch(a(".iconpicker-popover.in:not(.inline)").not(this.popover),"hide"),this._trigger("iconpickerShow"),this.updatePlacement(),this.popover.addClass("in"),setTimeout(a.proxy(function(){this.popover.css("display",this.isInline()?"":"block"),this._trigger("iconpickerShown")},this),this.options.animation?300:1)},hide:function(){if(!this.popover.hasClass("in"))return!1;this._trigger("iconpickerHide"),this.popover.removeClass("in"),setTimeout(a.proxy(function(){this.popover.css("display","none"),this.getSearchInput().val(""),this.filter(""),this._trigger("iconpickerHidden")},this),this.options.animation?300:1)},toggle:function(){this.popover.is(":visible")?this.hide():this.show(!0)},update:function(a,b){return a=a||this.getSourceValue(this.iconpickerValue),this._trigger("iconpickerUpdate"),!0===b?a=this.setValue(a):(a=this.setSourceValue(a),this._updateFormGroupStatus(!1!==a)),!1!==a&&this._updateComponents(),this._trigger("iconpickerUpdated"),a},destroy:function(){this._trigger("iconpickerDestroy"),this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"),this._unbindElementEvents(),this._unbindWindowEvents(),a(this.popover).remove(),this._trigger("iconpickerDestroyed")},disable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!0),!0)},enable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!1),!0)},isDisabled:function(){return!!this.hasInput()&&!0===this.input.prop("disabled")},isInline:function(){return"inline"===this.options.placement||this.popover.hasClass("inline")}},a.iconpicker=c,a.fn.iconpicker=function(b){return this.each(function(){var d=a(this);d.data("iconpicker")||d.data("iconpicker",new c(this,"object"==typeof b?b:{}))})},c.defaultOptions.icons=["fa-500px","fa-address-book","fa-address-book-o","fa-address-card","fa-address-card-o","fa-adjust","fa-adn","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-amazon","fa-ambulance","fa-american-sign-language-interpreting","fa-anchor","fa-android","fa-angellist","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-apple","fa-archive","fa-area-chart","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-o-down","fa-arrow-circle-o-left","fa-arrow-circle-o-right","fa-arrow-circle-o-up","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-h","fa-arrows-v","fa-asl-interpreting","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-audio-description","fa-automobile","fa-backward","fa-balance-scale","fa-ban","fa-bandcamp","fa-bank","fa-bar-chart","fa-bar-chart-o","fa-barcode","fa-bars","fa-bath","fa-bathtub","fa-battery","fa-battery-0","fa-battery-1","fa-battery-2","fa-battery-3","fa-battery-4","fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-three-quarters","fa-bed","fa-beer","fa-behance","fa-behance-square","fa-bell","fa-bell-o","fa-bell-slash","fa-bell-slash-o","fa-bicycle","fa-binoculars","fa-birthday-cake","fa-bitbucket","fa-bitbucket-square","fa-bitcoin","fa-black-tie","fa-blind","fa-bluetooth","fa-bluetooth-b","fa-bold","fa-bolt","fa-bomb","fa-book","fa-bookmark","fa-bookmark-o","fa-braille","fa-briefcase","fa-btc","fa-bug","fa-building","fa-building-o","fa-bullhorn","fa-bullseye","fa-bus","fa-buysellads","fa-cab","fa-calculator","fa-calendar","fa-calendar-check-o","fa-calendar-minus-o","fa-calendar-o","fa-calendar-plus-o","fa-calendar-times-o","fa-camera","fa-camera-retro","fa-car","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-o-down","fa-caret-square-o-left","fa-caret-square-o-right","fa-caret-square-o-up","fa-caret-up","fa-cart-arrow-down","fa-cart-plus","fa-cc","fa-cc-amex","fa-cc-diners-club","fa-cc-discover","fa-cc-jcb","fa-cc-mastercard","fa-cc-paypal","fa-cc-stripe","fa-cc-visa","fa-certificate","fa-chain","fa-chain-broken","fa-check","fa-check-circle","fa-check-circle-o","fa-check-square","fa-check-square-o","fa-chevron-circle-down","fa-chevron-circle-left","fa-chevron-circle-right","fa-chevron-circle-up","fa-chevron-down","fa-chevron-left","fa-chevron-right","fa-chevron-up","fa-child","fa-chrome","fa-circle","fa-circle-o","fa-circle-o-notch","fa-circle-thin","fa-clipboard","fa-clock-o","fa-clone","fa-close","fa-cloud","fa-cloud-download","fa-cloud-upload","fa-cny","fa-code","fa-code-fork","fa-codepen","fa-codiepie","fa-coffee","fa-cog","fa-cogs","fa-columns","fa-comment","fa-comment-o","fa-commenting","fa-commenting-o","fa-comments","fa-comments-o","fa-compass","fa-compress","fa-connectdevelop","fa-contao","fa-copy","fa-copyright","fa-creative-commons","fa-credit-card","fa-credit-card-alt","fa-crop","fa-crosshairs","fa-css3","fa-cube","fa-cubes","fa-cut","fa-cutlery","fa-dashboard","fa-dashcube","fa-database","fa-deaf","fa-deafness","fa-dedent","fa-delicious","fa-desktop","fa-deviantart","fa-diamond","fa-digg","fa-dollar","fa-dot-circle-o","fa-download","fa-dribbble","fa-drivers-license","fa-drivers-license-o","fa-dropbox","fa-drupal","fa-edge","fa-edit","fa-eercast","fa-eject","fa-ellipsis-h","fa-ellipsis-v","fa-empire","fa-envelope","fa-envelope-o","fa-envelope-open","fa-envelope-open-o","fa-envelope-square","fa-envira","fa-eraser","fa-etsy","fa-eur","fa-euro","fa-exchange","fa-exclamation","fa-exclamation-circle","fa-exclamation-triangle","fa-expand","fa-expeditedssl","fa-external-link","fa-external-link-square","fa-eye","fa-eye-slash","fa-eyedropper","fa-fa","fa-facebook","fa-facebook-f","fa-facebook-official","fa-facebook-square","fa-fast-backward","fa-fast-forward","fa-fax","fa-feed","fa-female","fa-fighter-jet","fa-file","fa-file-archive-o","fa-file-audio-o","fa-file-code-o","fa-file-excel-o","fa-file-image-o","fa-file-movie-o","fa-file-o","fa-file-pdf-o","fa-file-photo-o","fa-file-picture-o","fa-file-powerpoint-o","fa-file-sound-o","fa-file-text","fa-file-text-o","fa-file-video-o","fa-file-word-o","fa-file-zip-o","fa-files-o","fa-film","fa-filter","fa-fire","fa-fire-extinguisher","fa-firefox","fa-first-order","fa-flag","fa-flag-checkered","fa-flag-o","fa-flash","fa-flask","fa-flickr","fa-floppy-o","fa-folder","fa-folder-o","fa-folder-open","fa-folder-open-o","fa-font","fa-font-awesome","fa-fonticons","fa-fort-awesome","fa-forumbee","fa-forward","fa-foursquare","fa-free-code-camp","fa-frown-o","fa-futbol-o","fa-gamepad","fa-gavel","fa-gbp","fa-ge","fa-gear","fa-gears","fa-genderless","fa-get-pocket","fa-gg","fa-gg-circle","fa-gift","fa-git","fa-git-square","fa-github","fa-github-alt","fa-github-square","fa-gitlab","fa-gittip","fa-glass","fa-glide","fa-glide-g","fa-globe","fa-google","fa-google-plus","fa-google-plus-circle","fa-google-plus-official","fa-google-plus-square","fa-google-wallet","fa-graduation-cap","fa-gratipay","fa-grav","fa-group","fa-h-square","fa-hacker-news","fa-hand-grab-o","fa-hand-lizard-o","fa-hand-o-down","fa-hand-o-left","fa-hand-o-right","fa-hand-o-up","fa-hand-paper-o","fa-hand-peace-o","fa-hand-pointer-o","fa-hand-rock-o","fa-hand-scissors-o","fa-hand-spock-o","fa-hand-stop-o","fa-handshake-o","fa-hard-of-hearing","fa-hashtag","fa-hdd-o","fa-header","fa-headphones","fa-heart","fa-heart-o","fa-heartbeat","fa-history","fa-home","fa-hospital-o","fa-hotel","fa-hourglass","fa-hourglass-1","fa-hourglass-2","fa-hourglass-3","fa-hourglass-end","fa-hourglass-half","fa-hourglass-o","fa-hourglass-start","fa-houzz","fa-html5","fa-i-cursor","fa-id-badge","fa-id-card","fa-id-card-o","fa-ils","fa-image","fa-imdb","fa-inbox","fa-indent","fa-industry","fa-info","fa-info-circle","fa-inr","fa-instagram","fa-institution","fa-internet-explorer","fa-intersex","fa-ioxhost","fa-italic","fa-joomla","fa-jpy","fa-jsfiddle","fa-key","fa-keyboard-o","fa-krw","fa-language","fa-laptop","fa-lastfm","fa-lastfm-square","fa-leaf","fa-leanpub","fa-legal","fa-lemon-o","fa-level-down","fa-level-up","fa-life-bouy","fa-life-buoy","fa-life-ring","fa-life-saver","fa-lightbulb-o","fa-line-chart","fa-link","fa-linkedin","fa-linkedin-square","fa-linode","fa-linux","fa-list","fa-list-alt","fa-list-ol","fa-list-ul","fa-location-arrow","fa-lock","fa-long-arrow-down","fa-long-arrow-left","fa-long-arrow-right","fa-long-arrow-up","fa-low-vision","fa-magic","fa-magnet","fa-mail-forward","fa-mail-reply","fa-mail-reply-all","fa-male","fa-map","fa-map-marker","fa-map-o","fa-map-pin","fa-map-signs","fa-mars","fa-mars-double","fa-mars-stroke","fa-mars-stroke-h","fa-mars-stroke-v","fa-maxcdn","fa-meanpath","fa-medium","fa-medkit","fa-meetup","fa-meh-o","fa-mercury","fa-microchip","fa-microphone","fa-microphone-slash","fa-minus","fa-minus-circle","fa-minus-square","fa-minus-square-o","fa-mixcloud","fa-mobile","fa-mobile-phone","fa-modx","fa-money","fa-moon-o","fa-mortar-board","fa-motorcycle","fa-mouse-pointer","fa-music","fa-navicon","fa-neuter","fa-newspaper-o","fa-object-group","fa-object-ungroup","fa-odnoklassniki","fa-odnoklassniki-square","fa-opencart","fa-openid","fa-opera","fa-optin-monster","fa-outdent","fa-pagelines","fa-paint-brush","fa-paper-plane","fa-paper-plane-o","fa-paperclip","fa-paragraph","fa-paste","fa-pause","fa-pause-circle","fa-pause-circle-o","fa-paw","fa-paypal","fa-pencil","fa-pencil-square","fa-pencil-square-o","fa-percent","fa-phone","fa-phone-square","fa-photo","fa-picture-o","fa-pie-chart","fa-pied-piper","fa-pied-piper-alt","fa-pied-piper-pp","fa-pinterest","fa-pinterest-p","fa-pinterest-square","fa-plane","fa-play","fa-play-circle","fa-play-circle-o","fa-plug","fa-plus","fa-plus-circle","fa-plus-square","fa-plus-square-o","fa-podcast","fa-power-off","fa-print","fa-product-hunt","fa-puzzle-piece","fa-qq","fa-qrcode","fa-question","fa-question-circle","fa-question-circle-o","fa-quora","fa-quote-left","fa-quote-right","fa-ra","fa-random","fa-ravelry","fa-rebel","fa-recycle","fa-reddit","fa-reddit-alien","fa-reddit-square","fa-refresh","fa-registered","fa-remove","fa-renren","fa-reorder","fa-repeat","fa-reply","fa-reply-all","fa-resistance","fa-retweet","fa-rmb","fa-road","fa-rocket","fa-rotate-left","fa-rotate-right","fa-rouble","fa-rss","fa-rss-square","fa-rub","fa-ruble","fa-rupee","fa-s15","fa-safari","fa-save","fa-scissors","fa-scribd","fa-search","fa-search-minus","fa-search-plus","fa-sellsy","fa-send","fa-send-o","fa-server","fa-share","fa-share-alt","fa-share-alt-square","fa-share-square","fa-share-square-o","fa-shekel","fa-sheqel","fa-shield","fa-ship","fa-shirtsinbulk","fa-shopping-bag","fa-shopping-basket","fa-shopping-cart","fa-shower","fa-sign-in","fa-sign-language","fa-sign-out","fa-signal","fa-signing","fa-simplybuilt","fa-sitemap","fa-skyatlas","fa-skype","fa-slack","fa-sliders","fa-slideshare","fa-smile-o","fa-snapchat","fa-snapchat-ghost","fa-snapchat-square","fa-snowflake-o","fa-soccer-ball-o","fa-sort","fa-sort-alpha-asc","fa-sort-alpha-desc","fa-sort-amount-asc","fa-sort-amount-desc","fa-sort-asc","fa-sort-desc","fa-sort-down","fa-sort-numeric-asc","fa-sort-numeric-desc","fa-sort-up","fa-soundcloud","fa-space-shuttle","fa-spinner","fa-spoon","fa-spotify","fa-square","fa-square-o","fa-stack-exchange","fa-stack-overflow","fa-star","fa-star-half","fa-star-half-empty","fa-star-half-full","fa-star-half-o","fa-star-o","fa-steam","fa-steam-square","fa-step-backward","fa-step-forward","fa-stethoscope","fa-sticky-note","fa-sticky-note-o","fa-stop","fa-stop-circle","fa-stop-circle-o","fa-street-view","fa-strikethrough","fa-stumbleupon","fa-stumbleupon-circle","fa-subscript","fa-subway","fa-suitcase","fa-sun-o","fa-superpowers","fa-superscript","fa-support","fa-table","fa-tablet","fa-tachometer","fa-tag","fa-tags","fa-tasks","fa-taxi","fa-telegram","fa-television","fa-tencent-weibo","fa-terminal","fa-text-height","fa-text-width","fa-th","fa-th-large","fa-th-list","fa-themeisle","fa-thermometer","fa-thermometer-0","fa-thermometer-1","fa-thermometer-2","fa-thermometer-3","fa-thermometer-4","fa-thermometer-empty","fa-thermometer-full","fa-thermometer-half","fa-thermometer-quarter","fa-thermometer-three-quarters","fa-thumb-tack","fa-thumbs-down","fa-thumbs-o-down","fa-thumbs-o-up","fa-thumbs-up","fa-ticket","fa-times","fa-times-circle","fa-times-circle-o","fa-times-rectangle","fa-times-rectangle-o","fa-tint","fa-toggle-down","fa-toggle-left","fa-toggle-off","fa-toggle-on","fa-toggle-right","fa-toggle-up","fa-trademark","fa-train","fa-transgender","fa-transgender-alt","fa-trash","fa-trash-o","fa-tree","fa-trello","fa-tripadvisor","fa-trophy","fa-truck","fa-try","fa-tty","fa-tumblr","fa-tumblr-square","fa-turkish-lira","fa-tv","fa-twitch","fa-twitter","fa-twitter-square","fa-umbrella","fa-underline","fa-undo","fa-universal-access","fa-university","fa-unlink","fa-unlock","fa-unlock-alt","fa-unsorted","fa-upload","fa-usb","fa-usd","fa-user","fa-user-circle","fa-user-circle-o","fa-user-md","fa-user-o","fa-user-plus","fa-user-secret","fa-user-times","fa-users","fa-vcard","fa-vcard-o","fa-venus","fa-venus-double","fa-venus-mars","fa-viacoin","fa-viadeo","fa-viadeo-square","fa-video-camera","fa-vimeo","fa-vimeo-square","fa-vine","fa-vk","fa-volume-control-phone","fa-volume-down","fa-volume-off","fa-volume-up","fa-warning","fa-wechat","fa-weibo","fa-weixin","fa-whatsapp","fa-wheelchair","fa-wheelchair-alt","fa-wifi","fa-wikipedia-w","fa-window-close","fa-window-close-o","fa-window-maximize","fa-window-minimize","fa-window-restore","fa-windows","fa-won","fa-wordpress","fa-wpbeginner","fa-wpexplorer","fa-wpforms","fa-wrench","fa-xing","fa-xing-square","fa-y-combinator","fa-y-combinator-square","fa-yahoo","fa-yc","fa-yc-square","fa-yelp","fa-yen","fa-yoast","fa-youtube","fa-youtube-play","fa-youtube-square"]});
obfx_modules/mystock-import/css/media.css ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .obfx-image-list {
2
+ overflow: auto;
3
+ position: absolute;
4
+ top: 50px;
5
+ right: 300px;
6
+ bottom: 0;
7
+ left: 0;
8
+ margin: 0;
9
+ padding: 2px 8px 8px;
10
+ outline: 0;
11
+
12
+ -webkit-overflow-scrolling: touch;
13
+ }
14
+
15
+ .obfx-preview {
16
+ position: relative;
17
+ background: #eee;
18
+ box-shadow: inset 0 0 15px rgba(0,0,0,0.1), inset 0 0 0 1px rgba(0,0,0,0.05);
19
+ cursor: pointer;
20
+ }
21
+
22
+ .obfx-preview:before {
23
+ display: block;
24
+ padding-top: 100%;
25
+ content: "";
26
+ }
27
+
28
+ .obfx-preview .thumbnail {
29
+ overflow: hidden;
30
+ position: absolute;
31
+ top: 0;
32
+ right: 0;
33
+ bottom: 0;
34
+ left: 0;
35
+ opacity: 1;
36
+ -webkit-transition: opacity 0.1s;
37
+ transition: opacity 0.1s;
38
+ }
39
+
40
+ .obfx-preview .thumbnail:after {
41
+ display: block;
42
+ overflow: hidden;
43
+ position: absolute;
44
+ top: 0;
45
+ right: 0;
46
+ bottom: 0;
47
+ left: 0;
48
+ box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
49
+ content: "";
50
+ }
51
+
52
+ .obfx-preview .thumbnail .centered {
53
+ position: absolute;
54
+ top: 0;
55
+ left: 0;
56
+ width: 100%;
57
+ height: 100%;
58
+ -webkit-transform: translate(50%,50%);
59
+ -ms-transform: translate(50%,50%);
60
+ transform: translate(50%,50%);
61
+ }
62
+
63
+ .obfx-preview .thumbnail .centered img {
64
+ -webkit-transform: translate(-50%,-50%);
65
+ -ms-transform: translate(-50%,-50%);
66
+ transform: translate(-50%,-50%);
67
+ }
68
+
69
+ .obfx-image {
70
+ float: left;
71
+ position: relative;
72
+ box-sizing: border-box;
73
+ width: 20%;
74
+ margin: 0;
75
+ padding: 8px;
76
+ color: #444;
77
+ text-align: center;
78
+ list-style: none;
79
+ cursor: pointer;
80
+ -webkit-user-select: none;
81
+ -moz-user-select: none;
82
+ -ms-user-select: none;
83
+ user-select: none;
84
+ }
85
+
86
+ .obfx-image-list .obfx-image.details {
87
+ box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 7px #0073aa;
88
+ }
89
+
90
+ .obfx-image-list .obfx-image.details .check,
91
+ .obfx-image-list .obfx-image.selected .check:focus {
92
+ display: block;
93
+ background-color: #0073aa;
94
+ box-shadow: 0 0 0 1px #fff, 0 0 0 2px #0073aa;
95
+ }
96
+
97
+ .obfx-image-list .obfx-image .check {
98
+ display: none;
99
+ position: absolute;
100
+ z-index: 10;
101
+ top: 0;
102
+ right: 0;
103
+ width: 24px;
104
+ height: 24px;
105
+ padding: 0;
106
+ border: 0;
107
+ outline: 0;
108
+ background: #eee;
109
+ box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(0, 0, 0, 0.15);
110
+ cursor: pointer;
111
+ }
112
+
113
+ .obfx-image-list .obfx-image.details .check:hover .media-modal-icon,
114
+ .obfx-image-list .obfx-image.selected .check:focus .media-modal-icon {
115
+ background-position: -60px 0;
116
+ }
117
+
118
+ .obfx-image-list .obfx-image.details .check .media-modal-icon {
119
+ background-position: -21px 0;
120
+ }
121
+
122
+ .obfx-image-list .obfx-image .check:hover .media-modal-icon {
123
+ background-position: -40px 0;
124
+ }
125
+
126
+ .obfx-image-list .obfx-image .check .media-modal-icon {
127
+ display: block;
128
+ width: 15px;
129
+ height: 15px;
130
+ margin: 5px;
131
+ background-position: -1px 0;
132
+ }
133
+
134
+ .obfx-image-list .media-modal-icon {
135
+ background-image: url(../../../../../../wp-includes/images/uploader-icons.png);
136
+ background-repeat: no-repeat;
137
+ }
138
+
139
+ .wp-core-ui .button.obfx-import-media {
140
+ float: right;
141
+ margin-top: 10px;
142
+ }
143
+
144
+ .attachement-settings {
145
+ float: right;
146
+ width: 100%;
147
+ }
148
+
149
+ .attachement-settings .name {
150
+ padding-right: 10px;
151
+ }
152
+
153
+ .attachement-loading {
154
+ float: left;
155
+ width: 100%;
156
+ text-align: center;
157
+ }
158
+
159
+ .attachement-loading .spinner {
160
+ float: none;
161
+ width: auto;
162
+ height: auto;
163
+ padding: 10px;
164
+ }
165
+
166
+ .obfx_spinner {
167
+ background: url('/wp-admin/images/wpspin_light.gif') no-repeat;
168
+ background-size: 16px 16px;
169
+ display: none;
170
+ opacity: .7;
171
+ filter: alpha(opacity=70);
172
+ width: 16px;
173
+ height: 16px;
174
+ margin: 5px 35%;
175
+ }
obfx_modules/mystock-import/inc/photos.php ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Template used for photo rendering.
4
+ *
5
+ * @package OBFX
6
+ */
7
+
8
+ ?>
9
+ <div id='obfx-mystock' data-pagenb="1">
10
+ <ul class='obfx-image-list'>
11
+ <?php
12
+ if ( ! empty( $urls ) ) {
13
+ foreach ( $urls as $photo ) {
14
+ $pid = $photo['id'];
15
+ if ( ! empty( $pid ) ) {
16
+ $thumb = $photo['url_m'];
17
+ ?>
18
+ <li class='obfx-image' data-page="1" data-pid="<?php echo esc_attr( $pid ); ?>">
19
+ <div class="obfx-preview">
20
+ <div class="thumbnail">
21
+ <div class="centered">
22
+ <img src='<?php echo esc_url( $thumb ); ?>'>
23
+ </div>
24
+ </div>
25
+ </div>
26
+ <button type="button" class="check obfx-image-check" tabindex="0">
27
+ <span class="media-modal-icon"></span>
28
+ <span class="screen-reader-text"><?php esc_html_e( 'Deselect', 'themeisle-companion' ); ?></span>
29
+ </button>
30
+ </li>
31
+ <?php
32
+ }
33
+ }
34
+ }
35
+ ?>
36
+ </ul>
37
+ <div class="obfx_spinner"></div>
38
+ <div class="media-sidebar"></div>
39
+ </div>
obfx_modules/mystock-import/init.php ADDED
@@ -0,0 +1,315 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The module for mystock import.
4
+ *
5
+ * @link https://themeisle.com
6
+ * @since 1.0.0
7
+ *
8
+ * @package Mystock_Import_OBFX_Module
9
+ */
10
+
11
+ /**
12
+ * The class for mystock import.
13
+ *
14
+ * @package Mystock_Import_OBFX_Module
15
+ * @author Themeisle <friends@themeisle.com>
16
+ * @codeCoverageIgnore
17
+ */
18
+ class Mystock_Import_OBFX_Module extends Orbit_Fox_Module_Abstract {
19
+
20
+ /**
21
+ * The api key.
22
+ */
23
+ const API_KEY = '97d007cf8f44203a2e578841a2c0f9ac';
24
+
25
+ /**
26
+ * The number of images to fetch. Only the first page will be fetched.
27
+ */
28
+ const MAX_IMAGES = 40;
29
+
30
+ /**
31
+ * The username of the flickr account.
32
+ */
33
+ const USER_NAME = 'themeisle';
34
+
35
+ /**
36
+ * The cache time.
37
+ */
38
+ const CACHE_DAYS = 7;
39
+
40
+
41
+ /**
42
+ * Mystock_Import_OBFX_Module constructor.
43
+ *
44
+ * @since 1.0.0
45
+ * @access public
46
+ */
47
+ public function __construct() {
48
+ parent::__construct();
49
+ $this->name = __( 'Mystock Import', 'themeisle-companion' );
50
+ $this->description = __( 'Module to import images directly from', 'themeisle-companion' ) . sprintf( ' <a href="%s" target="_blank">mystock.photos</a>', 'https://mystock.photos' );
51
+ }
52
+
53
+
54
+ /**
55
+ * Determine if module should be loaded.
56
+ *
57
+ * @since 1.0.0
58
+ * @access public
59
+ * @return bool
60
+ */
61
+ public function enable_module() {
62
+ return true;
63
+ }
64
+
65
+ /**
66
+ * The loading logic for the module.
67
+ *
68
+ * @since 1.0.0
69
+ * @access public
70
+ */
71
+ public function load() {
72
+ }
73
+
74
+ /**
75
+ * Method to define hooks needed.
76
+ *
77
+ * @since 1.0.0
78
+ * @access public
79
+ */
80
+ public function hooks() {
81
+
82
+ /*Get tab content*/
83
+ $this->loader->add_action( 'wp_ajax_get-tab-' . $this->slug, $this, 'get_tab_content' );
84
+ $this->loader->add_action( 'wp_ajax_' . $this->slug, $this, 'display_photo_sizes' );
85
+ $this->loader->add_action( 'wp_ajax_infinite-' . $this->slug, $this, 'infinite_scroll' );
86
+ $this->loader->add_action( 'wp_ajax_handle-request-' . $this->slug, $this, 'handle_request' );
87
+ }
88
+
89
+ /**
90
+ * Display tab content.
91
+ */
92
+ public function get_tab_content() {
93
+ $urls = $this->get_images();
94
+ require $this->get_dir() . "/inc/photos.php";
95
+ wp_die();
96
+ }
97
+
98
+ /**
99
+ * Request images from flickr.
100
+ *
101
+ * @param int $page Page to load.
102
+ *
103
+ * @return array
104
+ */
105
+ private function get_images( $page = 1 ) {
106
+ $photos = get_transient( $this->slug . 'photos_' . self::MAX_IMAGES . '_' . $page );
107
+ if ( ! $photos ) {
108
+ require_once $this->get_dir() . '/vendor/phpflickr/phpflickr.php';
109
+ $api = new phpFlickr( self::API_KEY );
110
+ $user = $api->people_findByUsername( self::USER_NAME );
111
+ $photos = array();
112
+ if ( $user && isset( $user['nsid'] ) ) {
113
+ $photos = $api->people_getPublicPhotos( $user['nsid'], null, 'url_sq, url_t, url_s, url_q, url_m, url_n, url_z, url_c, url_l, url_o', self::MAX_IMAGES, $page );
114
+ if ( ! empty( $photos ) ) {
115
+ $photos = $photos['photos']['photo'];
116
+ }
117
+ }
118
+ set_transient( $this->slug . 'photos_' . self::MAX_IMAGES . '_' . $page, $photos, self::CACHE_DAYS * DAY_IN_SECONDS );
119
+ }
120
+
121
+ return $photos;
122
+ }
123
+
124
+ /**
125
+ * Upload image.
126
+ */
127
+ function handle_request() {
128
+ check_ajax_referer( $this->slug . filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP ), 'security' );
129
+
130
+ if ( ! isset( $_POST['formdata'] ) ) {
131
+ echo esc_html__( 'Image failed to upload', 'themeisle-companion' );
132
+ wp_die();
133
+ }
134
+
135
+ $data = array();
136
+ parse_str( $_POST['formdata'], $data );
137
+ if ( empty( $data['imagesizes'] ) ) {
138
+ echo esc_html__( 'Image failed to upload', 'themeisle-companion' );
139
+ wp_die();
140
+ }
141
+ $url = $data['imagesizes'];
142
+ $name = basename( $url );
143
+ $tmp_file = download_url( $url );
144
+ if ( is_wp_error( $tmp_file ) ) {
145
+ echo esc_html__( 'Image failed to upload', 'themeisle-companion' );
146
+ wp_die();
147
+ }
148
+ $file = array();
149
+ $file['name'] = $name;
150
+ $file['tmp_name'] = $tmp_file;
151
+ $image_id = media_handle_sideload( $file, 0 );
152
+ if ( is_wp_error( $image_id ) ) {
153
+ echo esc_html__( 'Image failed to upload', 'themeisle-companion' );
154
+ wp_die();
155
+ }
156
+ $attach_data = wp_generate_attachment_metadata( $image_id, get_attached_file( $image_id ) );
157
+ if ( is_wp_error( $attach_data ) ) {
158
+ echo esc_html__( 'Image failed to upload', 'themeisle-companion' );
159
+ wp_die();
160
+ }
161
+ wp_update_attachment_metadata( $image_id, $attach_data );
162
+ }
163
+
164
+ /**
165
+ * Ajax function to load new images.
166
+ */
167
+ function infinite_scroll() {
168
+ check_ajax_referer( $this->slug . filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP ), 'security' );
169
+
170
+ if ( ! isset( $_POST['page'] ) ) {
171
+ wp_die();
172
+ }
173
+
174
+ //Update last page that was loaded
175
+ $req_page = (int) $_POST['page'] + 1;
176
+
177
+ //Request new page
178
+ $response = '';
179
+ $new_request = $this->get_images( $req_page );
180
+ if ( ! empty( $new_request ) ) {
181
+ foreach ( $new_request as $photo ) {
182
+ $response .= '<li class="obfx-image" data-page="' . esc_attr( $req_page ) . '" data-pid="' . esc_attr( $photo['id'] ) . '">';
183
+ $response .= '<div class="obfx-preview"><div class="thumbnail"><div class="centered">';
184
+ $response .= '<img src="' . esc_url( $photo['url_m'] ) . '">';
185
+ $response .= '</div></div></div>';
186
+ $response .= '<button type="button" class="check obfx-image-check" tabindex="0"><span class="media-modal-icon"></span><span class="screen-reader-text">' . esc_html__( 'Deselect', 'themeisle-companion' ) . '</span></button>';
187
+ $response .= '</li>';
188
+ }
189
+ }
190
+
191
+ echo $response;
192
+ wp_die();
193
+ }
194
+
195
+ /**
196
+ * Ajax function to display image sizes.
197
+ */
198
+ public function display_photo_sizes() {
199
+
200
+ check_ajax_referer( $this->slug . filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP ), 'security' );
201
+
202
+ $photo_id = $_POST['pid'];
203
+ $page = $_POST['page'];
204
+ if ( empty( $photo_id ) || empty( $page ) ) {
205
+ wp_die();
206
+ }
207
+ $data = $this->get_images( $page );
208
+ $photo = array_filter( $data, function ( $e ) use ( $photo_id ) {
209
+ return $e['id'] === $photo_id;
210
+ }, true );
211
+ $photo = array_pop( array_reverse( $photo ) );
212
+ if ( empty( $photo ) ) {
213
+ wp_die();
214
+ }
215
+ $photo_sizes = array(
216
+ 'url_sq' => __( 'Square', 'themeisle-companion' ),
217
+ 'url_q' => __( 'Large Square', 'themeisle-companion' ),
218
+ 'url_t' => __( 'Thumbnail', 'themeisle-companion' ),
219
+ 'url_s' => __( 'Small', 'themeisle-companion' ),
220
+ 'url_n' => __( 'Small 320', 'themeisle-companion' ),
221
+ 'url_m' => __( 'Medium', 'themeisle-companion' ),
222
+ 'url_z' => __( 'Medium 640', 'themeisle-companion' ),
223
+ 'url_c' => __( 'Medium 800', 'themeisle-companion' ),
224
+ 'url_l' => __( 'Large', 'themeisle-companion' ),
225
+ 'url_o' => __( 'Original', 'themeisle-companion' ),
226
+ );
227
+
228
+ /**
229
+ * Creating response for selected image
230
+ */
231
+ $response = '<div class="attachment-details">';
232
+ $response .= '<form id="importmsp" method="post">';
233
+ $response .= '<h2>' . esc_html__( 'Attachement display settings', 'themeisle-companion' ) . '</h2><hr/>';
234
+ $response .= '<label class="attachement-settings">';
235
+ $response .= '<span class="name">' . esc_html__( 'Size', 'themeisle-companion' ) . '</span>';
236
+ $response .= '<select name="imagesizes">';
237
+ foreach ( $photo_sizes as $key => $label ) {
238
+ $response .= '<option value="' . esc_url( $photo[ $key ] ) . '">' . esc_html( $label ) . '</option>';
239
+ }
240
+ $response .= '</select>';
241
+ $response .= '</label>';
242
+
243
+ $response .= '<input type="submit" class="button obfx-import-media" value="Import media"/>';
244
+ $response .= '</form>';
245
+ $response .= '</div>';
246
+ echo $response;
247
+ wp_die();
248
+ }
249
+
250
+ /**
251
+ * Method that returns an array of scripts and styles to be loaded
252
+ * for the front end part.
253
+ *
254
+ * @since 1.0.0
255
+ * @access public
256
+ * @return array
257
+ */
258
+ public function public_enqueue() {
259
+ return array();
260
+ }
261
+
262
+ /**
263
+ * Method that returns an array of scripts and styles to be loaded
264
+ * for the admin part.
265
+ *
266
+ * @since 1.0.0
267
+ * @access public
268
+ * @return array
269
+ */
270
+ public function admin_enqueue() {
271
+ $current_screen = get_current_screen();
272
+
273
+ if ( ! isset( $current_screen->id ) ) {
274
+ return array();
275
+ }
276
+ if ( ! in_array( $current_screen->id, array( 'post', 'page', 'post-new', 'upload' ) ) ) {
277
+ return array();
278
+ }
279
+
280
+ $this->localized = array(
281
+ 'admin' => array(
282
+ 'ajaxurl' => admin_url( 'admin-ajax.php' ),
283
+ 'nonce' => wp_create_nonce( $this->slug . filter_input( INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP ) ),
284
+ 'l10n' => array(
285
+ 'fetch_image_sizes' => esc_html__( 'Fetching data', 'themeisle-companion' ),
286
+ 'upload_image' => esc_html__( 'Downloading image. Please wait...', 'themeisle-companion' ),
287
+ 'upload_image_complete' => esc_html__( 'Your image was imported. Go to Media Library tab to use it.', 'themeisle-companion' ),
288
+ 'load_more' => esc_html__( 'Loading more photos...', 'themeisle-companion' ),
289
+ 'tab_name' => esc_html__( 'MyStock Library', 'themeisle-companion' ),
290
+ ),
291
+ 'slug' => $this->slug,
292
+ ),
293
+ );
294
+
295
+ return array(
296
+ 'js' => array(
297
+ 'admin' => array( 'media-views' ),
298
+ ),
299
+ 'css' => array(
300
+ 'media' => array(),
301
+ ),
302
+ );
303
+ }
304
+
305
+ /**
306
+ * Method to define the options fields for the module
307
+ *
308
+ * @since 1.0.0
309
+ * @access public
310
+ * @return array
311
+ */
312
+ public function options() {
313
+ return array();
314
+ }
315
+ }
obfx_modules/mystock-import/js/admin.js ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global _wpMediaViewsL10n, mystock_import, jQuery */
2
+ (function ($) {
3
+ var media = wp.media,
4
+ l10n = media.view.l10n = typeof _wpMediaViewsL10n === 'undefined' ? {} : _wpMediaViewsL10n;
5
+
6
+ media.view.MediaFrame.Select.prototype.browseRouter = function (view) {
7
+ view.set({
8
+ upload: {
9
+ text: l10n.uploadFilesTitle,
10
+ priority: 20
11
+ },
12
+ browse: {
13
+ text: l10n.mediaLibraryTitle,
14
+ priority: 30
15
+ },
16
+ mystock: {
17
+ text: mystock_import.l10n.tab_name,
18
+ priority: 40
19
+ }
20
+ });
21
+ };
22
+
23
+ var bindHandlers = media.view.MediaFrame.Select.prototype.bindHandlers;
24
+
25
+ media.view.MediaFrame.Select.prototype.bindHandlers = function () {
26
+ bindHandlers.apply(this, arguments);
27
+ this.on('content:create:mystock', this.mystockContent, this);
28
+ };
29
+
30
+ media.view.MediaFrame.Select.prototype.mystockContent = function ( contentRegion ) {
31
+ var state = this.state();
32
+
33
+ this.$el.removeClass('hide-toolbar');
34
+
35
+ contentRegion.view = new wp.media.view.RemotePhotos({
36
+ controller: this,
37
+ collection: state.get('library'),
38
+ selection: state.get('selection'),
39
+ model: state,
40
+ sortable: state.get('sortable'),
41
+ search: state.get('searchable'),
42
+ filters: state.get('filterable'),
43
+ date: state.get('date'),
44
+ display: state.has('display') ? state.get('display') : state.get('displaySettings'),
45
+ dragInfo: state.get('dragInfo'),
46
+
47
+ idealColumnWidth: state.get('idealColumnWidth'),
48
+ suggestedWidth: state.get('suggestedWidth'),
49
+ suggestedHeight: state.get('suggestedHeight'),
50
+
51
+ AttachmentView: state.get('AttachmentView')
52
+ });
53
+ };
54
+
55
+ media.view.RemotePhotos = media.View.extend({
56
+ tagName: 'div',
57
+ className: 'obfx-attachments-browser',
58
+
59
+ initialize: function () {
60
+ // _.defaults(this.options, {});
61
+ var container = this.$el;
62
+ $(container).html('<div class="obfx_spinner"></div>');
63
+ this.loadContent( container,this );
64
+ this.selectItem();
65
+ this.deselectItem();
66
+ this.displayDetails();
67
+ this.handleRequest();
68
+ },
69
+
70
+ showSpinner: function(container) {
71
+ $(container).find('.obfx_spinner').show();
72
+ },
73
+ hideSpinner: function(container) {
74
+ $(container).find('.obfx_spinner').hide();
75
+ },
76
+ loadContent: function(container, frame){
77
+ this.showSpinner(container);
78
+ $.ajax({
79
+ type : 'POST',
80
+ data : {
81
+ action: 'get-tab-' + mystock_import.slug,
82
+ security : mystock_import.nonce
83
+ },
84
+ url : mystock_import.ajaxurl,
85
+ success : function(response) {
86
+ container.html(response);
87
+ frame.infiniteScroll(container, frame);
88
+ }
89
+ });
90
+ },
91
+
92
+ selectItem : function(){
93
+ $(document).on('click', '.obfx-image', function () {
94
+ $('.obfx-image').removeClass('selected details');
95
+ $(this).addClass('selected details');
96
+ });
97
+ },
98
+
99
+ deselectItem :function () {
100
+ $(document).on('click', '.obfx-image-check', function (e) {
101
+ e.stopPropagation();
102
+ $(this).parent().removeClass('selected details');
103
+ $('#obfx-mystock').find('.media-sidebar').html('');
104
+ });
105
+ },
106
+
107
+ infiniteScroll : function (container, frame) {
108
+ $('#obfx-mystock .obfx-image-list').on('scroll',function() {
109
+ if($(this).scrollTop() + $(this).innerHeight() + 10 >= $(this)[0].scrollHeight) {
110
+ frame.showSpinner(container);
111
+ $.ajax({
112
+ type : 'POST',
113
+ data : {
114
+ 'action': 'infinite-' + mystock_import.slug,
115
+ 'page' : $('#obfx-mystock').data('pagenb'),
116
+ 'security' : mystock_import.nonce
117
+ },
118
+ url : mystock_import.ajaxurl,
119
+ success : function(response) {
120
+ if( response ) {
121
+ var imageList = $('.obfx-image-list');
122
+ var listWrapper = $('#obfx-mystock');
123
+ var page = listWrapper.data('pagenb');
124
+ var nextPage = parseInt(page) + 1;
125
+ listWrapper.data('pagenb', nextPage);
126
+ imageList.append(response);
127
+ }
128
+ frame.hideSpinner(container);
129
+ }
130
+
131
+ });
132
+ }
133
+ });
134
+ },
135
+
136
+ displayDetails : function () {
137
+ $(document).on('click', '.obfx-image', function () {
138
+ var th = $(this);
139
+
140
+ $.ajax({
141
+ type : 'POST',
142
+ data : {
143
+ 'action': mystock_import.slug,
144
+ 'pid' : $(this).data('pid'),
145
+ 'page' : $(this).data('page'),
146
+ 'security' : mystock_import.nonce
147
+ },
148
+ url : mystock_import.ajaxurl,
149
+ beforeSend : function () {
150
+ var text = mystock_import.l10n.fetch_image_sizes;
151
+ var data = '<div class="attachement-loading"><h2>'+ text +'</h2><div class="spinner is-active"></div></div>';
152
+ th.parent().parent().find('.media-sidebar').html(data);
153
+ },
154
+ success : function(response) {
155
+ th.parent().parent().find('.media-sidebar').html(response);
156
+ }
157
+
158
+ });
159
+ });
160
+ },
161
+
162
+ handleRequest : function () {
163
+ $(document).on('submit','#obfx-mystock #importmsp', function (e) {
164
+ var mediaContainer = $('#obfx-mystock').find('.media-sidebar');
165
+ $.ajax({
166
+ type : 'POST',
167
+ data : {
168
+ 'action': 'handle-request-' + mystock_import.slug,
169
+ 'formdata' : $('#importmsp').serialize(),
170
+ 'security' : mystock_import.nonce
171
+ },
172
+ url : mystock_import.ajaxurl,
173
+ beforeSend : function () {
174
+ var text = mystock_import.l10n.upload_image;
175
+ var data = '<div class="attachement-loading"><h2>'+ text +'</h2><div class="spinner is-active"></div></div>';
176
+ mediaContainer.html(data);
177
+ },
178
+ success : function() {
179
+ var text = mystock_import.l10n.upload_image_complete;
180
+ var data = '<div class="attachement-loading"><h2>'+ text +'</h2></div>';
181
+ mediaContainer.html(data);
182
+ wp.media.frame.content.get('library').collection.props.set({ '__ignore_force_update': (+ new Date()) });
183
+ }
184
+ });
185
+ e.preventDefault(); // avoid to execute the actual submit of the form.
186
+ });
187
+ }
188
+ });
189
+ })(jQuery);
obfx_modules/mystock-import/vendor/phpflickr/LICENSE ADDED
@@ -0,0 +1,339 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 2, June 1991
3
+
4
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
5
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
+ Everyone is permitted to copy and distribute verbatim copies
7
+ of this license document, but changing it is not allowed.
8
+
9
+ Preamble
10
+
11
+ The licenses for most software are designed to take away your
12
+ freedom to share and change it. By contrast, the GNU General Public
13
+ License is intended to guarantee your freedom to share and change free
14
+ software--to make sure the software is free for all its users. This
15
+ General Public License applies to most of the Free Software
16
+ Foundation's software and to any other program whose authors commit to
17
+ using it. (Some other Free Software Foundation software is covered by
18
+ the GNU Lesser General Public License instead.) You can apply it to
19
+ your programs, too.
20
+
21
+ When we speak of free software, we are referring to freedom, not
22
+ price. Our General Public Licenses are designed to make sure that you
23
+ have the freedom to distribute copies of free software (and charge for
24
+ this service if you wish), that you receive source code or can get it
25
+ if you want it, that you can change the software or use pieces of it
26
+ in new free programs; and that you know you can do these things.
27
+
28
+ To protect your rights, we need to make restrictions that forbid
29
+ anyone to deny you these rights or to ask you to surrender the rights.
30
+ These restrictions translate to certain responsibilities for you if you
31
+ distribute copies of the software, or if you modify it.
32
+
33
+ For example, if you distribute copies of such a program, whether
34
+ gratis or for a fee, you must give the recipients all the rights that
35
+ you have. You must make sure that they, too, receive or can get the
36
+ source code. And you must show them these terms so they know their
37
+ rights.
38
+
39
+ We protect your rights with two steps: (1) copyright the software, and
40
+ (2) offer you this license which gives you legal permission to copy,
41
+ distribute and/or modify the software.
42
+
43
+ Also, for each author's protection and ours, we want to make certain
44
+ that everyone understands that there is no warranty for this free
45
+ software. If the software is modified by someone else and passed on, we
46
+ want its recipients to know that what they have is not the original, so
47
+ that any problems introduced by others will not reflect on the original
48
+ authors' reputations.
49
+
50
+ Finally, any free program is threatened constantly by software
51
+ patents. We wish to avoid the danger that redistributors of a free
52
+ program will individually obtain patent licenses, in effect making the
53
+ program proprietary. To prevent this, we have made it clear that any
54
+ patent must be licensed for everyone's free use or not licensed at all.
55
+
56
+ The precise terms and conditions for copying, distribution and
57
+ modification follow.
58
+
59
+ GNU GENERAL PUBLIC LICENSE
60
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+
62
+ 0. This License applies to any program or other work which contains
63
+ a notice placed by the copyright holder saying it may be distributed
64
+ under the terms of this General Public License. The "Program", below,
65
+ refers to any such program or work, and a "work based on the Program"
66
+ means either the Program or any derivative work under copyright law:
67
+ that is to say, a work containing the Program or a portion of it,
68
+ either verbatim or with modifications and/or translated into another
69
+ language. (Hereinafter, translation is included without limitation in
70
+ the term "modification".) Each licensee is addressed as "you".
71
+
72
+ Activities other than copying, distribution and modification are not
73
+ covered by this License; they are outside its scope. The act of
74
+ running the Program is not restricted, and the output from the Program
75
+ is covered only if its contents constitute a work based on the
76
+ Program (independent of having been made by running the Program).
77
+ Whether that is true depends on what the Program does.
78
+
79
+ 1. You may copy and distribute verbatim copies of the Program's
80
+ source code as you receive it, in any medium, provided that you
81
+ conspicuously and appropriately publish on each copy an appropriate
82
+ copyright notice and disclaimer of warranty; keep intact all the
83
+ notices that refer to this License and to the absence of any warranty;
84
+ and give any other recipients of the Program a copy of this License
85
+ along with the Program.
86
+
87
+ You may charge a fee for the physical act of transferring a copy, and
88
+ you may at your option offer warranty protection in exchange for a fee.
89
+
90
+ 2. You may modify your copy or copies of the Program or any portion
91
+ of it, thus forming a work based on the Program, and copy and
92
+ distribute such modifications or work under the terms of Section 1
93
+ above, provided that you also meet all of these conditions:
94
+
95
+ a) You must cause the modified files to carry prominent notices
96
+ stating that you changed the files and the date of any change.
97
+
98
+ b) You must cause any work that you distribute or publish, that in
99
+ whole or in part contains or is derived from the Program or any
100
+ part thereof, to be licensed as a whole at no charge to all third
101
+ parties under the terms of this License.
102
+
103
+ c) If the modified program normally reads commands interactively
104
+ when run, you must cause it, when started running for such
105
+ interactive use in the most ordinary way, to print or display an
106
+ announcement including an appropriate copyright notice and a
107
+ notice that there is no warranty (or else, saying that you provide
108
+ a warranty) and that users may redistribute the program under
109
+ these conditions, and telling the user how to view a copy of this
110
+ License. (Exception: if the Program itself is interactive but
111
+ does not normally print such an announcement, your work based on
112
+ the Program is not required to print an announcement.)
113
+
114
+ These requirements apply to the modified work as a whole. If
115
+ identifiable sections of that work are not derived from the Program,
116
+ and can be reasonably considered independent and separate works in
117
+ themselves, then this License, and its terms, do not apply to those
118
+ sections when you distribute them as separate works. But when you
119
+ distribute the same sections as part of a whole which is a work based
120
+ on the Program, the distribution of the whole must be on the terms of
121
+ this License, whose permissions for other licensees extend to the
122
+ entire whole, and thus to each and every part regardless of who wrote it.
123
+
124
+ Thus, it is not the intent of this section to claim rights or contest
125
+ your rights to work written entirely by you; rather, the intent is to
126
+ exercise the right to control the distribution of derivative or
127
+ collective works based on the Program.
128
+
129
+ In addition, mere aggregation of another work not based on the Program
130
+ with the Program (or with a work based on the Program) on a volume of
131
+ a storage or distribution medium does not bring the other work under
132
+ the scope of this License.
133
+
134
+ 3. You may copy and distribute the Program (or a work based on it,
135
+ under Section 2) in object code or executable form under the terms of
136
+ Sections 1 and 2 above provided that you also do one of the following:
137
+
138
+ a) Accompany it with the complete corresponding machine-readable
139
+ source code, which must be distributed under the terms of Sections
140
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
+
142
+ b) Accompany it with a written offer, valid for at least three
143
+ years, to give any third party, for a charge no more than your
144
+ cost of physically performing source distribution, a complete
145
+ machine-readable copy of the corresponding source code, to be
146
+ distributed under the terms of Sections 1 and 2 above on a medium
147
+ customarily used for software interchange; or,
148
+
149
+ c) Accompany it with the information you received as to the offer
150
+ to distribute corresponding source code. (This alternative is
151
+ allowed only for noncommercial distribution and only if you
152
+ received the program in object code or executable form with such
153
+ an offer, in accord with Subsection b above.)
154
+
155
+ The source code for a work means the preferred form of the work for
156
+ making modifications to it. For an executable work, complete source
157
+ code means all the source code for all modules it contains, plus any
158
+ associated interface definition files, plus the scripts used to
159
+ control compilation and installation of the executable. However, as a
160
+ special exception, the source code distributed need not include
161
+ anything that is normally distributed (in either source or binary
162
+ form) with the major components (compiler, kernel, and so on) of the
163
+ operating system on which the executable runs, unless that component
164
+ itself accompanies the executable.
165
+
166
+ If distribution of executable or object code is made by offering
167
+ access to copy from a designated place, then offering equivalent
168
+ access to copy the source code from the same place counts as
169
+ distribution of the source code, even though third parties are not
170
+ compelled to copy the source along with the object code.
171
+
172
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
+ except as expressly provided under this License. Any attempt
174
+ otherwise to copy, modify, sublicense or distribute the Program is
175
+ void, and will automatically terminate your rights under this License.
176
+ However, parties who have received copies, or rights, from you under
177
+ this License will not have their licenses terminated so long as such
178
+ parties remain in full compliance.
179
+
180
+ 5. You are not required to accept this License, since you have not
181
+ signed it. However, nothing else grants you permission to modify or
182
+ distribute the Program or its derivative works. These actions are
183
+ prohibited by law if you do not accept this License. Therefore, by
184
+ modifying or distributing the Program (or any work based on the
185
+ Program), you indicate your acceptance of this License to do so, and
186
+ all its terms and conditions for copying, distributing or modifying
187
+ the Program or works based on it.
188
+
189
+ 6. Each time you redistribute the Program (or any work based on the
190
+ Program), the recipient automatically receives a license from the
191
+ original licensor to copy, distribute or modify the Program subject to
192
+ these terms and conditions. You may not impose any further
193
+ restrictions on the recipients' exercise of the rights granted herein.
194
+ You are not responsible for enforcing compliance by third parties to
195
+ this License.
196
+
197
+ 7. If, as a consequence of a court judgment or allegation of patent
198
+ infringement or for any other reason (not limited to patent issues),
199
+ conditions are imposed on you (whether by court order, agreement or
200
+ otherwise) that contradict the conditions of this License, they do not
201
+ excuse you from the conditions of this License. If you cannot
202
+ distribute so as to satisfy simultaneously your obligations under this
203
+ License and any other pertinent obligations, then as a consequence you
204
+ may not distribute the Program at all. For example, if a patent
205
+ license would not permit royalty-free redistribution of the Program by
206
+ all those who receive copies directly or indirectly through you, then
207
+ the only way you could satisfy both it and this License would be to
208
+ refrain entirely from distribution of the Program.
209
+
210
+ If any portion of this section is held invalid or unenforceable under
211
+ any particular circumstance, the balance of the section is intended to
212
+ apply and the section as a whole is intended to apply in other
213
+ circumstances.
214
+
215
+ It is not the purpose of this section to induce you to infringe any
216
+ patents or other property right claims or to contest validity of any
217
+ such claims; this section has the sole purpose of protecting the
218
+ integrity of the free software distribution system, which is
219
+ implemented by public license practices. Many people have made
220
+ generous contributions to the wide range of software distributed
221
+ through that system in reliance on consistent application of that
222
+ system; it is up to the author/donor to decide if he or she is willing
223
+ to distribute software through any other system and a licensee cannot
224
+ impose that choice.
225
+
226
+ This section is intended to make thoroughly clear what is believed to
227
+ be a consequence of the rest of this License.
228
+
229
+ 8. If the distribution and/or use of the Program is restricted in
230
+ certain countries either by patents or by copyrighted interfaces, the
231
+ original copyright holder who places the Program under this License
232
+ may add an explicit geographical distribution limitation excluding
233
+ those countries, so that distribution is permitted only in or among
234
+ countries not thus excluded. In such case, this License incorporates
235
+ the limitation as if written in the body of this License.
236
+
237
+ 9. The Free Software Foundation may publish revised and/or new versions
238
+ of the General Public License from time to time. Such new versions will
239
+ be similar in spirit to the present version, but may differ in detail to
240
+ address new problems or concerns.
241
+
242
+ Each version is given a distinguishing version number. If the Program
243
+ specifies a version number of this License which applies to it and "any
244
+ later version", you have the option of following the terms and conditions
245
+ either of that version or of any later version published by the Free
246
+ Software Foundation. If the Program does not specify a version number of
247
+ this License, you may choose any version ever published by the Free Software
248
+ Foundation.
249
+
250
+ 10. If you wish to incorporate parts of the Program into other free
251
+ programs whose distribution conditions are different, write to the author
252
+ to ask for permission. For software which is copyrighted by the Free
253
+ Software Foundation, write to the Free Software Foundation; we sometimes
254
+ make exceptions for this. Our decision will be guided by the two goals
255
+ of preserving the free status of all derivatives of our free software and
256
+ of promoting the sharing and reuse of software generally.
257
+
258
+ NO WARRANTY
259
+
260
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
+ REPAIR OR CORRECTION.
269
+
270
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
+ POSSIBILITY OF SUCH DAMAGES.
279
+
280
+ END OF TERMS AND CONDITIONS
281
+
282
+ How to Apply These Terms to Your New Programs
283
+
284
+ If you develop a new program, and you want it to be of the greatest
285
+ possible use to the public, the best way to achieve this is to make it
286
+ free software which everyone can redistribute and change under these terms.
287
+
288
+ To do so, attach the following notices to the program. It is safest
289
+ to attach them to the start of each source file to most effectively
290
+ convey the exclusion of warranty; and each file should have at least
291
+ the "copyright" line and a pointer to where the full notice is found.
292
+
293
+ {description}
294
+ Copyright (C) {year} {fullname}
295
+
296
+ This program is free software; you can redistribute it and/or modify
297
+ it under the terms of the GNU General Public License as published by
298
+ the Free Software Foundation; either version 2 of the License, or
299
+ (at your option) any later version.
300
+
301
+ This program is distributed in the hope that it will be useful,
302
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
303
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
+ GNU General Public License for more details.
305
+
306
+ You should have received a copy of the GNU General Public License along
307
+ with this program; if not, write to the Free Software Foundation, Inc.,
308
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+
310
+ Also add information on how to contact you by electronic and paper mail.
311
+
312
+ If the program is interactive, make it output a short notice like this
313
+ when it starts in an interactive mode:
314
+
315
+ Gnomovision version 69, Copyright (C) year name of author
316
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
+ This is free software, and you are welcome to redistribute it
318
+ under certain conditions; type `show c' for details.
319
+
320
+ The hypothetical commands `show w' and `show c' should show the appropriate
321
+ parts of the General Public License. Of course, the commands you use may
322
+ be called something other than `show w' and `show c'; they could even be
323
+ mouse-clicks or menu items--whatever suits your program.
324
+
325
+ You should also get your employer (if you work as a programmer) or your
326
+ school, if any, to sign a "copyright disclaimer" for the program, if
327
+ necessary. Here is a sample; alter the names:
328
+
329
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
+
332
+ {signature of Ty Coon}, 1 April 1989
333
+ Ty Coon, President of Vice
334
+
335
+ This General Public License does not permit incorporating your program into
336
+ proprietary programs. If your program is a subroutine library, you may
337
+ consider it more useful to permit linking proprietary applications with the
338
+ library. If this is what you want to do, use the GNU Lesser General
339
+ Public License instead of this License.
obfx_modules/mystock-import/vendor/phpflickr/phpFlickr.php ADDED
@@ -0,0 +1,1828 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /* phpFlickr
3
+ * Written by Dan Coulter (dan@dancoulter.com)
4
+ * Project Home Page: http://github.com/dancoulter/phpflickr
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18
+ *
19
+ */
20
+ if ( !class_exists('phpFlickr') ) {
21
+ if (session_id() == "") {
22
+ @session_start();
23
+ }
24
+
25
+ class phpFlickr {
26
+ var $api_key;
27
+ var $secret;
28
+
29
+ var $rest_endpoint = 'https://api.flickr.com/services/rest/';
30
+ var $upload_endpoint = 'https://up.flickr.com/services/upload/';
31
+ var $replace_endpoint = 'https://up.flickr.com/services/replace/';
32
+ var $req;
33
+ var $response;
34
+ var $parsed_response;
35
+ var $cache = false;
36
+ var $cache_db = null;
37
+ var $cache_table = null;
38
+ var $cache_dir = null;
39
+ var $cache_expire = null;
40
+ var $cache_key = null;
41
+ var $last_request = null;
42
+ var $die_on_error;
43
+ var $error_code;
44
+ Var $error_msg;
45
+ var $token;
46
+ var $php_version;
47
+ var $custom_post = null, $custom_cache_get = null, $custom_cache_set = null;
48
+ var $sizes = array(
49
+ "square" => "_s",
50
+ "square_75" => "_s",
51
+ "square_150" => "_q",
52
+ "thumbnail" => "_t",
53
+ "small" => "_m",
54
+ "small_240" => "_m",
55
+ "small_320" => "_n",
56
+ "medium" => "",
57
+ "medium_500" => "",
58
+ "medium_640" => "_z",
59
+ "medium_800" => "_c",
60
+ "large" => "_b",
61
+ "large_1024" => "_b",
62
+ "large_1600" => "_h",
63
+ "large_2048" => "_k",
64
+ "original" => "_o",
65
+ );
66
+
67
+ public function get_sizes() {
68
+ return $this->sizes;
69
+ }
70
+
71
+ /*
72
+ * When your database cache table hits this many rows, a cleanup
73
+ * will occur to get rid of all of the old rows and cleanup the
74
+ * garbage in the table. For most personal apps, 1000 rows should
75
+ * be more than enough. If your site gets hit by a lot of traffic
76
+ * or you have a lot of disk space to spare, bump this number up.
77
+ * You should try to set it high enough that the cleanup only
78
+ * happens every once in a while, so this will depend on the growth
79
+ * of your table.
80
+ */
81
+ var $max_cache_rows = 1000;
82
+
83
+ function __construct ($api_key, $secret = NULL, $die_on_error = false) {
84
+ //The API Key must be set before any calls can be made. You can
85
+ //get your own at https://www.flickr.com/services/api/misc.api_keys.html
86
+ $this->api_key = $api_key;
87
+ $this->secret = $secret;
88
+ $this->die_on_error = $die_on_error;
89
+ $this->service = "flickr";
90
+
91
+ //Find the PHP version and store it for future reference
92
+ $this->php_version = explode("-", phpversion());
93
+ $this->php_version = explode(".", $this->php_version[0]);
94
+ }
95
+
96
+ function enableCache ($type, $connection, $cache_expire = 600, $table = 'flickr_cache') {
97
+ // Turns on caching. $type must be either "db" (for database caching) or "fs" (for filesystem).
98
+ // When using db, $connection must be a PEAR::DB connection string. Example:
99
+ // "mysql://user:password@server/database"
100
+ // If the $table, doesn't exist, it will attempt to create it.
101
+ // When using file system, caching, the $connection is the folder that the web server has write
102
+ // access to. Use absolute paths for best results. Relative paths may have unexpected behavior
103
+ // when you include this. They'll usually work, you'll just want to test them.
104
+ if ($type == 'db') {
105
+ if ( preg_match('|mysql://([^:]*):([^@]*)@([^/]*)/(.*)|', $connection, $matches) ) {
106
+ //Array ( [0] => mysql://user:password@server/database [1] => user [2] => password [3] => server [4] => database )
107
+ $db = mysqli_connect($matches[3], $matches[1], $matches[2]);
108
+ mysqli_query($db, "USE $matches[4]");
109
+
110
+ /*
111
+ * If high performance is crucial, you can easily comment
112
+ * out this query once you've created your database table.
113
+ */
114
+ mysqli_query($db, "
115
+ CREATE TABLE IF NOT EXISTS `$table` (
116
+ `request` varchar(128) NOT NULL,
117
+ `response` mediumtext NOT NULL,
118
+ `expiration` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
119
+ UNIQUE KEY `request` (`request`)
120
+ )
121
+ ");
122
+
123
+ $result = mysqli_query($db, "SELECT COUNT(*) 'count' FROM $table");
124
+ if( $result ) {
125
+ $result = mysqli_fetch_assoc($result);
126
+ }
127
+
128
+ if ( $result && $result['count'] > $this->max_cache_rows ) {
129
+ mysqli_query($db, "DELETE FROM $table WHERE CURRENT_TIMESTAMP > expiration");
130
+ mysqli_query($db, 'OPTIMIZE TABLE ' . $this->cache_table);
131
+ }
132
+ $this->cache = 'db';
133
+ $this->cache_db = $db;
134
+ $this->cache_table = $table;
135
+ }
136
+ } elseif ($type == 'fs') {
137
+ $this->cache = 'fs';
138
+ $connection = realpath($connection);
139
+ $this->cache_dir = $connection;
140
+ if ($dir = opendir($this->cache_dir)) {
141
+ while ($file = readdir($dir)) {
142
+ if (substr($file, -6) == '.cache' && ((filemtime($this->cache_dir . '/' . $file) + $cache_expire) < time()) ) {
143
+ unlink($this->cache_dir . '/' . $file);
144
+ }
145
+ }
146
+ }
147
+ } elseif ( $type == 'custom' ) {
148
+ $this->cache = "custom";
149
+ $this->custom_cache_get = $connection[0];
150
+ $this->custom_cache_set = $connection[1];
151
+ }
152
+ $this->cache_expire = $cache_expire;
153
+ }
154
+
155
+ function getCached ($request)
156
+ {
157
+ //Checks the database or filesystem for a cached result to the request.
158
+ //If there is no cache result, it returns a value of false. If it finds one,
159
+ //it returns the unparsed XML.
160
+ unset($request['api_sig']);
161
+ foreach ( $request as $key => $value ) {
162
+ if ( empty($value) ) unset($request[$key]);
163
+ else $request[$key] = (string) $request[$key];
164
+ }
165
+ //if ( is_user_logged_in() ) print_r($request);
166
+ $reqhash = md5(serialize($request));
167
+ $this->cache_key = $reqhash;
168
+ $this->cache_request = $request;
169
+ if ($this->cache == 'db') {
170
+ $result = mysqli_query($this->cache_db, "SELECT response FROM " . $this->cache_table . " WHERE request = '" . $reqhash . "' AND CURRENT_TIMESTAMP < expiration");
171
+ if ( $result && mysqli_num_rows($result) ) {
172
+ $result = mysqli_fetch_assoc($result);
173
+ return urldecode($result['response']);
174
+ } else {
175
+ return false;
176
+ }
177
+ } elseif ($this->cache == 'fs') {
178
+ $file = $this->cache_dir . '/' . $reqhash . '.cache';
179
+ if (file_exists($file)) {
180
+ if ($this->php_version[0] > 4 || ($this->php_version[0] == 4 && $this->php_version[1] >= 3)) {
181
+ return file_get_contents($file);
182
+ } else {
183
+ return implode('', file($file));
184
+ }
185
+ }
186
+ } elseif ( $this->cache == 'custom' ) {
187
+ return call_user_func_array($this->custom_cache_get, array($reqhash));
188
+ }
189
+ return false;
190
+ }
191
+
192
+ function cache ($request, $response)
193
+ {
194
+ //Caches the unparsed response of a request.
195
+ unset($request['api_sig']);
196
+ foreach ( $request as $key => $value ) {
197
+ if ( empty($value) ) unset($request[$key]);
198
+ else $request[$key] = (string) $request[$key];
199
+ }
200
+ $reqhash = md5(serialize($request));
201
+ if ($this->cache == 'db') {
202
+ //$this->cache_db->query("DELETE FROM $this->cache_table WHERE request = '$reqhash'");
203
+ $response = urlencode($response);
204
+ $sql = 'INSERT INTO '.$this->cache_table.' (request, response, expiration)
205
+ VALUES (\''.$reqhash.'\', \''.$response.'\', TIMESTAMPADD(SECOND,'.$this->cache_expire.',CURRENT_TIMESTAMP))
206
+ ON DUPLICATE KEY UPDATE response=\''.$response.'\',
207
+ expiration=TIMESTAMPADD(SECOND,'.$this->cache_expire.',CURRENT_TIMESTAMP) ';
208
+
209
+ $result = mysqli_query($this->cache_db, $sql);
210
+ if(!$result) {
211
+ echo mysqli_error($this->cache_db);
212
+ }
213
+
214
+ return $result;
215
+ } elseif ($this->cache == "fs") {
216
+ $file = $this->cache_dir . "/" . $reqhash . ".cache";
217
+ $fstream = fopen($file, "w");
218
+ $result = fwrite($fstream,$response);
219
+ fclose($fstream);
220
+ return $result;
221
+ } elseif ( $this->cache == "custom" ) {
222
+ return call_user_func_array($this->custom_cache_set, array($reqhash, $response, $this->cache_expire));
223
+ }
224
+ return false;
225
+ }
226
+
227
+ function setCustomPost ( $function ) {
228
+ $this->custom_post = $function;
229
+ }
230
+
231
+ function post ($data, $type = null) {
232
+ if ( is_null($type) ) {
233
+ $url = $this->rest_endpoint;
234
+ }
235
+
236
+ if ( !is_null($this->custom_post) ) {
237
+ return call_user_func($this->custom_post, $url, $data);
238
+ }
239
+
240
+ if ( !preg_match("|https://(.*?)(/.*)|", $url, $matches) ) {
241
+ die('There was some problem figuring out your endpoint');
242
+ }
243
+
244
+ if ( function_exists('curl_init') ) {
245
+ // Has curl. Use it!
246
+ $curl = curl_init($this->rest_endpoint);
247
+ curl_setopt($curl, CURLOPT_POST, true);
248
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
249
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
250
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
251
+ $response = curl_exec($curl);
252
+ curl_close($curl);
253
+ } else {
254
+ // Use sockets.
255
+ foreach ( $data as $key => $value ) {
256
+ $data[$key] = $key . '=' . urlencode($value);
257
+ }
258
+ $data = implode('&', $data);
259
+
260
+ $fp = @pfsockopen('ssl://'.$matches[1], 443);
261
+ if (!$fp) {
262
+ die('Could not connect to the web service');
263
+ }
264
+ fputs ($fp,'POST ' . $matches[2] . " HTTP/1.1\n");
265
+ fputs ($fp,'Host: ' . $matches[1] . "\n");
266
+ fputs ($fp,"Content-type: application/x-www-form-urlencoded\n");
267
+ fputs ($fp,"Content-length: ".strlen($data)."\n");
268
+ fputs ($fp,"Connection: close\r\n\r\n");
269
+ fputs ($fp,$data . "\n\n");
270
+ $response = "";
271
+ while(!feof($fp)) {
272
+ $response .= fgets($fp, 1024);
273
+ }
274
+ fclose ($fp);
275
+ $chunked = false;
276
+ $http_status = trim(substr($response, 0, strpos($response, "\n")));
277
+ if ( $http_status != 'HTTP/1.1 200 OK' ) {
278
+ die('The web service endpoint returned a "' . $http_status . '" response');
279
+ }
280
+ if ( strpos($response, 'Transfer-Encoding: chunked') !== false ) {
281
+ $temp = trim(strstr($response, "\r\n\r\n"));
282
+ $response = '';
283
+ $length = trim(substr($temp, 0, strpos($temp, "\r")));
284
+ while ( trim($temp) != "0" && ($length = trim(substr($temp, 0, strpos($temp, "\r")))) != "0" ) {
285
+ $response .= trim(substr($temp, strlen($length)+2, hexdec($length)));
286
+ $temp = trim(substr($temp, strlen($length) + 2 + hexdec($length)));
287
+ }
288
+ } elseif ( strpos($response, 'HTTP/1.1 200 OK') !== false ) {
289
+ $response = trim(strstr($response, "\r\n\r\n"));
290
+ }
291
+ }
292
+ return $response;
293
+ }
294
+
295
+ function request ($command, $args = array(), $nocache = false)
296
+ {
297
+ //Sends a request to Flickr's REST endpoint via POST.
298
+ if (substr($command,0,7) != "flickr.") {
299
+ $command = "flickr." . $command;
300
+ }
301
+
302
+ //Process arguments, including method and login data.
303
+ $args = array_merge(array("method" => $command, "format" => "json", "nojsoncallback" => "1", "api_key" => $this->api_key), $args);
304
+ if (!empty($this->token)) {
305
+ $args = array_merge($args, array("auth_token" => $this->token));
306
+ } elseif (!empty($_SESSION['phpFlickr_auth_token'])) {
307
+ $args = array_merge($args, array("auth_token" => $_SESSION['phpFlickr_auth_token']));
308
+ }
309
+ ksort($args);
310
+ $auth_sig = "";
311
+ $this->last_request = $args;
312
+ $this->response = $this->getCached($args);
313
+ if (!($this->response) || $nocache) {
314
+ foreach ($args as $key => $data) {
315
+ if ( is_null($data) ) {
316
+ unset($args[$key]);
317
+ continue;
318
+ }
319
+ $auth_sig .= $key . $data;
320
+ }
321
+ if (!empty($this->secret)) {
322
+ $api_sig = md5($this->secret . $auth_sig);
323
+ $args['api_sig'] = $api_sig;
324
+ }
325
+ $this->response = $this->post($args);
326
+ $this->cache($args, $this->response);
327
+ }
328
+
329
+
330
+ /*
331
+ * Uncomment this line (and comment out the next one) if you're doing large queries
332
+ * and you're concerned about time. This will, however, change the structure of
333
+ * the result, so be sure that you look at the results.
334
+ */
335
+ $this->parsed_response = json_decode($this->response, TRUE);
336
+ /* $this->parsed_response = $this->clean_text_nodes(json_decode($this->response, TRUE)); */
337
+ if ($this->parsed_response['stat'] == 'fail') {
338
+ if ($this->die_on_error) die("The Flickr API returned the following error: #{$this->parsed_response['code']} - {$this->parsed_response['message']}");
339
+ else {
340
+ $this->error_code = $this->parsed_response['code'];
341
+ $this->error_msg = $this->parsed_response['message'];
342
+ $this->parsed_response = false;
343
+ }
344
+ } else {
345
+ $this->error_code = false;
346
+ $this->error_msg = false;
347
+ }
348
+ return $this->response;
349
+ }
350
+
351
+ function clean_text_nodes ($arr) {
352
+ if (!is_array($arr)) {
353
+ return $arr;
354
+ } elseif (count($arr) == 0) {
355
+ return $arr;
356
+ } elseif (count($arr) == 1 && array_key_exists('_content', $arr)) {
357
+ return $arr['_content'];
358
+ } else {
359
+ foreach ($arr as $key => $element) {
360
+ $arr[$key] = $this->clean_text_nodes($element);
361
+ }
362
+ return($arr);
363
+ }
364
+ }
365
+
366
+ function setToken ($token) {
367
+ // Sets an authentication token to use instead of the session variable
368
+ $this->token = $token;
369
+ }
370
+
371
+ function setProxy ($server, $port) {
372
+ // Sets the proxy for all phpFlickr calls.
373
+ $this->req->setProxy($server, $port);
374
+ }
375
+
376
+ function getErrorCode () {
377
+ // Returns the error code of the last call. If the last call did not
378
+ // return an error. This will return a false boolean.
379
+ return $this->error_code;
380
+ }
381
+
382
+ function getErrorMsg () {
383
+ // Returns the error message of the last call. If the last call did not
384
+ // return an error. This will return a false boolean.
385
+ return $this->error_msg;
386
+ }
387
+
388
+ /* These functions are front ends for the flickr calls */
389
+
390
+ function buildPhotoURL ($photo, $size = "Medium") {
391
+ //receives an array (can use the individual photo data returned
392
+ //from an API call) and returns a URL (doesn't mean that the
393
+ //file size exists)
394
+ $sizes = $this->sizes;
395
+
396
+ $size = strtolower($size);
397
+ if (!array_key_exists($size, $sizes)) {
398
+ $size = "medium";
399
+ }
400
+
401
+ if ($size == "original") {
402
+ $url = "https://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['originalsecret'] . "_o" . "." . $photo['originalformat'];
403
+ } else {
404
+ $url = "https://farm" . $photo['farm'] . ".static.flickr.com/" . $photo['server'] . "/" . $photo['id'] . "_" . $photo['secret'] . $sizes[$size] . ".jpg";
405
+ }
406
+ return $url;
407
+ }
408
+
409
+ function sync_upload ($photo, $title = null, $description = null, $tags = null, $is_public = null, $is_friend = null, $is_family = null) {
410
+ if ( function_exists('curl_init') ) {
411
+ // Has curl. Use it!
412
+
413
+ //Process arguments, including method and login data.
414
+ $args = array("api_key" => $this->api_key, "title" => $title, "description" => $description, "tags" => $tags, "is_public" => $is_public, "is_friend" => $is_friend, "is_family" => $is_family);
415
+ if (!empty($this->token)) {
416
+ $args = array_merge($args, array("auth_token" => $this->token));
417
+ } elseif (!empty($_SESSION['phpFlickr_auth_token'])) {
418
+ $args = array_merge($args, array("auth_token" => $_SESSION['phpFlickr_auth_token']));
419
+ }
420
+
421
+ ksort($args);
422
+ $auth_sig = "";
423
+ foreach ($args as $key => $data) {
424
+ if ( is_null($data) ) {
425
+ unset($args[$key]);
426
+ } else {
427
+ $auth_sig .= $key . $data;
428
+ }
429
+ }
430
+ if (!empty($this->secret)) {
431
+ $api_sig = md5($this->secret . $auth_sig);
432
+ $args["api_sig"] = $api_sig;
433
+ }
434
+
435
+ $photo = realpath($photo);
436
+ $args['photo'] = '@' . $photo;
437
+
438
+
439
+ $curl = curl_init($this->upload_endpoint);
440
+ curl_setopt($curl, CURLOPT_POST, true);
441
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $args);
442
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
443
+ $response = curl_exec($curl);
444
+ $this->response = $response;
445
+ curl_close($curl);
446
+
447
+ $rsp = explode("\n", $response);
448
+ foreach ($rsp as $line) {
449
+ if (preg_match('|<err code="([0-9]+)" msg="(.*)"|', $line, $match)) {
450
+ if ($this->die_on_error)
451
+ die("The Flickr API returned the following error: #{$match[1]} - {$match[2]}");
452
+ else {
453
+ $this->error_code = $match[1];
454
+ $this->error_msg = $match[2];
455
+ $this->parsed_response = false;
456
+ return false;
457
+ }
458
+ } elseif (preg_match("|<photoid>(.*)</photoid>|", $line, $match)) {
459
+ $this->error_code = false;
460
+ $this->error_msg = false;
461
+ return $match[1];
462
+ }
463
+ }
464
+
465
+ } else {
466
+ die("Sorry, your server must support CURL in order to upload files");
467
+ }
468
+
469
+ }
470
+
471
+ function async_upload ($photo, $title = null, $description = null, $tags = null, $is_public = null, $is_friend = null, $is_family = null) {
472
+ if ( function_exists('curl_init') ) {
473
+ // Has curl. Use it!
474
+
475
+ //Process arguments, including method and login data.
476
+ $args = array("async" => 1, "api_key" => $this->api_key, "title" => $title, "description" => $description, "tags" => $tags, "is_public" => $is_public, "is_friend" => $is_friend, "is_family" => $is_family);
477
+ if (!empty($this->token)) {
478
+ $args = array_merge($args, array("auth_token" => $this->token));
479
+ } elseif (!empty($_SESSION['phpFlickr_auth_token'])) {
480
+ $args = array_merge($args, array("auth_token" => $_SESSION['phpFlickr_auth_token']));
481
+ }
482
+
483
+ ksort($args);
484
+ $auth_sig = "";
485
+ foreach ($args as $key => $data) {
486
+ if ( is_null($data) ) {
487
+ unset($args[$key]);
488
+ } else {
489
+ $auth_sig .= $key . $data;
490
+ }
491
+ }
492
+ if (!empty($this->secret)) {
493
+ $api_sig = md5($this->secret . $auth_sig);
494
+ $args["api_sig"] = $api_sig;
495
+ }
496
+
497
+ $photo = realpath($photo);
498
+ $args['photo'] = '@' . $photo;
499
+
500
+
501
+ $curl = curl_init($this->upload_endpoint);
502
+ curl_setopt($curl, CURLOPT_POST, true);
503
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $args);
504
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
505
+ $response = curl_exec($curl);
506
+ $this->response = $response;
507
+ curl_close($curl);
508
+
509
+ $rsp = explode("\n", $response);
510
+ foreach ($rsp as $line) {
511
+ if (preg_match('/<err code="([0-9]+)" msg="(.*)"/', $line, $match)) {
512
+ if ($this->die_on_error)
513
+ die("The Flickr API returned the following error: #{$match[1]} - {$match[2]}");
514
+ else {
515
+ $this->error_code = $match[1];
516
+ $this->error_msg = $match[2];
517
+ $this->parsed_response = false;
518
+ return false;
519
+ }
520
+ } elseif (preg_match("/<ticketid>(.*)</", $line, $match)) {
521
+ $this->error_code = false;
522
+ $this->error_msg = false;
523
+ return $match[1];
524
+ }
525
+ }
526
+ } else {
527
+ die("Sorry, your server must support CURL in order to upload files");
528
+ }
529
+ }
530
+
531
+ // Interface for new replace API method.
532
+ function replace ($photo, $photo_id, $async = null) {
533
+ if ( function_exists('curl_init') ) {
534
+ // Has curl. Use it!
535
+
536
+ //Process arguments, including method and login data.
537
+ $args = array("api_key" => $this->api_key, "photo_id" => $photo_id, "async" => $async);
538
+ if (!empty($this->token)) {
539
+ $args = array_merge($args, array("auth_token" => $this->token));
540
+ } elseif (!empty($_SESSION['phpFlickr_auth_token'])) {
541
+ $args = array_merge($args, array("auth_token" => $_SESSION['phpFlickr_auth_token']));
542
+ }
543
+
544
+ ksort($args);
545
+ $auth_sig = "";
546
+ foreach ($args as $key => $data) {
547
+ if ( is_null($data) ) {
548
+ unset($args[$key]);
549
+ } else {
550
+ $auth_sig .= $key . $data;
551
+ }
552
+ }
553
+ if (!empty($this->secret)) {
554
+ $api_sig = md5($this->secret . $auth_sig);
555
+ $args["api_sig"] = $api_sig;
556
+ }
557
+
558
+ $photo = realpath($photo);
559
+ $args['photo'] = '@' . $photo;
560
+
561
+
562
+ $curl = curl_init($this->replace_endpoint);
563
+ curl_setopt($curl, CURLOPT_POST, true);
564
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $args);
565
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
566
+ $response = curl_exec($curl);
567
+ $this->response = $response;
568
+ curl_close($curl);
569
+
570
+ if ($async == 1)
571
+ $find = 'ticketid';
572
+ else
573
+ $find = 'photoid';
574
+
575
+ $rsp = explode("\n", $response);
576
+ foreach ($rsp as $line) {
577
+ if (preg_match('|<err code="([0-9]+)" msg="(.*)"|', $line, $match)) {
578
+ if ($this->die_on_error)
579
+ die("The Flickr API returned the following error: #{$match[1]} - {$match[2]}");
580
+ else {
581
+ $this->error_code = $match[1];
582
+ $this->error_msg = $match[2];
583
+ $this->parsed_response = false;
584
+ return false;
585
+ }
586
+ } elseif (preg_match("|<" . $find . ">(.*)</|", $line, $match)) {
587
+ $this->error_code = false;
588
+ $this->error_msg = false;
589
+ return $match[1];
590
+ }
591
+ }
592
+ } else {
593
+ die("Sorry, your server must support CURL in order to upload files");
594
+ }
595
+ }
596
+
597
+ function auth ($perms = "read", $remember_uri = true) {
598
+ // Redirects to Flickr's authentication piece if there is no valid token.
599
+ // If remember_uri is set to false, the callback script (included) will
600
+ // redirect to its default page.
601
+
602
+ if (empty($_SESSION['phpFlickr_auth_token']) && empty($this->token)) {
603
+ if ( $remember_uri === true ) {
604
+ $_SESSION['phpFlickr_auth_redirect'] = $_SERVER['REQUEST_URI'];
605
+ } elseif ( $remember_uri !== false ) {
606
+ $_SESSION['phpFlickr_auth_redirect'] = $remember_uri;
607
+ }
608
+ $api_sig = md5($this->secret . "api_key" . $this->api_key . "perms" . $perms);
609
+
610
+ if ($this->service == "23") {
611
+ header("Location: http://www.23hq.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig);
612
+ } else {
613
+ header("Location: https://www.flickr.com/services/auth/?api_key=" . $this->api_key . "&perms=" . $perms . "&api_sig=". $api_sig);
614
+ }
615
+ exit;
616
+ } else {
617
+ $tmp = $this->die_on_error;
618
+ $this->die_on_error = false;
619
+ $rsp = $this->auth_checkToken();
620
+ if ($this->error_code !== false) {
621
+ unset($_SESSION['phpFlickr_auth_token']);
622
+ $this->auth($perms, $remember_uri);
623
+ }
624
+ $this->die_on_error = $tmp;
625
+ return $rsp['perms'];
626
+ }
627
+ }
628
+
629
+ function auth_url($frob, $perms = 'read') {
630
+ $sig = md5(sprintf('%sapi_key%sfrob%sperms%s', $this->secret, $this->api_key, $frob, $perms));
631
+ return sprintf('https://flickr.com/services/auth/?api_key=%s&perms=%s&frob=%s&api_sig=%s', $this->api_key, $perms, $frob, $sig);
632
+ }
633
+
634
+ /*******************************
635
+
636
+ To use the phpFlickr::call method, pass a string containing the API method you want
637
+ to use and an associative array of arguments. For example:
638
+ $result = $f->call("flickr.photos.comments.getList", array("photo_id"=>'34952612'));
639
+ This method will allow you to make calls to arbitrary methods that haven't been
640
+ implemented in phpFlickr yet.
641
+
642
+ *******************************/
643
+
644
+ function call ($method, $arguments) {
645
+ foreach ( $arguments as $key => $value ) {
646
+ if ( is_null($value) ) unset($arguments[$key]);
647
+ }
648
+ $this->request($method, $arguments);
649
+ return $this->parsed_response ? $this->parsed_response : false;
650
+ }
651
+
652
+ /*
653
+ These functions are the direct implementations of flickr calls.
654
+ For method documentation, including arguments, visit the address
655
+ included in a comment in the function.
656
+ */
657
+
658
+ /* Activity methods */
659
+ function activity_userComments ($per_page = NULL, $page = NULL) {
660
+ /* https://www.flickr.com/services/api/flickr.activity.userComments.html */
661
+ $this->request('flickr.activity.userComments', array("per_page" => $per_page, "page" => $page));
662
+ return $this->parsed_response ? $this->parsed_response['items']['item'] : false;
663
+ }
664
+
665
+ function activity_userPhotos ($timeframe = NULL, $per_page = NULL, $page = NULL) {
666
+ /* https://www.flickr.com/services/api/flickr.activity.userPhotos.html */
667
+ $this->request('flickr.activity.userPhotos', array("timeframe" => $timeframe, "per_page" => $per_page, "page" => $page));
668
+ return $this->parsed_response ? $this->parsed_response['items']['item'] : false;
669
+ }
670
+
671
+ /* Authentication methods */
672
+ function auth_checkToken () {
673
+ /* https://www.flickr.com/services/api/flickr.auth.checkToken.html */
674
+ $this->request('flickr.auth.checkToken');
675
+ return $this->parsed_response ? $this->parsed_response['auth'] : false;
676
+ }
677
+
678
+ function auth_getFrob () {
679
+ /* https://www.flickr.com/services/api/flickr.auth.getFrob.html */
680
+ $this->request('flickr.auth.getFrob');
681
+ return $this->parsed_response ? $this->parsed_response['frob'] : false;
682
+ }
683
+
684
+ function auth_getFullToken ($mini_token) {
685
+ /* https://www.flickr.com/services/api/flickr.auth.getFullToken.html */
686
+ $this->request('flickr.auth.getFullToken', array('mini_token'=>$mini_token));
687
+ return $this->parsed_response ? $this->parsed_response['auth'] : false;
688
+ }
689
+
690
+ function auth_getToken ($frob) {
691
+ /* https://www.flickr.com/services/api/flickr.auth.getToken.html */
692
+ $this->request('flickr.auth.getToken', array('frob'=>$frob));
693
+ $_SESSION['phpFlickr_auth_token'] = $this->parsed_response['auth']['token'];
694
+ return $this->parsed_response ? $this->parsed_response['auth'] : false;
695
+ }
696
+
697
+ /* Blogs methods */
698
+ function blogs_getList ($service = NULL) {
699
+ /* https://www.flickr.com/services/api/flickr.blogs.getList.html */
700
+ $rsp = $this->call('flickr.blogs.getList', array('service' => $service));
701
+ return $rsp['blogs']['blog'];
702
+ }
703
+
704
+ function blogs_getServices () {
705
+ /* https://www.flickr.com/services/api/flickr.blogs.getServices.html */
706
+ return $this->call('flickr.blogs.getServices', array());
707
+ }
708
+
709
+ function blogs_postPhoto ($blog_id = NULL, $photo_id, $title, $description, $blog_password = NULL, $service = NULL) {
710
+ /* https://www.flickr.com/services/api/flickr.blogs.postPhoto.html */
711
+ return $this->call('flickr.blogs.postPhoto', array('blog_id' => $blog_id, 'photo_id' => $photo_id, 'title' => $title, 'description' => $description, 'blog_password' => $blog_password, 'service' => $service));
712
+ }
713
+
714
+ /* Collections Methods */
715
+ function collections_getInfo ($collection_id) {
716
+ /* https://www.flickr.com/services/api/flickr.collections.getInfo.html */
717
+ return $this->call('flickr.collections.getInfo', array('collection_id' => $collection_id));
718
+ }
719
+
720
+ function collections_getTree ($collection_id = NULL, $user_id = NULL) {
721
+ /* https://www.flickr.com/services/api/flickr.collections.getTree.html */
722
+ return $this->call('flickr.collections.getTree', array('collection_id' => $collection_id, 'user_id' => $user_id));
723
+ }
724
+
725
+ /* Commons Methods */
726
+ function commons_getInstitutions () {
727
+ /* https://www.flickr.com/services/api/flickr.commons.getInstitutions.html */
728
+ return $this->call('flickr.commons.getInstitutions', array());
729
+ }
730
+
731
+ /* Contacts Methods */
732
+ function contacts_getList ($filter = NULL, $page = NULL, $per_page = NULL) {
733
+ /* https://www.flickr.com/services/api/flickr.contacts.getList.html */
734
+ $this->request('flickr.contacts.getList', array('filter'=>$filter, 'page'=>$page, 'per_page'=>$per_page));
735
+ return $this->parsed_response ? $this->parsed_response['contacts'] : false;
736
+ }
737
+
738
+ function contacts_getPublicList ($user_id, $page = NULL, $per_page = NULL) {
739
+ /* https://www.flickr.com/services/api/flickr.contacts.getPublicList.html */
740
+ $this->request('flickr.contacts.getPublicList', array('user_id'=>$user_id, 'page'=>$page, 'per_page'=>$per_page));
741
+ return $this->parsed_response ? $this->parsed_response['contacts'] : false;
742
+ }
743
+
744
+ function contacts_getListRecentlyUploaded ($date_lastupload = NULL, $filter = NULL) {
745
+ /* https://www.flickr.com/services/api/flickr.contacts.getListRecentlyUploaded.html */
746
+ return $this->call('flickr.contacts.getListRecentlyUploaded', array('date_lastupload' => $date_lastupload, 'filter' => $filter));
747
+ }
748
+
749
+ /* Favorites Methods */
750
+ function favorites_add ($photo_id) {
751
+ /* https://www.flickr.com/services/api/flickr.favorites.add.html */
752
+ $this->request('flickr.favorites.add', array('photo_id'=>$photo_id), TRUE);
753
+ return $this->parsed_response ? true : false;
754
+ }
755
+
756
+ function favorites_getList ($user_id = NULL, $jump_to = NULL, $min_fave_date = NULL, $max_fave_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
757
+ /* https://www.flickr.com/services/api/flickr.favorites.getList.html */
758
+ return $this->call('flickr.favorites.getList', array('user_id' => $user_id, 'jump_to' => $jump_to, 'min_fave_date' => $min_fave_date, 'max_fave_date' => $max_fave_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
759
+ }
760
+
761
+ function favorites_getPublicList ($user_id, $jump_to = NULL, $min_fave_date = NULL, $max_fave_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
762
+ /* https://www.flickr.com/services/api/flickr.favorites.getPublicList.html */
763
+ return $this->call('flickr.favorites.getPublicList', array('user_id' => $user_id, 'jump_to' => $jump_to, 'min_fave_date' => $min_fave_date, 'max_fave_date' => $max_fave_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
764
+ }
765
+
766
+ function favorites_remove ($photo_id, $user_id = NULL) {
767
+ /* https://www.flickr.com/services/api/flickr.favorites.remove.html */
768
+ $this->request("flickr.favorites.remove", array('photo_id' => $photo_id, 'user_id' => $user_id), TRUE);
769
+ return $this->parsed_response ? true : false;
770
+ }
771
+
772
+ /* Galleries Methods */
773
+ function galleries_addPhoto ($gallery_id, $photo_id, $comment = NULL) {
774
+ /* https://www.flickr.com/services/api/flickr.galleries.addPhoto.html */
775
+ return $this->call('flickr.galleries.addPhoto', array('gallery_id' => $gallery_id, 'photo_id' => $photo_id, 'comment' => $comment));
776
+ }
777
+
778
+ function galleries_create ($title, $description, $primary_photo_id = NULL) {
779
+ /* https://www.flickr.com/services/api/flickr.galleries.create.html */
780
+ return $this->call('flickr.galleries.create', array('title' => $title, 'description' => $description, 'primary_photo_id' => $primary_photo_id));
781
+ }
782
+
783
+ function galleries_editMeta ($gallery_id, $title, $description = NULL) {
784
+ /* https://www.flickr.com/services/api/flickr.galleries.editMeta.html */
785
+ return $this->call('flickr.galleries.editMeta', array('gallery_id' => $gallery_id, 'title' => $title, 'description' => $description));
786
+ }
787
+
788
+ function galleries_editPhoto ($gallery_id, $photo_id, $comment) {
789
+ /* https://www.flickr.com/services/api/flickr.galleries.editPhoto.html */
790
+ return $this->call('flickr.galleries.editPhoto', array('gallery_id' => $gallery_id, 'photo_id' => $photo_id, 'comment' => $comment));
791
+ }
792
+
793
+ function galleries_editPhotos ($gallery_id, $primary_photo_id, $photo_ids) {
794
+ /* https://www.flickr.com/services/api/flickr.galleries.editPhotos.html */
795
+ return $this->call('flickr.galleries.editPhotos', array('gallery_id' => $gallery_id, 'primary_photo_id' => $primary_photo_id, 'photo_ids' => $photo_ids));
796
+ }
797
+
798
+ function galleries_getInfo ($gallery_id) {
799
+ /* https://www.flickr.com/services/api/flickr.galleries.getInfo.html */
800
+ return $this->call('flickr.galleries.getInfo', array('gallery_id' => $gallery_id));
801
+ }
802
+
803
+ function galleries_getList ($user_id, $per_page = NULL, $page = NULL) {
804
+ /* https://www.flickr.com/services/api/flickr.galleries.getList.html */
805
+ return $this->call('flickr.galleries.getList', array('user_id' => $user_id, 'per_page' => $per_page, 'page' => $page));
806
+ }
807
+
808
+ function galleries_getListForPhoto ($photo_id, $per_page = NULL, $page = NULL) {
809
+ /* https://www.flickr.com/services/api/flickr.galleries.getListForPhoto.html */
810
+ return $this->call('flickr.galleries.getListForPhoto', array('photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page));
811
+ }
812
+
813
+ function galleries_getPhotos ($gallery_id, $extras = NULL, $per_page = NULL, $page = NULL) {
814
+ /* https://www.flickr.com/services/api/flickr.galleries.getPhotos.html */
815
+ return $this->call('flickr.galleries.getPhotos', array('gallery_id' => $gallery_id, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
816
+ }
817
+
818
+ /* Groups Methods */
819
+ function groups_browse ($cat_id = NULL) {
820
+ /* https://www.flickr.com/services/api/flickr.groups.browse.html */
821
+ $this->request("flickr.groups.browse", array("cat_id"=>$cat_id));
822
+ return $this->parsed_response ? $this->parsed_response['category'] : false;
823
+ }
824
+
825
+ function groups_getInfo ($group_id, $lang = NULL) {
826
+ /* https://www.flickr.com/services/api/flickr.groups.getInfo.html */
827
+ return $this->call('flickr.groups.getInfo', array('group_id' => $group_id, 'lang' => $lang));
828
+ }
829
+
830
+ function groups_search ($text, $per_page = NULL, $page = NULL) {
831
+ /* https://www.flickr.com/services/api/flickr.groups.search.html */
832
+ $this->request("flickr.groups.search", array("text"=>$text,"per_page"=>$per_page,"page"=>$page));
833
+ return $this->parsed_response ? $this->parsed_response['groups'] : false;
834
+ }
835
+
836
+ /* Groups Members Methods */
837
+ function groups_members_getList ($group_id, $membertypes = NULL, $per_page = NULL, $page = NULL) {
838
+ /* https://www.flickr.com/services/api/flickr.groups.members.getList.html */
839
+ return $this->call('flickr.groups.members.getList', array('group_id' => $group_id, 'membertypes' => $membertypes, 'per_page' => $per_page, 'page' => $page));
840
+ }
841
+
842
+ /* Groups Pools Methods */
843
+ function groups_pools_add ($photo_id, $group_id) {
844
+ /* https://www.flickr.com/services/api/flickr.groups.pools.add.html */
845
+ $this->request("flickr.groups.pools.add", array("photo_id"=>$photo_id, "group_id"=>$group_id), TRUE);
846
+ return $this->parsed_response ? true : false;
847
+ }
848
+
849
+ function groups_pools_getContext ($photo_id, $group_id, $num_prev = NULL, $num_next = NULL) {
850
+ /* https://www.flickr.com/services/api/flickr.groups.pools.getContext.html */
851
+ return $this->call('flickr.groups.pools.getContext', array('photo_id' => $photo_id, 'group_id' => $group_id, 'num_prev' => $num_prev, 'num_next' => $num_next));
852
+ }
853
+
854
+ function groups_pools_getGroups ($page = NULL, $per_page = NULL) {
855
+ /* https://www.flickr.com/services/api/flickr.groups.pools.getGroups.html */
856
+ $this->request("flickr.groups.pools.getGroups", array('page'=>$page, 'per_page'=>$per_page));
857
+ return $this->parsed_response ? $this->parsed_response['groups'] : false;
858
+ }
859
+
860
+ function groups_pools_getPhotos ($group_id, $tags = NULL, $user_id = NULL, $jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
861
+ /* https://www.flickr.com/services/api/flickr.groups.pools.getPhotos.html */
862
+ if (is_array($extras)) {
863
+ $extras = implode(",", $extras);
864
+ }
865
+ return $this->call('flickr.groups.pools.getPhotos', array('group_id' => $group_id, 'tags' => $tags, 'user_id' => $user_id, 'jump_to' => $jump_to, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
866
+ }
867
+
868
+ function groups_pools_remove ($photo_id, $group_id) {
869
+ /* https://www.flickr.com/services/api/flickr.groups.pools.remove.html */
870
+ $this->request("flickr.groups.pools.remove", array("photo_id"=>$photo_id, "group_id"=>$group_id), TRUE);
871
+ return $this->parsed_response ? true : false;
872
+ }
873
+
874
+ /* Interestingness methods */
875
+ function interestingness_getList ($date = NULL, $use_panda = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
876
+ /* https://www.flickr.com/services/api/flickr.interestingness.getList.html */
877
+ if (is_array($extras)) {
878
+ $extras = implode(",", $extras);
879
+ }
880
+
881
+ return $this->call('flickr.interestingness.getList', array('date' => $date, 'use_panda' => $use_panda, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
882
+ }
883
+
884
+ /* Machine Tag methods */
885
+ function machinetags_getNamespaces ($predicate = NULL, $per_page = NULL, $page = NULL) {
886
+ /* https://www.flickr.com/services/api/flickr.machinetags.getNamespaces.html */
887
+ return $this->call('flickr.machinetags.getNamespaces', array('predicate' => $predicate, 'per_page' => $per_page, 'page' => $page));
888
+ }
889
+
890
+ function machinetags_getPairs ($namespace = NULL, $predicate = NULL, $per_page = NULL, $page = NULL) {
891
+ /* https://www.flickr.com/services/api/flickr.machinetags.getPairs.html */
892
+ return $this->call('flickr.machinetags.getPairs', array('namespace' => $namespace, 'predicate' => $predicate, 'per_page' => $per_page, 'page' => $page));
893
+ }
894
+
895
+ function machinetags_getPredicates ($namespace = NULL, $per_page = NULL, $page = NULL) {
896
+ /* https://www.flickr.com/services/api/flickr.machinetags.getPredicates.html */
897
+ return $this->call('flickr.machinetags.getPredicates', array('namespace' => $namespace, 'per_page' => $per_page, 'page' => $page));
898
+ }
899
+
900
+ function machinetags_getRecentValues ($namespace = NULL, $predicate = NULL, $added_since = NULL) {
901
+ /* https://www.flickr.com/services/api/flickr.machinetags.getRecentValues.html */
902
+ return $this->call('flickr.machinetags.getRecentValues', array('namespace' => $namespace, 'predicate' => $predicate, 'added_since' => $added_since));
903
+ }
904
+
905
+ function machinetags_getValues ($namespace, $predicate, $per_page = NULL, $page = NULL, $usage = NULL) {
906
+ /* https://www.flickr.com/services/api/flickr.machinetags.getValues.html */
907
+ return $this->call('flickr.machinetags.getValues', array('namespace' => $namespace, 'predicate' => $predicate, 'per_page' => $per_page, 'page' => $page, 'usage' => $usage));
908
+ }
909
+
910
+ /* Panda methods */
911
+ function panda_getList () {
912
+ /* https://www.flickr.com/services/api/flickr.panda.getList.html */
913
+ return $this->call('flickr.panda.getList', array());
914
+ }
915
+
916
+ function panda_getPhotos ($panda_name, $extras = NULL, $per_page = NULL, $page = NULL) {
917
+ /* https://www.flickr.com/services/api/flickr.panda.getPhotos.html */
918
+ return $this->call('flickr.panda.getPhotos', array('panda_name' => $panda_name, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
919
+ }
920
+
921
+ /* People methods */
922
+ function people_findByEmail ($find_email) {
923
+ /* https://www.flickr.com/services/api/flickr.people.findByEmail.html */
924
+ $this->request("flickr.people.findByEmail", array("find_email"=>$find_email));
925
+ return $this->parsed_response ? $this->parsed_response['user'] : false;
926
+ }
927
+
928
+ function people_findByUsername ($username) {
929
+ /* https://www.flickr.com/services/api/flickr.people.findByUsername.html */
930
+ $this->request("flickr.people.findByUsername", array("username"=>$username));
931
+ return $this->parsed_response ? $this->parsed_response['user'] : false;
932
+ }
933
+
934
+ function people_getInfo ($user_id) {
935
+ /* https://www.flickr.com/services/api/flickr.people.getInfo.html */
936
+ $this->request("flickr.people.getInfo", array("user_id"=>$user_id));
937
+ return $this->parsed_response ? $this->parsed_response['person'] : false;
938
+ }
939
+
940
+ function people_getPhotos ($user_id, $args = array()) {
941
+ /* This function strays from the method of arguments that I've
942
+ * used in the other functions for the fact that there are just
943
+ * so many arguments to this API method. What you'll need to do
944
+ * is pass an associative array to the function containing the
945
+ * arguments you want to pass to the API. For example:
946
+ * $photos = $f->photos_search(array("tags"=>"brown,cow", "tag_mode"=>"any"));
947
+ * This will return photos tagged with either "brown" or "cow"
948
+ * or both. See the API documentation (link below) for a full
949
+ * list of arguments.
950
+ */
951
+
952
+ /* https://www.flickr.com/services/api/flickr.people.getPhotos.html */
953
+ return $this->call('flickr.people.getPhotos', array_merge(array('user_id' => $user_id), $args));
954
+ }
955
+
956
+ function people_getPhotosOf ($user_id, $extras = NULL, $per_page = NULL, $page = NULL) {
957
+ /* https://www.flickr.com/services/api/flickr.people.getPhotosOf.html */
958
+ return $this->call('flickr.people.getPhotosOf', array('user_id' => $user_id, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
959
+ }
960
+
961
+ function people_getPublicGroups ($user_id) {
962
+ /* https://www.flickr.com/services/api/flickr.people.getPublicGroups.html */
963
+ $this->request("flickr.people.getPublicGroups", array("user_id"=>$user_id));
964
+ return $this->parsed_response ? $this->parsed_response['groups']['group'] : false;
965
+ }
966
+
967
+ function people_getPublicPhotos ($user_id, $safe_search = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
968
+ /* https://www.flickr.com/services/api/flickr.people.getPublicPhotos.html */
969
+ return $this->call('flickr.people.getPublicPhotos', array('user_id' => $user_id, 'safe_search' => $safe_search, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
970
+ }
971
+
972
+ function people_getUploadStatus () {
973
+ /* https://www.flickr.com/services/api/flickr.people.getUploadStatus.html */
974
+ /* Requires Authentication */
975
+ $this->request("flickr.people.getUploadStatus");
976
+ return $this->parsed_response ? $this->parsed_response['user'] : false;
977
+ }
978
+
979
+
980
+ /* Photos Methods */
981
+ function photos_addTags ($photo_id, $tags) {
982
+ /* https://www.flickr.com/services/api/flickr.photos.addTags.html */
983
+ $this->request("flickr.photos.addTags", array("photo_id"=>$photo_id, "tags"=>$tags), TRUE);
984
+ return $this->parsed_response ? true : false;
985
+ }
986
+
987
+ function photos_delete ($photo_id) {
988
+ /* https://www.flickr.com/services/api/flickr.photos.delete.html */
989
+ $this->request("flickr.photos.delete", array("photo_id"=>$photo_id), TRUE);
990
+ return $this->parsed_response ? true : false;
991
+ }
992
+
993
+ function photos_getAllContexts ($photo_id) {
994
+ /* https://www.flickr.com/services/api/flickr.photos.getAllContexts.html */
995
+ $this->request("flickr.photos.getAllContexts", array("photo_id"=>$photo_id));
996
+ return $this->parsed_response ? $this->parsed_response : false;
997
+ }
998
+
999
+ function photos_getContactsPhotos ($count = NULL, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {
1000
+ /* https://www.flickr.com/services/api/flickr.photos.getContactsPhotos.html */
1001
+ $this->request("flickr.photos.getContactsPhotos", array("count"=>$count, "just_friends"=>$just_friends, "single_photo"=>$single_photo, "include_self"=>$include_self, "extras"=>$extras));
1002
+ return $this->parsed_response ? $this->parsed_response['photos']['photo'] : false;
1003
+ }
1004
+
1005
+ function photos_getContactsPublicPhotos ($user_id, $count = NULL, $just_friends = NULL, $single_photo = NULL, $include_self = NULL, $extras = NULL) {
1006
+ /* https://www.flickr.com/services/api/flickr.photos.getContactsPublicPhotos.html */
1007
+ $this->request("flickr.photos.getContactsPublicPhotos", array("user_id"=>$user_id, "count"=>$count, "just_friends"=>$just_friends, "single_photo"=>$single_photo, "include_self"=>$include_self, "extras"=>$extras));
1008
+ return $this->parsed_response ? $this->parsed_response['photos']['photo'] : false;
1009
+ }
1010
+
1011
+ function photos_getContext ($photo_id, $num_prev = NULL, $num_next = NULL, $extras = NULL, $order_by = NULL) {
1012
+ /* https://www.flickr.com/services/api/flickr.photos.getContext.html */
1013
+ return $this->call('flickr.photos.getContext', array('photo_id' => $photo_id, 'num_prev' => $num_prev, 'num_next' => $num_next, 'extras' => $extras, 'order_by' => $order_by));
1014
+ }
1015
+
1016
+ function photos_getCounts ($dates = NULL, $taken_dates = NULL) {
1017
+ /* https://www.flickr.com/services/api/flickr.photos.getCounts.html */
1018
+ $this->request("flickr.photos.getCounts", array("dates"=>$dates, "taken_dates"=>$taken_dates));
1019
+ return $this->parsed_response ? $this->parsed_response['photocounts']['photocount'] : false;
1020
+ }
1021
+
1022
+ function photos_getExif ($photo_id, $secret = NULL) {
1023
+ /* https://www.flickr.com/services/api/flickr.photos.getExif.html */
1024
+ $this->request("flickr.photos.getExif", array("photo_id"=>$photo_id, "secret"=>$secret));
1025
+ return $this->parsed_response ? $this->parsed_response['photo'] : false;
1026
+ }
1027
+
1028
+ function photos_getFavorites ($photo_id, $page = NULL, $per_page = NULL) {
1029
+ /* https://www.flickr.com/services/api/flickr.photos.getFavorites.html */
1030
+ $this->request("flickr.photos.getFavorites", array("photo_id"=>$photo_id, "page"=>$page, "per_page"=>$per_page));
1031
+ return $this->parsed_response ? $this->parsed_response['photo'] : false;
1032
+ }
1033
+
1034
+ function photos_getInfo ($photo_id, $secret = NULL, $humandates = NULL, $privacy_filter = NULL, $get_contexts = NULL) {
1035
+ /* https://www.flickr.com/services/api/flickr.photos.getInfo.html */
1036
+ return $this->call('flickr.photos.getInfo', array('photo_id' => $photo_id, 'secret' => $secret, 'humandates' => $humandates, 'privacy_filter' => $privacy_filter, 'get_contexts' => $get_contexts));
1037
+ }
1038
+
1039
+ function photos_getNotInSet ($max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = NULL, $media = NULL, $min_upload_date = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
1040
+ /* https://www.flickr.com/services/api/flickr.photos.getNotInSet.html */
1041
+ return $this->call('flickr.photos.getNotInSet', array('max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date, 'privacy_filter' => $privacy_filter, 'media' => $media, 'min_upload_date' => $min_upload_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
1042
+ }
1043
+
1044
+ function photos_getPerms ($photo_id) {
1045
+ /* https://www.flickr.com/services/api/flickr.photos.getPerms.html */
1046
+ $this->request("flickr.photos.getPerms", array("photo_id"=>$photo_id));
1047
+ return $this->parsed_response ? $this->parsed_response['perms'] : false;
1048
+ }
1049
+
1050
+ function photos_getRecent ($jump_to = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
1051
+ /* https://www.flickr.com/services/api/flickr.photos.getRecent.html */
1052
+ if (is_array($extras)) {
1053
+ $extras = implode(",", $extras);
1054
+ }
1055
+ return $this->call('flickr.photos.getRecent', array('jump_to' => $jump_to, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
1056
+ }
1057
+
1058
+ function photos_getSizes ($photo_id) {
1059
+ /* https://www.flickr.com/services/api/flickr.photos.getSizes.html */
1060
+ $this->request("flickr.photos.getSizes", array("photo_id"=>$photo_id));
1061
+ return $this->parsed_response ? $this->parsed_response['sizes']['size'] : false;
1062
+ }
1063
+
1064
+ function photos_getUntagged ($min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL, $privacy_filter = NULL, $media = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
1065
+ /* https://www.flickr.com/services/api/flickr.photos.getUntagged.html */
1066
+ return $this->call('flickr.photos.getUntagged', array('min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date, 'privacy_filter' => $privacy_filter, 'media' => $media, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
1067
+ }
1068
+
1069
+ function photos_getWithGeoData ($args = array()) {
1070
+ /* See the documentation included with the photos_search() function.
1071
+ * I'm using the same style of arguments for this function. The only
1072
+ * difference here is that this doesn't require any arguments. The
1073
+ * flickr.photos.search method requires at least one search parameter.
1074
+ */
1075
+ /* https://www.flickr.com/services/api/flickr.photos.getWithGeoData.html */
1076
+ $this->request("flickr.photos.getWithGeoData", $args);
1077
+ return $this->parsed_response ? $this->parsed_response['photos'] : false;
1078
+ }
1079
+
1080
+ function photos_getWithoutGeoData ($args = array()) {
1081
+ /* See the documentation included with the photos_search() function.
1082
+ * I'm using the same style of arguments for this function. The only
1083
+ * difference here is that this doesn't require any arguments. The
1084
+ * flickr.photos.search method requires at least one search parameter.
1085
+ */
1086
+ /* https://www.flickr.com/services/api/flickr.photos.getWithoutGeoData.html */
1087
+ $this->request("flickr.photos.getWithoutGeoData", $args);
1088
+ return $this->parsed_response ? $this->parsed_response['photos'] : false;
1089
+ }
1090
+
1091
+ function photos_recentlyUpdated ($min_date, $extras = NULL, $per_page = NULL, $page = NULL) {
1092
+ /* https://www.flickr.com/services/api/flickr.photos.recentlyUpdated.html */
1093
+ return $this->call('flickr.photos.recentlyUpdated', array('min_date' => $min_date, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
1094
+ }
1095
+
1096
+ function photos_removeTag ($tag_id) {
1097
+ /* https://www.flickr.com/services/api/flickr.photos.removeTag.html */
1098
+ $this->request("flickr.photos.removeTag", array("tag_id"=>$tag_id), TRUE);
1099
+ return $this->parsed_response ? true : false;
1100
+ }
1101
+
1102
+ function photos_search ($args = array()) {
1103
+ /* This function strays from the method of arguments that I've
1104
+ * used in the other functions for the fact that there are just
1105
+ * so many arguments to this API method. What you'll need to do
1106
+ * is pass an associative array to the function containing the
1107
+ * arguments you want to pass to the API. For example:
1108
+ * $photos = $f->photos_search(array("tags"=>"brown,cow", "tag_mode"=>"any"));
1109
+ * This will return photos tagged with either "brown" or "cow"
1110
+ * or both. See the API documentation (link below) for a full
1111
+ * list of arguments.
1112
+ */
1113
+
1114
+ /* https://www.flickr.com/services/api/flickr.photos.search.html */
1115
+ $result = $this->request("flickr.photos.search", $args);
1116
+ return ($this->parsed_response) ? $this->parsed_response['photos'] : false;
1117
+ }
1118
+
1119
+ function photos_setContentType ($photo_id, $content_type) {
1120
+ /* https://www.flickr.com/services/api/flickr.photos.setContentType.html */
1121
+ return $this->call('flickr.photos.setContentType', array('photo_id' => $photo_id, 'content_type' => $content_type));
1122
+ }
1123
+
1124
+ function photos_setDates ($photo_id, $date_posted = NULL, $date_taken = NULL, $date_taken_granularity = NULL) {
1125
+ /* https://www.flickr.com/services/api/flickr.photos.setDates.html */
1126
+ $this->request("flickr.photos.setDates", array("photo_id"=>$photo_id, "date_posted"=>$date_posted, "date_taken"=>$date_taken, "date_taken_granularity"=>$date_taken_granularity), TRUE);
1127
+ return $this->parsed_response ? true : false;
1128
+ }
1129
+
1130
+ function photos_setMeta ($photo_id, $title, $description) {
1131
+ /* https://www.flickr.com/services/api/flickr.photos.setMeta.html */
1132
+ $this->request("flickr.photos.setMeta", array("photo_id"=>$photo_id, "title"=>$title, "description"=>$description), TRUE);
1133
+ return $this->parsed_response ? true : false;
1134
+ }
1135
+
1136
+ function photos_setPerms ($photo_id, $is_public, $is_friend, $is_family, $perm_comment, $perm_addmeta) {
1137
+ /* https://www.flickr.com/services/api/flickr.photos.setPerms.html */
1138
+ $this->request("flickr.photos.setPerms", array("photo_id"=>$photo_id, "is_public"=>$is_public, "is_friend"=>$is_friend, "is_family"=>$is_family, "perm_comment"=>$perm_comment, "perm_addmeta"=>$perm_addmeta), TRUE);
1139
+ return $this->parsed_response ? true : false;
1140
+ }
1141
+
1142
+ function photos_setSafetyLevel ($photo_id, $safety_level = NULL, $hidden = NULL) {
1143
+ /* https://www.flickr.com/services/api/flickr.photos.setSafetyLevel.html */
1144
+ return $this->call('flickr.photos.setSafetyLevel', array('photo_id' => $photo_id, 'safety_level' => $safety_level, 'hidden' => $hidden));
1145
+ }
1146
+
1147
+ function photos_setTags ($photo_id, $tags) {
1148
+ /* https://www.flickr.com/services/api/flickr.photos.setTags.html */
1149
+ $this->request("flickr.photos.setTags", array("photo_id"=>$photo_id, "tags"=>$tags), TRUE);
1150
+ return $this->parsed_response ? true : false;
1151
+ }
1152
+
1153
+ /* Photos - Comments Methods */
1154
+ function photos_comments_addComment ($photo_id, $comment_text) {
1155
+ /* https://www.flickr.com/services/api/flickr.photos.comments.addComment.html */
1156
+ $this->request("flickr.photos.comments.addComment", array("photo_id" => $photo_id, "comment_text"=>$comment_text), TRUE);
1157
+ return $this->parsed_response ? $this->parsed_response['comment'] : false;
1158
+ }
1159
+
1160
+ function photos_comments_deleteComment ($comment_id) {
1161
+ /* https://www.flickr.com/services/api/flickr.photos.comments.deleteComment.html */
1162
+ $this->request("flickr.photos.comments.deleteComment", array("comment_id" => $comment_id), TRUE);
1163
+ return $this->parsed_response ? true : false;
1164
+ }
1165
+
1166
+ function photos_comments_editComment ($comment_id, $comment_text) {
1167
+ /* https://www.flickr.com/services/api/flickr.photos.comments.editComment.html */
1168
+ $this->request("flickr.photos.comments.editComment", array("comment_id" => $comment_id, "comment_text"=>$comment_text), TRUE);
1169
+ return $this->parsed_response ? true : false;
1170
+ }
1171
+
1172
+ function photos_comments_getList ($photo_id, $min_comment_date = NULL, $max_comment_date = NULL, $page = NULL, $per_page = NULL, $include_faves = NULL) {
1173
+ /* https://www.flickr.com/services/api/flickr.photos.comments.getList.html */
1174
+ return $this->call('flickr.photos.comments.getList', array('photo_id' => $photo_id, 'min_comment_date' => $min_comment_date, 'max_comment_date' => $max_comment_date, 'page' => $page, 'per_page' => $per_page, 'include_faves' => $include_faves));
1175
+ }
1176
+
1177
+ function photos_comments_getRecentForContacts ($date_lastcomment = NULL, $contacts_filter = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
1178
+ /* https://www.flickr.com/services/api/flickr.photos.comments.getRecentForContacts.html */
1179
+ return $this->call('flickr.photos.comments.getRecentForContacts', array('date_lastcomment' => $date_lastcomment, 'contacts_filter' => $contacts_filter, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
1180
+ }
1181
+
1182
+ /* Photos - Geo Methods */
1183
+ function photos_geo_batchCorrectLocation ($lat, $lon, $accuracy, $place_id = NULL, $woe_id = NULL) {
1184
+ /* https://www.flickr.com/services/api/flickr.photos.geo.batchCorrectLocation.html */
1185
+ return $this->call('flickr.photos.geo.batchCorrectLocation', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'place_id' => $place_id, 'woe_id' => $woe_id));
1186
+ }
1187
+
1188
+ function photos_geo_correctLocation ($photo_id, $place_id = NULL, $woe_id = NULL) {
1189
+ /* https://www.flickr.com/services/api/flickr.photos.geo.correctLocation.html */
1190
+ return $this->call('flickr.photos.geo.correctLocation', array('photo_id' => $photo_id, 'place_id' => $place_id, 'woe_id' => $woe_id));
1191
+ }
1192
+
1193
+ function photos_geo_getLocation ($photo_id) {
1194
+ /* https://www.flickr.com/services/api/flickr.photos.geo.getLocation.html */
1195
+ $this->request("flickr.photos.geo.getLocation", array("photo_id"=>$photo_id));
1196
+ return $this->parsed_response ? $this->parsed_response['photo'] : false;
1197
+ }
1198
+
1199
+ function photos_geo_getPerms ($photo_id) {
1200
+ /* https://www.flickr.com/services/api/flickr.photos.geo.getPerms.html */
1201
+ $this->request("flickr.photos.geo.getPerms", array("photo_id"=>$photo_id));
1202
+ return $this->parsed_response ? $this->parsed_response['perms'] : false;
1203
+ }
1204
+
1205
+ function photos_geo_photosForLocation ($lat, $lon, $accuracy = NULL, $extras = NULL, $per_page = NULL, $page = NULL) {
1206
+ /* https://www.flickr.com/services/api/flickr.photos.geo.photosForLocation.html */
1207
+ return $this->call('flickr.photos.geo.photosForLocation', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'extras' => $extras, 'per_page' => $per_page, 'page' => $page));
1208
+ }
1209
+
1210
+ function photos_geo_removeLocation ($photo_id) {
1211
+ /* https://www.flickr.com/services/api/flickr.photos.geo.removeLocation.html */
1212
+ $this->request("flickr.photos.geo.removeLocation", array("photo_id"=>$photo_id), TRUE);
1213
+ return $this->parsed_response ? true : false;
1214
+ }
1215
+
1216
+ function photos_geo_setContext ($photo_id, $context) {
1217
+ /* https://www.flickr.com/services/api/flickr.photos.geo.setContext.html */
1218
+ return $this->call('flickr.photos.geo.setContext', array('photo_id' => $photo_id, 'context' => $context));
1219
+ }
1220
+
1221
+ function photos_geo_setLocation ($photo_id, $lat, $lon, $accuracy = NULL, $context = NULL, $bookmark_id = NULL) {
1222
+ /* https://www.flickr.com/services/api/flickr.photos.geo.setLocation.html */
1223
+ return $this->call('flickr.photos.geo.setLocation', array('photo_id' => $photo_id, 'lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy, 'context' => $context, 'bookmark_id' => $bookmark_id));
1224
+ }
1225
+
1226
+ function photos_geo_setPerms ($is_public, $is_contact, $is_friend, $is_family, $photo_id) {
1227
+ /* https://www.flickr.com/services/api/flickr.photos.geo.setPerms.html */
1228
+ return $this->call('flickr.photos.geo.setPerms', array('is_public' => $is_public, 'is_contact' => $is_contact, 'is_friend' => $is_friend, 'is_family' => $is_family, 'photo_id' => $photo_id));
1229
+ }
1230
+
1231
+ /* Photos - Licenses Methods */
1232
+ function photos_licenses_getInfo () {
1233
+ /* https://www.flickr.com/services/api/flickr.photos.licenses.getInfo.html */
1234
+ $this->request("flickr.photos.licenses.getInfo");
1235
+ return $this->parsed_response ? $this->parsed_response['licenses']['license'] : false;
1236
+ }
1237
+
1238
+ function photos_licenses_setLicense ($photo_id, $license_id) {
1239
+ /* https://www.flickr.com/services/api/flickr.photos.licenses.setLicense.html */
1240
+ /* Requires Authentication */
1241
+ $this->request("flickr.photos.licenses.setLicense", array("photo_id"=>$photo_id, "license_id"=>$license_id), TRUE);
1242
+ return $this->parsed_response ? true : false;
1243
+ }
1244
+
1245
+ /* Photos - Notes Methods */
1246
+ function photos_notes_add ($photo_id, $note_x, $note_y, $note_w, $note_h, $note_text) {
1247
+ /* https://www.flickr.com/services/api/flickr.photos.notes.add.html */
1248
+ $this->request("flickr.photos.notes.add", array("photo_id" => $photo_id, "note_x" => $note_x, "note_y" => $note_y, "note_w" => $note_w, "note_h" => $note_h, "note_text" => $note_text), TRUE);
1249
+ return $this->parsed_response ? $this->parsed_response['note'] : false;
1250
+ }
1251
+
1252
+ function photos_notes_delete ($note_id) {
1253
+ /* https://www.flickr.com/services/api/flickr.photos.notes.delete.html */
1254
+ $this->request("flickr.photos.notes.delete", array("note_id" => $note_id), TRUE);
1255
+ return $this->parsed_response ? true : false;
1256
+ }
1257
+
1258
+ function photos_notes_edit ($note_id, $note_x, $note_y, $note_w, $note_h, $note_text) {
1259
+ /* https://www.flickr.com/services/api/flickr.photos.notes.edit.html */
1260
+ $this->request("flickr.photos.notes.edit", array("note_id" => $note_id, "note_x" => $note_x, "note_y" => $note_y, "note_w" => $note_w, "note_h" => $note_h, "note_text" => $note_text), TRUE);
1261
+ return $this->parsed_response ? true : false;
1262
+ }
1263
+
1264
+ /* Photos - Transform Methods */
1265
+ function photos_transform_rotate ($photo_id, $degrees) {
1266
+ /* https://www.flickr.com/services/api/flickr.photos.transform.rotate.html */
1267
+ $this->request("flickr.photos.transform.rotate", array("photo_id" => $photo_id, "degrees" => $degrees), TRUE);
1268
+ return $this->parsed_response ? true : false;
1269
+ }
1270
+
1271
+ /* Photos - People Methods */
1272
+ function photos_people_add ($photo_id, $user_id, $person_x = NULL, $person_y = NULL, $person_w = NULL, $person_h = NULL) {
1273
+ /* https://www.flickr.com/services/api/flickr.photos.people.add.html */
1274
+ return $this->call('flickr.photos.people.add', array('photo_id' => $photo_id, 'user_id' => $user_id, 'person_x' => $person_x, 'person_y' => $person_y, 'person_w' => $person_w, 'person_h' => $person_h));
1275
+ }
1276
+
1277
+ function photos_people_delete ($photo_id, $user_id, $email = NULL) {
1278
+ /* https://www.flickr.com/services/api/flickr.photos.people.delete.html */
1279
+ return $this->call('flickr.photos.people.delete', array('photo_id' => $photo_id, 'user_id' => $user_id, 'email' => $email));
1280
+ }
1281
+
1282
+ function photos_people_deleteCoords ($photo_id, $user_id) {
1283
+ /* https://www.flickr.com/services/api/flickr.photos.people.deleteCoords.html */
1284
+ return $this->call('flickr.photos.people.deleteCoords', array('photo_id' => $photo_id, 'user_id' => $user_id));
1285
+ }
1286
+
1287
+ function photos_people_editCoords ($photo_id, $user_id, $person_x, $person_y, $person_w, $person_h, $email = NULL) {
1288
+ /* https://www.flickr.com/services/api/flickr.photos.people.editCoords.html */
1289
+ return $this->call('flickr.photos.people.editCoords', array('photo_id' => $photo_id, 'user_id' => $user_id, 'person_x' => $person_x, 'person_y' => $person_y, 'person_w' => $person_w, 'person_h' => $person_h, 'email' => $email));
1290
+ }
1291
+
1292
+ function photos_people_getList ($photo_id) {
1293
+ /* https://www.flickr.com/services/api/flickr.photos.people.getList.html */
1294
+ return $this->call('flickr.photos.people.getList', array('photo_id' => $photo_id));
1295
+ }
1296
+
1297
+ /* Photos - Upload Methods */
1298
+ function photos_upload_checkTickets ($tickets) {
1299
+ /* https://www.flickr.com/services/api/flickr.photos.upload.checkTickets.html */
1300
+ if (is_array($tickets)) {
1301
+ $tickets = implode(",", $tickets);
1302
+ }
1303
+ $this->request("flickr.photos.upload.checkTickets", array("tickets" => $tickets), TRUE);
1304
+ return $this->parsed_response ? $this->parsed_response['uploader']['ticket'] : false;
1305
+ }
1306
+
1307
+ /* Photosets Methods */
1308
+ function photosets_addPhoto ($photoset_id, $photo_id) {
1309
+ /* https://www.flickr.com/services/api/flickr.photosets.addPhoto.html */
1310
+ $this->request("flickr.photosets.addPhoto", array("photoset_id" => $photoset_id, "photo_id" => $photo_id), TRUE);
1311
+ return $this->parsed_response ? true : false;
1312
+ }
1313
+
1314
+ function photosets_create ($title, $description, $primary_photo_id) {
1315
+ /* https://www.flickr.com/services/api/flickr.photosets.create.html */
1316
+ $this->request("flickr.photosets.create", array("title" => $title, "primary_photo_id" => $primary_photo_id, "description" => $description), TRUE);
1317
+ return $this->parsed_response ? $this->parsed_response['photoset'] : false;
1318
+ }
1319
+
1320
+ function photosets_delete ($photoset_id) {
1321
+ /* https://www.flickr.com/services/api/flickr.photosets.delete.html */
1322
+ $this->request("flickr.photosets.delete", array("photoset_id" => $photoset_id), TRUE);
1323
+ return $this->parsed_response ? true : false;
1324
+ }
1325
+
1326
+ function photosets_editMeta ($photoset_id, $title, $description = NULL) {
1327
+ /* https://www.flickr.com/services/api/flickr.photosets.editMeta.html */
1328
+ $this->request("flickr.photosets.editMeta", array("photoset_id" => $photoset_id, "title" => $title, "description" => $description), TRUE);
1329
+ return $this->parsed_response ? true : false;
1330
+ }
1331
+
1332
+ function photosets_editPhotos ($photoset_id, $primary_photo_id, $photo_ids) {
1333
+ /* https://www.flickr.com/services/api/flickr.photosets.editPhotos.html */
1334
+ $this->request("flickr.photosets.editPhotos", array("photoset_id" => $photoset_id, "primary_photo_id" => $primary_photo_id, "photo_ids" => $photo_ids), TRUE);
1335
+ return $this->parsed_response ? true : false;
1336
+ }
1337
+
1338
+ function photosets_getContext ($photo_id, $photoset_id, $num_prev = NULL, $num_next = NULL) {
1339
+ /* https://www.flickr.com/services/api/flickr.photosets.getContext.html */
1340
+ return $this->call('flickr.photosets.getContext', array('photo_id' => $photo_id, 'photoset_id' => $photoset_id, 'num_prev' => $num_prev, 'num_next' => $num_next));
1341
+ }
1342
+
1343
+ function photosets_getInfo ($photoset_id) {
1344
+ /* https://www.flickr.com/services/api/flickr.photosets.getInfo.html */
1345
+ $this->request("flickr.photosets.getInfo", array("photoset_id" => $photoset_id));
1346
+ return $this->parsed_response ? $this->parsed_response['photoset'] : false;
1347
+ }
1348
+
1349
+ function photosets_getList ($user_id = NULL, $page = NULL, $per_page = NULL, $primary_photo_extras = NULL) {
1350
+ /* https://www.flickr.com/services/api/flickr.photosets.getList.html */
1351
+ $this->request("flickr.photosets.getList", array("user_id" => $user_id, 'page' => $page, 'per_page' => $per_page, 'primary_photo_extras' => $primary_photo_extras));
1352
+ return $this->parsed_response ? $this->parsed_response['photosets'] : false;
1353
+ }
1354
+
1355
+ function photosets_getPhotos ($photoset_id, $extras = NULL, $privacy_filter = NULL, $per_page = NULL, $page = NULL, $media = NULL) {
1356
+ /* https://www.flickr.com/services/api/flickr.photosets.getPhotos.html */
1357
+ return $this->call('flickr.photosets.getPhotos', array('photoset_id' => $photoset_id, 'extras' => $extras, 'privacy_filter' => $privacy_filter, 'per_page' => $per_page, 'page' => $page, 'media' => $media));
1358
+ }
1359
+
1360
+ function photosets_orderSets ($photoset_ids) {
1361
+ /* https://www.flickr.com/services/api/flickr.photosets.orderSets.html */
1362
+ if (is_array($photoset_ids)) {
1363
+ $photoset_ids = implode(",", $photoset_ids);
1364
+ }
1365
+ $this->request("flickr.photosets.orderSets", array("photoset_ids" => $photoset_ids), TRUE);
1366
+ return $this->parsed_response ? true : false;
1367
+ }
1368
+
1369
+ function photosets_removePhoto ($photoset_id, $photo_id) {
1370
+ /* https://www.flickr.com/services/api/flickr.photosets.removePhoto.html */
1371
+ $this->request("flickr.photosets.removePhoto", array("photoset_id" => $photoset_id, "photo_id" => $photo_id), TRUE);
1372
+ return $this->parsed_response ? true : false;
1373
+ }
1374
+
1375
+ function photosets_removePhotos ($photoset_id, $photo_ids) {
1376
+ /* https://www.flickr.com/services/api/flickr.photosets.removePhotos.html */
1377
+ return $this->call('flickr.photosets.removePhotos', array('photoset_id' => $photoset_id, 'photo_ids' => $photo_ids));
1378
+ }
1379
+
1380
+ function photosets_reorderPhotos ($photoset_id, $photo_ids) {
1381
+ /* https://www.flickr.com/services/api/flickr.photosets.reorderPhotos.html */
1382
+ return $this->call('flickr.photosets.reorderPhotos', array('photoset_id' => $photoset_id, 'photo_ids' => $photo_ids));
1383
+ }
1384
+
1385
+ function photosets_setPrimaryPhoto ($photoset_id, $photo_id) {
1386
+ /* https://www.flickr.com/services/api/flickr.photosets.setPrimaryPhoto.html */
1387
+ return $this->call('flickr.photosets.setPrimaryPhoto', array('photoset_id' => $photoset_id, 'photo_id' => $photo_id));
1388
+ }
1389
+
1390
+ /* Photosets Comments Methods */
1391
+ function photosets_comments_addComment ($photoset_id, $comment_text) {
1392
+ /* https://www.flickr.com/services/api/flickr.photosets.comments.addComment.html */
1393
+ $this->request("flickr.photosets.comments.addComment", array("photoset_id" => $photoset_id, "comment_text"=>$comment_text), TRUE);
1394
+ return $this->parsed_response ? $this->parsed_response['comment'] : false;
1395
+ }
1396
+
1397
+ function photosets_comments_deleteComment ($comment_id) {
1398
+ /* https://www.flickr.com/services/api/flickr.photosets.comments.deleteComment.html */
1399
+ $this->request("flickr.photosets.comments.deleteComment", array("comment_id" => $comment_id), TRUE);
1400
+ return $this->parsed_response ? true : false;
1401
+ }
1402
+
1403
+ function photosets_comments_editComment ($comment_id, $comment_text) {
1404
+ /* https://www.flickr.com/services/api/flickr.photosets.comments.editComment.html */
1405
+ $this->request("flickr.photosets.comments.editComment", array("comment_id" => $comment_id, "comment_text"=>$comment_text), TRUE);
1406
+ return $this->parsed_response ? true : false;
1407
+ }
1408
+
1409
+ function photosets_comments_getList ($photoset_id) {
1410
+ /* https://www.flickr.com/services/api/flickr.photosets.comments.getList.html */
1411
+ $this->request("flickr.photosets.comments.getList", array("photoset_id"=>$photoset_id));
1412
+ return $this->parsed_response ? $this->parsed_response['comments'] : false;
1413
+ }
1414
+
1415
+ /* Places Methods */
1416
+ function places_find ($query) {
1417
+ /* https://www.flickr.com/services/api/flickr.places.find.html */
1418
+ return $this->call('flickr.places.find', array('query' => $query));
1419
+ }
1420
+
1421
+ function places_findByLatLon ($lat, $lon, $accuracy = NULL) {
1422
+ /* https://www.flickr.com/services/api/flickr.places.findByLatLon.html */
1423
+ return $this->call('flickr.places.findByLatLon', array('lat' => $lat, 'lon' => $lon, 'accuracy' => $accuracy));
1424
+ }
1425
+
1426
+ function places_getChildrenWithPhotosPublic ($place_id = NULL, $woe_id = NULL) {
1427
+ /* https://www.flickr.com/services/api/flickr.places.getChildrenWithPhotosPublic.html */
1428
+ return $this->call('flickr.places.getChildrenWithPhotosPublic', array('place_id' => $place_id, 'woe_id' => $woe_id));
1429
+ }
1430
+
1431
+ function places_getInfo ($place_id = NULL, $woe_id = NULL) {
1432
+ /* https://www.flickr.com/services/api/flickr.places.getInfo.html */
1433
+ return $this->call('flickr.places.getInfo', array('place_id' => $place_id, 'woe_id' => $woe_id));
1434
+ }
1435
+
1436
+ function places_getInfoByUrl ($url) {
1437
+ /* https://www.flickr.com/services/api/flickr.places.getInfoByUrl.html */
1438
+ return $this->call('flickr.places.getInfoByUrl', array('url' => $url));
1439
+ }
1440
+
1441
+ function places_getPlaceTypes () {
1442
+ /* https://www.flickr.com/services/api/flickr.places.getPlaceTypes.html */
1443
+ return $this->call('flickr.places.getPlaceTypes', array());
1444
+ }
1445
+
1446
+ function places_getShapeHistory ($place_id = NULL, $woe_id = NULL) {
1447
+ /* https://www.flickr.com/services/api/flickr.places.getShapeHistory.html */
1448
+ return $this->call('flickr.places.getShapeHistory', array('place_id' => $place_id, 'woe_id' => $woe_id));
1449
+ }
1450
+
1451
+ function places_getTopPlacesList ($place_type_id, $date = NULL, $woe_id = NULL, $place_id = NULL) {
1452
+ /* https://www.flickr.com/services/api/flickr.places.getTopPlacesList.html */
1453
+ return $this->call('flickr.places.getTopPlacesList', array('place_type_id' => $place_type_id, 'date' => $date, 'woe_id' => $woe_id, 'place_id' => $place_id));
1454
+ }
1455
+
1456
+ function places_placesForBoundingBox ($bbox, $place_type = NULL, $place_type_id = NULL, $recursive = NULL) {
1457
+ /* https://www.flickr.com/services/api/flickr.places.placesForBoundingBox.html */
1458
+ return $this->call('flickr.places.placesForBoundingBox', array('bbox' => $bbox, 'place_type' => $place_type, 'place_type_id' => $place_type_id, 'recursive' => $recursive));
1459
+ }
1460
+
1461
+ function places_placesForContacts ($place_type = NULL, $place_type_id = NULL, $woe_id = NULL, $place_id = NULL, $threshold = NULL, $contacts = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) {
1462
+ /* https://www.flickr.com/services/api/flickr.places.placesForContacts.html */
1463
+ return $this->call('flickr.places.placesForContacts', array('place_type' => $place_type, 'place_type_id' => $place_type_id, 'woe_id' => $woe_id, 'place_id' => $place_id, 'threshold' => $threshold, 'contacts' => $contacts, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date));
1464
+ }
1465
+
1466
+ function places_placesForTags ($place_type_id, $woe_id = NULL, $place_id = NULL, $threshold = NULL, $tags = NULL, $tag_mode = NULL, $machine_tags = NULL, $machine_tag_mode = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) {
1467
+ /* https://www.flickr.com/services/api/flickr.places.placesForTags.html */
1468
+ return $this->call('flickr.places.placesForTags', array('place_type_id' => $place_type_id, 'woe_id' => $woe_id, 'place_id' => $place_id, 'threshold' => $threshold, 'tags' => $tags, 'tag_mode' => $tag_mode, 'machine_tags' => $machine_tags, 'machine_tag_mode' => $machine_tag_mode, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date));
1469
+ }
1470
+
1471
+ function places_placesForUser ($place_type_id = NULL, $place_type = NULL, $woe_id = NULL, $place_id = NULL, $threshold = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) {
1472
+ /* https://www.flickr.com/services/api/flickr.places.placesForUser.html */
1473
+ return $this->call('flickr.places.placesForUser', array('place_type_id' => $place_type_id, 'place_type' => $place_type, 'woe_id' => $woe_id, 'place_id' => $place_id, 'threshold' => $threshold, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date));
1474
+ }
1475
+
1476
+ function places_resolvePlaceId ($place_id) {
1477
+ /* https://www.flickr.com/services/api/flickr.places.resolvePlaceId.html */
1478
+ $rsp = $this->call('flickr.places.resolvePlaceId', array('place_id' => $place_id));
1479
+ return $rsp ? $rsp['location'] : $rsp;
1480
+ }
1481
+
1482
+ function places_resolvePlaceURL ($url) {
1483
+ /* https://www.flickr.com/services/api/flickr.places.resolvePlaceURL.html */
1484
+ $rsp = $this->call('flickr.places.resolvePlaceURL', array('url' => $url));
1485
+ return $rsp ? $rsp['location'] : $rsp;
1486
+ }
1487
+
1488
+ function places_tagsForPlace ($woe_id = NULL, $place_id = NULL, $min_upload_date = NULL, $max_upload_date = NULL, $min_taken_date = NULL, $max_taken_date = NULL) {
1489
+ /* https://www.flickr.com/services/api/flickr.places.tagsForPlace.html */
1490
+ return $this->call('flickr.places.tagsForPlace', array('woe_id' => $woe_id, 'place_id' => $place_id, 'min_upload_date' => $min_upload_date, 'max_upload_date' => $max_upload_date, 'min_taken_date' => $min_taken_date, 'max_taken_date' => $max_taken_date));
1491
+ }
1492
+
1493
+ /* Prefs Methods */
1494
+ function prefs_getContentType () {
1495
+ /* https://www.flickr.com/services/api/flickr.prefs.getContentType.html */
1496
+ $rsp = $this->call('flickr.prefs.getContentType', array());
1497
+ return $rsp ? $rsp['person'] : $rsp;
1498
+ }
1499
+
1500
+ function prefs_getGeoPerms () {
1501
+ /* https://www.flickr.com/services/api/flickr.prefs.getGeoPerms.html */
1502
+ return $this->call('flickr.prefs.getGeoPerms', array());
1503
+ }
1504
+
1505
+ function prefs_getHidden () {
1506
+ /* https://www.flickr.com/services/api/flickr.prefs.getHidden.html */
1507
+ $rsp = $this->call('flickr.prefs.getHidden', array());
1508
+ return $rsp ? $rsp['person'] : $rsp;
1509
+ }
1510
+
1511
+ function prefs_getPrivacy () {
1512
+ /* https://www.flickr.com/services/api/flickr.prefs.getPrivacy.html */
1513
+ $rsp = $this->call('flickr.prefs.getPrivacy', array());
1514
+ return $rsp ? $rsp['person'] : $rsp;
1515
+ }
1516
+
1517
+ function prefs_getSafetyLevel () {
1518
+ /* https://www.flickr.com/services/api/flickr.prefs.getSafetyLevel.html */
1519
+ $rsp = $this->call('flickr.prefs.getSafetyLevel', array());
1520
+ return $rsp ? $rsp['person'] : $rsp;
1521
+ }
1522
+
1523
+ /* Reflection Methods */
1524
+ function reflection_getMethodInfo ($method_name) {
1525
+ /* https://www.flickr.com/services/api/flickr.reflection.getMethodInfo.html */
1526
+ $this->request("flickr.reflection.getMethodInfo", array("method_name" => $method_name));
1527
+ return $this->parsed_response ? $this->parsed_response : false;
1528
+ }
1529
+
1530
+ function reflection_getMethods () {
1531
+ /* https://www.flickr.com/services/api/flickr.reflection.getMethods.html */
1532
+ $this->request("flickr.reflection.getMethods");
1533
+ return $this->parsed_response ? $this->parsed_response['methods']['method'] : false;
1534
+ }
1535
+
1536
+ /* Stats Methods */
1537
+ function stats_getCollectionDomains ($date, $collection_id = NULL, $per_page = NULL, $page = NULL) {
1538
+ /* https://www.flickr.com/services/api/flickr.stats.getCollectionDomains.html */
1539
+ return $this->call('flickr.stats.getCollectionDomains', array('date' => $date, 'collection_id' => $collection_id, 'per_page' => $per_page, 'page' => $page));
1540
+ }
1541
+
1542
+ function stats_getCollectionReferrers ($date, $domain, $collection_id = NULL, $per_page = NULL, $page = NULL) {
1543
+ /* https://www.flickr.com/services/api/flickr.stats.getCollectionReferrers.html */
1544
+ return $this->call('flickr.stats.getCollectionReferrers', array('date' => $date, 'domain' => $domain, 'collection_id' => $collection_id, 'per_page' => $per_page, 'page' => $page));
1545
+ }
1546
+
1547
+ function stats_getCollectionStats ($date, $collection_id) {
1548
+ /* https://www.flickr.com/services/api/flickr.stats.getCollectionStats.html */
1549
+ return $this->call('flickr.stats.getCollectionStats', array('date' => $date, 'collection_id' => $collection_id));
1550
+ }
1551
+
1552
+ function stats_getCSVFiles () {
1553
+ /* https://www.flickr.com/services/api/flickr.stats.getCSVFiles.html */
1554
+ return $this->call('flickr.stats.getCSVFiles', array());
1555
+ }
1556
+
1557
+ function stats_getPhotoDomains ($date, $photo_id = NULL, $per_page = NULL, $page = NULL) {
1558
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotoDomains.html */
1559
+ return $this->call('flickr.stats.getPhotoDomains', array('date' => $date, 'photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page));
1560
+ }
1561
+
1562
+ function stats_getPhotoReferrers ($date, $domain, $photo_id = NULL, $per_page = NULL, $page = NULL) {
1563
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotoReferrers.html */
1564
+ return $this->call('flickr.stats.getPhotoReferrers', array('date' => $date, 'domain' => $domain, 'photo_id' => $photo_id, 'per_page' => $per_page, 'page' => $page));
1565
+ }
1566
+
1567
+ function stats_getPhotosetDomains ($date, $photoset_id = NULL, $per_page = NULL, $page = NULL) {
1568
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotosetDomains.html */
1569
+ return $this->call('flickr.stats.getPhotosetDomains', array('date' => $date, 'photoset_id' => $photoset_id, 'per_page' => $per_page, 'page' => $page));
1570
+ }
1571
+
1572
+ function stats_getPhotosetReferrers ($date, $domain, $photoset_id = NULL, $per_page = NULL, $page = NULL) {
1573
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotosetReferrers.html */
1574
+ return $this->call('flickr.stats.getPhotosetReferrers', array('date' => $date, 'domain' => $domain, 'photoset_id' => $photoset_id, 'per_page' => $per_page, 'page' => $page));
1575
+ }
1576
+
1577
+ function stats_getPhotosetStats ($date, $photoset_id) {
1578
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotosetStats.html */
1579
+ return $this->call('flickr.stats.getPhotosetStats', array('date' => $date, 'photoset_id' => $photoset_id));
1580
+ }
1581
+
1582
+ function stats_getPhotoStats ($date, $photo_id) {
1583
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotoStats.html */
1584
+ return $this->call('flickr.stats.getPhotoStats', array('date' => $date, 'photo_id' => $photo_id));
1585
+ }
1586
+
1587
+ function stats_getPhotostreamDomains ($date, $per_page = NULL, $page = NULL) {
1588
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamDomains.html */
1589
+ return $this->call('flickr.stats.getPhotostreamDomains', array('date' => $date, 'per_page' => $per_page, 'page' => $page));
1590
+ }
1591
+
1592
+ function stats_getPhotostreamReferrers ($date, $domain, $per_page = NULL, $page = NULL) {
1593
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamReferrers.html */
1594
+ return $this->call('flickr.stats.getPhotostreamReferrers', array('date' => $date, 'domain' => $domain, 'per_page' => $per_page, 'page' => $page));
1595
+ }
1596
+
1597
+ function stats_getPhotostreamStats ($date) {
1598
+ /* https://www.flickr.com/services/api/flickr.stats.getPhotostreamStats.html */
1599
+ return $this->call('flickr.stats.getPhotostreamStats', array('date' => $date));
1600
+ }
1601
+
1602
+ function stats_getPopularPhotos ($date = NULL, $sort = NULL, $per_page = NULL, $page = NULL) {
1603
+ /* https://www.flickr.com/services/api/flickr.stats.getPopularPhotos.html */
1604
+ return $this->call('flickr.stats.getPopularPhotos', array('date' => $date, 'sort' => $sort, 'per_page' => $per_page, 'page' => $page));
1605
+ }
1606
+
1607
+ function stats_getTotalViews ($date = NULL) {
1608
+ /* https://www.flickr.com/services/api/flickr.stats.getTotalViews.html */
1609
+ return $this->call('flickr.stats.getTotalViews', array('date' => $date));
1610
+ }
1611
+
1612
+ /* Tags Methods */
1613
+ function tags_getClusterPhotos ($tag, $cluster_id) {
1614
+ /* https://www.flickr.com/services/api/flickr.tags.getClusterPhotos.html */
1615
+ return $this->call('flickr.tags.getClusterPhotos', array('tag' => $tag, 'cluster_id' => $cluster_id));
1616
+ }
1617
+
1618
+ function tags_getClusters ($tag) {
1619
+ /* https://www.flickr.com/services/api/flickr.tags.getClusters.html */
1620
+ return $this->call('flickr.tags.getClusters', array('tag' => $tag));
1621
+ }
1622
+
1623
+ function tags_getHotList ($period = NULL, $count = NULL) {
1624
+ /* https://www.flickr.com/services/api/flickr.tags.getHotList.html */
1625
+ $this->request("flickr.tags.getHotList", array("period" => $period, "count" => $count));
1626
+ return $this->parsed_response ? $this->parsed_response['hottags'] : false;
1627
+ }
1628
+
1629
+ function tags_getListPhoto ($photo_id) {
1630
+ /* https://www.flickr.com/services/api/flickr.tags.getListPhoto.html */
1631
+ $this->request("flickr.tags.getListPhoto", array("photo_id" => $photo_id));
1632
+ return $this->parsed_response ? $this->parsed_response['photo']['tags']['tag'] : false;
1633
+ }
1634
+
1635
+ function tags_getListUser ($user_id = NULL) {
1636
+ /* https://www.flickr.com/services/api/flickr.tags.getListUser.html */
1637
+ $this->request("flickr.tags.getListUser", array("user_id" => $user_id));
1638
+ return $this->parsed_response ? $this->parsed_response['who']['tags']['tag'] : false;
1639
+ }
1640
+
1641
+ function tags_getListUserPopular ($user_id = NULL, $count = NULL) {
1642
+ /* https://www.flickr.com/services/api/flickr.tags.getListUserPopular.html */
1643
+ $this->request("flickr.tags.getListUserPopular", array("user_id" => $user_id, "count" => $count));
1644
+ return $this->parsed_response ? $this->parsed_response['who']['tags']['tag'] : false;
1645
+ }
1646
+
1647
+ function tags_getListUserRaw ($tag = NULL) {
1648
+ /* https://www.flickr.com/services/api/flickr.tags.getListUserRaw.html */
1649
+ return $this->call('flickr.tags.getListUserRaw', array('tag' => $tag));
1650
+ }
1651
+
1652
+ function tags_getRelated ($tag) {
1653
+ /* https://www.flickr.com/services/api/flickr.tags.getRelated.html */
1654
+ $this->request("flickr.tags.getRelated", array("tag" => $tag));
1655
+ return $this->parsed_response ? $this->parsed_response['tags'] : false;
1656
+ }
1657
+
1658
+ function test_echo ($args = array()) {
1659
+ /* https://www.flickr.com/services/api/flickr.test.echo.html */
1660
+ $this->request("flickr.test.echo", $args);
1661
+ return $this->parsed_response ? $this->parsed_response : false;
1662
+ }
1663
+
1664
+ function test_login () {
1665
+ /* https://www.flickr.com/services/api/flickr.test.login.html */
1666
+ $this->request("flickr.test.login");
1667
+ return $this->parsed_response ? $this->parsed_response['user'] : false;
1668
+ }
1669
+
1670
+ function urls_getGroup ($group_id) {
1671
+ /* https://www.flickr.com/services/api/flickr.urls.getGroup.html */
1672
+ $this->request("flickr.urls.getGroup", array("group_id"=>$group_id));
1673
+ return $this->parsed_response ? $this->parsed_response['group']['url'] : false;
1674
+ }
1675
+
1676
+ function urls_getUserPhotos ($user_id = NULL) {
1677
+ /* https://www.flickr.com/services/api/flickr.urls.getUserPhotos.html */
1678
+ $this->request("flickr.urls.getUserPhotos", array("user_id"=>$user_id));
1679
+ return $this->parsed_response ? $this->parsed_response['user']['url'] : false;
1680
+ }
1681
+
1682
+ function urls_getUserProfile ($user_id = NULL) {
1683
+ /* https://www.flickr.com/services/api/flickr.urls.getUserProfile.html */
1684
+ $this->request("flickr.urls.getUserProfile", array("user_id"=>$user_id));
1685
+ return $this->parsed_response ? $this->parsed_response['user']['url'] : false;
1686
+ }
1687
+
1688
+ function urls_lookupGallery ($url) {
1689
+ /* https://www.flickr.com/services/api/flickr.urls.lookupGallery.html */
1690
+ return $this->call('flickr.urls.lookupGallery', array('url' => $url));
1691
+ }
1692
+
1693
+ function urls_lookupGroup ($url) {
1694
+ /* https://www.flickr.com/services/api/flickr.urls.lookupGroup.html */
1695
+ $this->request("flickr.urls.lookupGroup", array("url"=>$url));
1696
+ return $this->parsed_response ? $this->parsed_response['group'] : false;
1697
+ }
1698
+
1699
+ function urls_lookupUser ($url) {
1700
+ /* https://www.flickr.com/services/api/flickr.photos.notes.edit.html */
1701
+ $this->request("flickr.urls.lookupUser", array("url"=>$url));
1702
+ return $this->parsed_response ? $this->parsed_response['user'] : false;
1703
+ }
1704
+ }
1705
+ }
1706
+
1707
+ if ( !class_exists('phpFlickr_pager') ) {
1708
+ class phpFlickr_pager {
1709
+ var $phpFlickr, $per_page, $method, $args, $results, $global_phpFlickr;
1710
+ var $total = null, $page = 0, $pages = null, $photos, $_extra = null;
1711
+
1712
+
1713
+ function __construct($phpFlickr, $method = null, $args = null, $per_page = 30) {
1714
+ $this->per_page = $per_page;
1715
+ $this->method = $method;
1716
+ $this->args = $args;
1717
+ $this->set_phpFlickr($phpFlickr);
1718
+ }
1719
+
1720
+ function set_phpFlickr($phpFlickr) {
1721
+ if ( is_a($phpFlickr, 'phpFlickr') ) {
1722
+ $this->phpFlickr = $phpFlickr;
1723
+ if ( $this->phpFlickr->cache ) {
1724
+ $this->args['per_page'] = 500;
1725
+ } else {
1726
+ $this->args['per_page'] = (int) $this->per_page;
1727
+ }
1728
+ }
1729
+ }
1730
+
1731
+ function __sleep() {
1732
+ return array(
1733
+ 'method',
1734
+ 'args',
1735
+ 'per_page',
1736
+ 'page',
1737
+ '_extra',
1738
+ );
1739
+ }
1740
+
1741
+ function load($page) {
1742
+ $allowed_methods = array(
1743
+ 'flickr.photos.search' => 'photos',
1744
+ 'flickr.photosets.getPhotos' => 'photoset',
1745
+ );
1746
+ if ( !in_array($this->method, array_keys($allowed_methods)) ) return false;
1747
+
1748
+ if ( $this->phpFlickr->cache ) {
1749
+ $min = ($page - 1) * $this->per_page;
1750
+ $max = $page * $this->per_page - 1;
1751
+ if ( floor($min/500) == floor($max/500) ) {
1752
+ $this->args['page'] = floor($min/500) + 1;
1753
+ $this->results = $this->phpFlickr->call($this->method, $this->args);
1754
+ if ( $this->results ) {
1755
+ $this->results = $this->results[$allowed_methods[$this->method]];
1756
+ $this->photos = array_slice($this->results['photo'], $min % 500, $this->per_page);
1757
+ $this->total = $this->results['total'];
1758
+ $this->pages = ceil($this->results['total'] / $this->per_page);
1759
+ return true;
1760
+ } else {
1761
+ return false;
1762
+ }
1763
+ } else {
1764
+ $this->args['page'] = floor($min/500) + 1;
1765
+ $this->results = $this->phpFlickr->call($this->method, $this->args);
1766
+ if ( $this->results ) {
1767
+ $this->results = $this->results[$allowed_methods[$this->method]];
1768
+
1769
+ $this->photos = array_slice($this->results['photo'], $min % 500);
1770
+ $this->total = $this->results['total'];
1771
+ $this->pages = ceil($this->results['total'] / $this->per_page);
1772
+
1773
+ $this->args['page'] = floor($min/500) + 2;
1774
+ $this->results = $this->phpFlickr->call($this->method, $this->args);
1775
+ if ( $this->results ) {
1776
+ $this->results = $this->results[$allowed_methods[$this->method]];
1777
+ $this->photos = array_merge($this->photos, array_slice($this->results['photo'], 0, $max % 500 + 1));
1778
+ }
1779
+ return true;
1780
+ } else {
1781
+ return false;
1782
+ }
1783
+
1784
+ }
1785
+ } else {
1786
+ $this->args['page'] = $page;
1787
+ $this->results = $this->phpFlickr->call($this->method, $this->args);
1788
+ if ( $this->results ) {
1789
+ $this->results = $this->results[$allowed_methods[$this->method]];
1790
+
1791
+ $this->photos = $this->results['photo'];
1792
+ $this->total = $this->results['total'];
1793
+ $this->pages = $this->results['pages'];
1794
+ return true;
1795
+ } else {
1796
+ return false;
1797
+ }
1798
+ }
1799
+ }
1800
+
1801
+ function get($page = null) {
1802
+ if ( is_null($page) ) {
1803
+ $page = $this->page;
1804
+ } else {
1805
+ $this->page = $page;
1806
+ }
1807
+ if ( $this->load($page) ) {
1808
+ return $this->photos;
1809
+ }
1810
+ $this->total = 0;
1811
+ $this->pages = 0;
1812
+ return array();
1813
+ }
1814
+
1815
+ function next() {
1816
+ $this->page++;
1817
+ if ( $this->load($this->page) ) {
1818
+ return $this->photos;
1819
+ }
1820
+ $this->total = 0;
1821
+ $this->pages = 0;
1822
+ return array();
1823
+ }
1824
+
1825
+ }
1826
+ }
1827
+
1828
+ ?>
obfx_modules/social-sharing/css/public.css CHANGED
@@ -90,88 +90,88 @@
90
  }
91
 
92
  /* Social icons color */
93
- .obfx-sharing-inline a[href*="facebook"],
94
- .obfx-sharing a[href*="facebook"] {
95
  background-color: #3b5998;
96
  }
97
 
98
- .obfx-sharing-inline a[href*="twitter"],
99
- .obfx-sharing a[href*="twitter"] {
100
  background-color: #1da1f2;
101
  }
102
 
103
- .obfx-sharing-inline a[href*="google"],
104
- .obfx-sharing a[href*="google"] {
105
  background-color: #dd4b39;
106
  }
107
 
108
- .obfx-sharing-inline a[href*="pinterest"],
109
- .obfx-sharing a[href*="pinterest"] {
110
  background-color: #bd081c;
111
  }
112
 
113
- .obfx-sharing-inline a[href*="linkedin"],
114
- .obfx-sharing a[href*="linkedin"] {
115
  background-color: #0077b5;
116
  }
117
 
118
- .obfx-sharing-inline a[href*="tumblr"],
119
- .obfx-sharing a[href*="tumblr"] {
120
  background-color: #35465c;
121
  }
122
 
123
- .obfx-sharing-inline a[href*="reddit"],
124
- .obfx-sharing a[href*="reddit"] {
125
  background-color: #ff4500;
126
  }
127
 
128
- .obfx-sharing-inline a[href*="vk"],
129
- .obfx-sharing a[href*="vk"] {
130
  background-color: #45668e;
131
  }
132
 
133
- .obfx-sharing-inline a[href*="ok.ru"],
134
- .obfx-sharing a[href*="ok.ru"] {
135
  background-color: #f48420;
136
  }
137
 
138
- .obfx-sharing-inline a[href*="douban"],
139
- .obfx-sharing a[href*="douban"] {
140
  background-color: #228a31;
141
  }
142
 
143
- .obfx-sharing-inline a[href*="baidu"],
144
- .obfx-sharing a[href*="baidu"] {
145
  background-color: #de0f17;
146
  }
147
 
148
- .obfx-sharing-inline a[href*="xing"],
149
- .obfx-sharing a[href*="xing"] {
150
  background-color: #026466;
151
  }
152
 
153
- .obfx-sharing-inline a[href*="renren"],
154
- .obfx-sharing a[href*="renren"] {
155
  background-color: #227ec7;
156
  }
157
 
158
- .obfx-sharing-inline a[href*="weibo"],
159
- .obfx-sharing a[href*="weibo"] {
160
  background-color: #e6162d;
161
  }
162
 
163
- .obfx-sharing-inline a[href*="sms"],
164
- .obfx-sharing a[href*="sms"] {
165
  background-color: #00b901;
166
  }
167
 
168
- .obfx-sharing-inline a[href*="whatsapp"],
169
- .obfx-sharing a[href*="whatsapp"] {
170
  background-color: #20b038;
171
  }
172
 
173
- .obfx-sharing-inline a[href*="mail"],
174
- .obfx-sharing a[href*="mail"] {
175
  background-color: #58a9de;
176
  }
177
 
@@ -223,7 +223,6 @@
223
  padding: 0;
224
  border-radius: 0;
225
  opacity: 1;
226
- -webkit-box-shadow: none;
227
  box-shadow: none;
228
  line-height: 40px;
229
  }
90
  }
91
 
92
  /* Social icons color */
93
+ .obfx-sharing-inline a.btn-facebook,
94
+ .obfx-sharing a.facebook {
95
  background-color: #3b5998;
96
  }
97
 
98
+ .obfx-sharing-inline a.btn-twitter,
99
+ .obfx-sharing a.twitter {
100
  background-color: #1da1f2;
101
  }
102
 
103
+ .obfx-sharing-inline a.btn-googleplus,
104
+ .obfx-sharing a.googleplus {
105
  background-color: #dd4b39;
106
  }
107
 
108
+ .obfx-sharing-inline a.btn-pinterest,
109
+ .obfx-sharing a.pinterest {
110
  background-color: #bd081c;
111
  }
112
 
113
+ .obfx-sharing-inline a.btn-linkedin,
114
+ .obfx-sharing a.linkedin {
115
  background-color: #0077b5;
116
  }
117
 
118
+ .obfx-sharing-inline a.btn-tumblr,
119
+ .obfx-sharing a.tumblr {
120
  background-color: #35465c;
121
  }
122
 
123
+ .obfx-sharing-inline a.btn-reddit,
124
+ .obfx-sharing a.reddit {
125
  background-color: #ff4500;
126
  }
127
 
128
+ .obfx-sharing-inline a.btn-vkontakte,
129
+ .obfx-sharing a.vkontakte {
130
  background-color: #45668e;
131
  }
132
 
133
+ .obfx-sharing-inline a.btn-odnoklassniki,
134
+ .obfx-sharing a.odnoklassniki {
135
  background-color: #f48420;
136
  }
137
 
138
+ .obfx-sharing-inline a.btn-douban,
139
+ .obfx-sharing a.douban {
140
  background-color: #228a31;
141
  }
142
 
143
+ .obfx-sharing-inline a.btn-baidu,
144
+ .obfx-sharing a.baidu {
145
  background-color: #de0f17;
146
  }
147
 
148
+ .obfx-sharing-inline a.btn-xing,
149
+ .obfx-sharing a.xing {
150
  background-color: #026466;
151
  }
152
 
153
+ .obfx-sharing-inline a.btn-renren,
154
+ .obfx-sharing a.renren {
155
  background-color: #227ec7;
156
  }
157
 
158
+ .obfx-sharing-inline a.btn-weibo,
159
+ .obfx-sharing a.weibo {
160
  background-color: #e6162d;
161
  }
162
 
163
+ .obfx-sharing-inline a.btn-viber,
164
+ .obfx-sharing a.viber {
165
  background-color: #00b901;
166
  }
167
 
168
+ .obfx-sharing-inline a.btn-whatsapp,
169
+ .obfx-sharing a.whatsapp {
170
  background-color: #20b038;
171
  }
172
 
173
+ .obfx-sharing-inline a.btn-mail,
174
+ .obfx-sharing a.mail {
175
  background-color: #58a9de;
176
  }
177
 
223
  padding: 0;
224
  border-radius: 0;
225
  opacity: 1;
 
226
  box-shadow: none;
227
  line-height: 40px;
228
  }
obfx_modules/social-sharing/init.php CHANGED
@@ -159,7 +159,7 @@ class Social_Sharing_OBFX_Module extends Orbit_Fox_Module_Abstract {
159
  * @return mixed | array
160
  */
161
  public function hooks() {
162
- $this->loader->add_filter('kses_allowed_protocols', $this, 'custom_allowed_protocols' );
163
 
164
  if( $this -> get_option( 'socials_position' ) == 2 ) {
165
  $this->loader->add_filter('hestia_filter_blog_social_icons', $this, 'social_sharing_function' );
@@ -224,6 +224,8 @@ class Social_Sharing_OBFX_Module extends Orbit_Fox_Module_Abstract {
224
 
225
  /**
226
  * Add extra protocols to list of allowed protocols.
 
 
227
  *
228
  * @return array Updated list including extra protocols added.
229
  */
159
  * @return mixed | array
160
  */
161
  public function hooks() {
162
+ $this->loader->add_filter('kses_allowed_protocols', $this, 'custom_allowed_protocols', 1000 );
163
 
164
  if( $this -> get_option( 'socials_position' ) == 2 ) {
165
  $this->loader->add_filter('hestia_filter_blog_social_icons', $this, 'social_sharing_function' );
224
 
225
  /**
226
  * Add extra protocols to list of allowed protocols.
227
+ *
228
+ * @param array $protocols List of protocols from core.
229
  *
230
  * @return array Updated list including extra protocols added.
231
  */
obfx_modules/stats/views/dashboard-widget-tpl.php CHANGED
@@ -20,9 +20,9 @@ if ( trim( $desc ) != '' ) {
20
  $html_desc = '<hr/><small>' . $desc . '</small>';
21
  }
22
 
23
- $posts_data = '';
24
  $comments_data = '';
25
- $graph_shows = $this->get_option( 'graph_shows' );
26
  if ( $graph_shows == 0 || $graph_shows == 2 ) {
27
  $posts_data = 'data-posts="' . json_encode( $posts_count ) . '"';
28
  }
20
  $html_desc = '<hr/><small>' . $desc . '</small>';
21
  }
22
 
23
+ $posts_data = '';
24
  $comments_data = '';
25
+ $graph_shows = $this->get_option( 'graph_shows' );
26
  if ( $graph_shows == 0 || $graph_shows == 2 ) {
27
  $posts_data = 'data-posts="' . json_encode( $posts_count ) . '"';
28
  }
readme.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Orbit Fox Companion #
2
+ **Contributors:** [themeisle](https://profiles.wordpress.org/themeisle), [codeinwp](https://profiles.wordpress.org/codeinwp), [rodicaelena](https://profiles.wordpress.org/rodicaelena), [baicusandrei](https://profiles.wordpress.org/baicusandrei)
3
+ **Tags:** widget, admin, widgets, sharing, reporting, sections, themes, stock photos, custom icons, icons, menu icons, stock
4
+ **Requires at least:** 3.0
5
+ **Tested up to:** 4.9
6
+ **Requires PHP:** 5.3
7
+ **Stable tag:** trunk
8
+ **License:** GPLv2 or later
9
+ **License URI:** http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ **Enhance your website with extra functionality through modules like:** social media share buttons & icons, reporting, analytics(upcoming), security(upcoming) and caching(upcoming).
12
+
13
+ ## Description ##
14
+
15
+ Extend your theme functionality with <a href="https://themeisle.com/plugins/orbit-fox-companion/" rel="nofollow">Orbit Fox Companion</a> with various modules like Social Media Share Buttons & Icons, reporting, custom menu-icons and free stock featured images.
16
+
17
+ Orbit Fox is a user-centred plugin with an easy-to-use admin panel. One of the most important features is that modules will only be loaded if they meet two conditions. If they are needed and if they are compatible with your existing themes and plugins. This will cut down on the unnecessary bloating of your website.
18
+
19
+ **Why should I use this with Zerif/Hestia themes:**
20
+
21
+ - By using it along with our themes you gain access to a lot of useful widgets like **Testimonials**, **Our Focus**, **About Us** and more other.
22
+
23
+
24
+ **Why use our custom icons module:**
25
+
26
+ - Choose from a large variety of custom icons.
27
+
28
+ - No coding needed, you can leverage the power of our dropdown icons selector and choose the right icon for your menu.
29
+
30
+
31
+ **Why use our sharing module:**
32
+
33
+ - It's easy to use
34
+
35
+ - Enable sharing networks right from your admin dashboard and choose on what kind of devices you would like to show them.
36
+
37
+ - It’s fully customizable: You can easily optimise button location for according to the device your visitors will use.
38
+
39
+ Choose from more than 20+ social networks to share with full control for every device that your visitors use.
40
+
41
+ The sharing options can be positioned for the maximum effect according to whether the visitor is using a mobile device or desktop. Best of all they can be switched on/off from your WordPress instance.
42
+
43
+
44
+
45
+ We've also built some fantastic <a href="http://themeisle.com/wordpress-themes/free/" rel="nofollow" target="_blank">free themes</a> that work well with Orbit Fox Companion, check them out.
46
+
47
+ **Features:**
48
+
49
+ - Sharing module
50
+ - Reporting module
51
+ - Menu icons module
52
+ - Free stock photos module
53
+ - More widgets and sections for Hestia Theme
54
+ - More widgets and sections for Zerif Theme
55
+
56
+
57
+
58
+
59
+ ## Frequently Asked Questions ##
60
+
61
+ ### How I can get support for this plugin ? ###
62
+
63
+ You can learn more about Orbit Fox Companion and ask for help by <a href="https://themeisle.com/contact/" >visiting ThemeIsle website</a>.
64
+
65
+ ### What can I do with this plugin ###
66
+
67
+ This plugin extends the features of your themes by adding numerous widgets if you are using Zerif and Hestia themes and some modules for sharing and reporting for general use.
68
+
69
+
70
+ ## Installation ##
71
+
72
+ Activating the Orbit Fox Companion plugin is just like any other plugin. If you've uploaded the plugin package to your server already, skip to step 5 below:
73
+
74
+ 1. In your WordPress admin, go to **Plugins &gt; Add New**
75
+ 2. In the Search field type "Orbit Fox"
76
+ 3. Under "Orbit Fox Companion" click the **Install Now** link
77
+ 4. Once the process is complete, click the **Activate Plugin** link
78
+ 5. Now, you're able to use Orbit fox and setup the modules you need. These can be found at **Tools &gt; Orbit Fox Companion**
79
+ 6. Make the changes desired, then click the **Save changes** button at the bottom
80
+
81
+
82
+ ## Screenshots ##
83
+
84
+ 1. Screenshot 1. How you can enable/disable modules
85
+ 2. Screenshot 2. How the sharing module is looking
86
+ 3. Screenshot 3. How reports module is looking
87
+
88
+ ## Changelog ##
89
+ ### 2.1.1 - 2017-11-16 ###
90
+
91
+ * Adds compatibility with WordPress 4.9.
92
+
93
+
94
+ ### 2.1.0 - 2017-11-08 ###
95
+
96
+ * Adds custom icons menu module.
97
+ * Adds free stock images integration with mystock.photos .
98
+
99
+
100
+ ### 2.0.11 - 2017-10-19 ###
101
+
102
+ * Fixed alignment issue for titles in Hestia
103
+
104
+
105
+ ### 2.0.10 - 2017-10-18 ###
106
+
107
+ * Added selective refresh options for the Show/Hide frontpage controls in Hestia
108
+ * Make external links open in new tab for the frontpage sections in Hestia
109
+ * Added some new filters to control the number of items per row appear in the Features and Testimonials Frontpage section - http://docs.themeisle.com/article/669-how-to-add-4-feature-items-on-a-line-in-hestia
110
+
111
+
112
+ ### 2.0.9 - 2017-10-17 ###
113
+
114
+ * Enhanced layout for Hestia sections.
115
+
116
+
117
+ ### 2.0.8 - 2017-10-11 ###
118
+
119
+ * Fixed bug with URL protocols filter priority.
120
+ * Fixed bug with icons background styled by URL address.
121
+
122
+
123
+ ### 2.0.7 - 2017-10-02 ###
124
+
125
+ * New improved options for frontpage sections ordering/disabling in Hestia
126
+
127
+
128
+ ### 2.0.6 - 2017-09-19 ###
129
+
130
+ * Added selective refresh for titles options in the frontpage sections in Hestia
131
+
132
+
133
+ ### 2.0.5 - 2017-09-12 ###
134
+
135
+ * Added new Ribbon and Clients Bar sections in Hestia
136
+
137
+
138
+ ### 2.0.4 - 2017-09-11 ###
139
+
140
+ * Adds PHP minimum requirement.
141
+ * Fix for admin styles loading screen.
142
+
143
+
144
+ ### 2.0.3 - 2017-08-24 ###
145
+
146
+ * Improved compatibility with the new Hestia version.
147
+
148
+
149
+ ### 2.0.2 - 2017-08-16 ###
150
+
151
+ * Fix accordion not opening to display save buttons for modules
152
+
153
+
154
+ ### 2.0.1 - 2017-08-14 ###
155
+
156
+ * Fixed issues with grey icons in Hestia.
157
+ * Fixed Recommended Actions flags in customizer.
158
+
159
+
160
+
161
+ ### 1.0.3 ###
162
+
163
+ * New widgets for Rhea child theme
164
+ * Improved front page selection mechanism for Hestia
165
+
166
+ ### 1.0.1 ###
167
+
168
+ * Changed tested up to
169
+
170
+ ### 1.0.0 ###
171
+
172
+ * First version of the plugin
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Orbit Fox Companion ===
2
  Contributors: themeisle, codeinwp, rodicaelena, baicusandrei
3
- Tags: widget, admin, widgets, sharing, reporting, sections, themes
4
  Requires at least: 3.0
5
- Tested up to: 4.8
6
  Requires PHP: 5.3
7
  Stable tag: trunk
8
  License: GPLv2 or later
@@ -12,7 +12,7 @@ Enhance your website with extra functionality through modules like: social media
12
 
13
  == Description ==
14
 
15
- Extend your theme functionality with <a href="https://themeisle.com/plugins/orbit-fox-companion/" rel="nofollow">Orbit Fox Companion</a> with various modules like Social Media Share Buttons & Icons, reporting, analytics(upcoming), security(upcoming) and caching(upcoming).
16
 
17
  Orbit Fox is a user-centred plugin with an easy-to-use admin panel. One of the most important features is that modules will only be loaded if they meet two conditions. If they are needed and if they are compatible with your existing themes and plugins. This will cut down on the unnecessary bloating of your website.
18
 
@@ -21,6 +21,13 @@ Orbit Fox is a user-centred plugin with an easy-to-use admin panel. One of the m
21
  - By using it along with our themes you gain access to a lot of useful widgets like **Testimonials**, **Our Focus**, **About Us** and more other.
22
 
23
 
 
 
 
 
 
 
 
24
  **Why use our sharing module:**
25
 
26
  - It's easy to use
@@ -41,6 +48,8 @@ We've also built some fantastic <a href="http://themeisle.com/wordpress-themes/f
41
 
42
  - Sharing module
43
  - Reporting module
 
 
44
  - More widgets and sections for Hestia Theme
45
  - More widgets and sections for Zerif Theme
46
 
@@ -77,6 +86,45 @@ Activating the Orbit Fox Companion plugin is just like any other plugin. If you'
77
  3. Screenshot 3. How reports module is looking
78
 
79
  == Changelog ==
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80
  = 2.0.6 - 2017-09-19 =
81
 
82
  * Added selective refresh for titles options in the frontpage sections in Hestia
1
  === Orbit Fox Companion ===
2
  Contributors: themeisle, codeinwp, rodicaelena, baicusandrei
3
+ Tags: widget, admin, widgets, sharing, reporting, sections, themes, stock photos, custom icons, icons, menu icons, stock
4
  Requires at least: 3.0
5
+ Tested up to: 4.9
6
  Requires PHP: 5.3
7
  Stable tag: trunk
8
  License: GPLv2 or later
12
 
13
  == Description ==
14
 
15
+ Extend your theme functionality with <a href="https://themeisle.com/plugins/orbit-fox-companion/" rel="nofollow">Orbit Fox Companion</a> with various modules like Social Media Share Buttons & Icons, reporting, custom menu-icons and free stock featured images.
16
 
17
  Orbit Fox is a user-centred plugin with an easy-to-use admin panel. One of the most important features is that modules will only be loaded if they meet two conditions. If they are needed and if they are compatible with your existing themes and plugins. This will cut down on the unnecessary bloating of your website.
18
 
21
  - By using it along with our themes you gain access to a lot of useful widgets like **Testimonials**, **Our Focus**, **About Us** and more other.
22
 
23
 
24
+ **Why use our custom icons module:**
25
+
26
+ - Choose from a large variety of custom icons.
27
+
28
+ - No coding needed, you can leverage the power of our dropdown icons selector and choose the right icon for your menu.
29
+
30
+
31
  **Why use our sharing module:**
32
 
33
  - It's easy to use
48
 
49
  - Sharing module
50
  - Reporting module
51
+ - Menu icons module
52
+ - Free stock photos module
53
  - More widgets and sections for Hestia Theme
54
  - More widgets and sections for Zerif Theme
55
 
86
  3. Screenshot 3. How reports module is looking
87
 
88
  == Changelog ==
89
+ = 2.1.1 - 2017-11-16 =
90
+
91
+ * Adds compatibility with WordPress 4.9.
92
+
93
+
94
+ = 2.1.0 - 2017-11-08 =
95
+
96
+ * Adds custom icons menu module.
97
+ * Adds free stock images integration with mystock.photos .
98
+
99
+
100
+ = 2.0.11 - 2017-10-19 =
101
+
102
+ * Fixed alignment issue for titles in Hestia
103
+
104
+
105
+ = 2.0.10 - 2017-10-18 =
106
+
107
+ * Added selective refresh options for the Show/Hide frontpage controls in Hestia
108
+ * Make external links open in new tab for the frontpage sections in Hestia
109
+ * Added some new filters to control the number of items per row appear in the Features and Testimonials Frontpage section - http://docs.themeisle.com/article/669-how-to-add-4-feature-items-on-a-line-in-hestia
110
+
111
+
112
+ = 2.0.9 - 2017-10-17 =
113
+
114
+ * Enhanced layout for Hestia sections.
115
+
116
+
117
+ = 2.0.8 - 2017-10-11 =
118
+
119
+ * Fixed bug with URL protocols filter priority.
120
+ * Fixed bug with icons background styled by URL address.
121
+
122
+
123
+ = 2.0.7 - 2017-10-02 =
124
+
125
+ * New improved options for frontpage sections ordering/disabling in Hestia
126
+
127
+
128
  = 2.0.6 - 2017-09-19 =
129
 
130
  * Added selective refresh for titles options in the frontpage sections in Hestia
themeisle-companion.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://themeisle.com/plugins/orbit-fox-companion
17
  * Description: Enhances ThemeIsle's themes with extra functionality.
18
- * Version: 2.0.6
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
@@ -77,6 +77,12 @@ function run_orbit_fox() {
77
  return $products;
78
  }
79
  );
 
 
 
 
 
 
80
  }
81
 
82
  require( 'class-autoloader.php' );
15
  * Plugin Name: Orbit Fox Companion
16
  * Plugin URI: https://themeisle.com/plugins/orbit-fox-companion
17
  * Description: Enhances ThemeIsle's themes with extra functionality.
18
+ * Version: 2.1.1
19
  * Author: Themeisle
20
  * Author URI: https://themeisle.com
21
  * License: GPL-2.0+
77
  return $products;
78
  }
79
  );
80
+
81
+ add_filter(
82
+ 'themeisle_companion_friendly_name', function( $name ) {
83
+ return 'Orbit Fox ( former ThemeIsle Companion )';
84
+ }
85
+ );
86
  }
87
 
88
  require( 'class-autoloader.php' );
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit8e2a7ffc39fa568c5785487ec0fdeb5c::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f::getLoader();
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php CHANGED
@@ -22,21 +22,21 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
22
  * @var array $options_plugin The main options list for plugins.
23
  */
24
  private $options_plugin = array(
25
- 'I only needed the plugin for a short period' => array(
26
  'id' => 1,
27
  ),
28
- 'The plugin broke my site' => array(
29
  'id' => 2,
30
  ),
31
- 'I found a better plugin' => array(
32
  'id' => 3,
33
  'type' => 'text',
34
  'placeholder' => 'What\'s the plugin\'s name?',
35
  ),
36
- 'The plugin suddenly stopped working' => array(
37
  'id' => 4,
38
  ),
39
- 'I no longer need the plugin' => array(
40
  'id' => 5,
41
  'type' => 'textarea',
42
  'placeholder' => 'If you could improve one thing about our product, what would it be?',
@@ -50,13 +50,13 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
50
  * @var array $options_theme The main options list for themes.
51
  */
52
  private $options_theme = array(
53
- 'I don\'t know how to make it look like demo' => array(
54
  'id' => 7,
55
  ),
56
- 'It lacks options' => array(
57
  'id' => 8,
58
  ),
59
- 'Is not working with a plugin that I need' => array(
60
  'id' => 9,
61
  'type' => 'text',
62
  'placeholder' => 'What is the name of the plugin',
@@ -409,10 +409,10 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
409
 
410
  $list = '';
411
  foreach ( $options as $title => $attributes ) {
412
- $id = $attributes['id'];
413
  $list .= '<li ti-option-id="' . $id . '"><input type="radio" name="ti-deactivate-option" id="' . $key . $id . '"><label for="' . $key . $id . '">' . str_replace( '{theme}', $this->product->get_name(), $title ) . '</label>';
414
  if ( array_key_exists( 'type', $attributes ) ) {
415
- $list .= '<div>';
416
  $placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
417
  switch ( $attributes['type'] ) {
418
  case 'text':
@@ -431,7 +431,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
431
  . '<ul class="ti-list">' . $list . '</ul>'
432
  . '<div class="actions">'
433
  . get_submit_button(
434
- $button_submit_before , 'secondary', $this->product->get_key() . 'ti-deactivate-yes', false, array(
435
  'data-after-text' => $button_submit,
436
  )
437
  )
22
  * @var array $options_plugin The main options list for plugins.
23
  */
24
  private $options_plugin = array(
25
+ 'I only needed the plugin for a short period' => array(
26
  'id' => 1,
27
  ),
28
+ 'The plugin broke my site' => array(
29
  'id' => 2,
30
  ),
31
+ 'I found a better plugin' => array(
32
  'id' => 3,
33
  'type' => 'text',
34
  'placeholder' => 'What\'s the plugin\'s name?',
35
  ),
36
+ 'The plugin suddenly stopped working' => array(
37
  'id' => 4,
38
  ),
39
+ 'I no longer need the plugin' => array(
40
  'id' => 5,
41
  'type' => 'textarea',
42
  'placeholder' => 'If you could improve one thing about our product, what would it be?',
50
  * @var array $options_theme The main options list for themes.
51
  */
52
  private $options_theme = array(
53
+ 'I don\'t know how to make it look like demo' => array(
54
  'id' => 7,
55
  ),
56
+ 'It lacks options' => array(
57
  'id' => 8,
58
  ),
59
+ 'Is not working with a plugin that I need' => array(
60
  'id' => 9,
61
  'type' => 'text',
62
  'placeholder' => 'What is the name of the plugin',
409
 
410
  $list = '';
411
  foreach ( $options as $title => $attributes ) {
412
+ $id = $attributes['id'];
413
  $list .= '<li ti-option-id="' . $id . '"><input type="radio" name="ti-deactivate-option" id="' . $key . $id . '"><label for="' . $key . $id . '">' . str_replace( '{theme}', $this->product->get_name(), $title ) . '</label>';
414
  if ( array_key_exists( 'type', $attributes ) ) {
415
+ $list .= '<div>';
416
  $placeholder = array_key_exists( 'placeholder', $attributes ) ? $attributes['placeholder'] : '';
417
  switch ( $attributes['type'] ) {
418
  case 'text':
431
  . '<ul class="ti-list">' . $list . '</ul>'
432
  . '<div class="actions">'
433
  . get_submit_button(
434
+ $button_submit_before, 'secondary', $this->product->get_key() . 'ti-deactivate-yes', false, array(
435
  'data-after-text' => $button_submit,
436
  )
437
  )
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php CHANGED
@@ -21,7 +21,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
21
  /**
22
  * @var array $instances collection of the instances that are registered with the factory
23
  */
24
- private $_instances = array();
25
 
26
  /**
27
  * ThemeIsle_SDK_Feedback_Factory constructor.
@@ -32,8 +32,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
32
  public function __construct( $product_object, $feedback_types ) {
33
  if ( $product_object instanceof ThemeIsle_SDK_Product && $feedback_types && is_array( $feedback_types ) ) {
34
  foreach ( $feedback_types as $type ) {
35
- $class = 'ThemeIsle_SDK_Feedback_' . ucwords( $type );
36
- $instance = new $class( $product_object );
37
  $this->_instances[ $type ] = $instance;
38
  $instance->setup_hooks();
39
  }
21
  /**
22
  * @var array $instances collection of the instances that are registered with the factory
23
  */
24
+ private $_instances = array();
25
 
26
  /**
27
  * ThemeIsle_SDK_Feedback_Factory constructor.
32
  public function __construct( $product_object, $feedback_types ) {
33
  if ( $product_object instanceof ThemeIsle_SDK_Product && $feedback_types && is_array( $feedback_types ) ) {
34
  foreach ( $feedback_types as $type ) {
35
+ $class = 'ThemeIsle_SDK_Feedback_' . ucwords( $type );
36
+ $instance = new $class( $product_object );
37
  $this->_instances[ $type ] = $instance;
38
  $instance->setup_hooks();
39
  }
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php CHANGED
@@ -21,7 +21,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
21
  /**
22
  * @var string $heading The heading of the modal
23
  */
24
- private $heading = 'Hey, it’s great to see you have {product} active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}';
 
 
 
 
 
25
 
26
  /**
27
  * @var string $button_cancel The text of the cancel button
@@ -56,9 +61,11 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
56
  }
57
 
58
  /**
59
- * Shows the notification
 
 
60
  */
61
- function show_notification() {
62
  if ( ! $this->product->is_wordpress_available() ) {
63
  $this->disable();
64
 
@@ -68,11 +75,26 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
68
  if ( 'no' === $show ) {
69
  return false;
70
  }
71
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
 
 
 
 
 
 
 
 
72
 
73
  return true;
74
  }
75
 
 
 
 
 
 
 
 
76
  /**
77
  * Shows the admin notice
78
  */
@@ -144,15 +166,17 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Review' ) ) :
144
  $heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
145
  $heading = str_replace(
146
  array( '{product}' ),
147
- trim( str_replace( 'Lite', '', $this->product->get_name() ) ), $heading
148
  );
149
  $heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
150
 
151
  $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
152
  $button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
 
153
 
154
  return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
155
  . '<p>' . $heading . '</p>'
 
156
  . '<div class="actions">'
157
  . '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
158
  . get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
21
  /**
22
  * @var string $heading The heading of the modal
23
  */
24
+ private $heading = 'Hey, it’s great to see you have <b>{product}</b> active for a few days now. How is everything going? If you can spare a few moments to rate it on WordPress.org it would help us a lot (and boost my motivation). Cheers! <br/> <br/>~ {developer}, developer of {product}';
25
+
26
+ /**
27
+ * @var string $msg The text of the modal
28
+ */
29
+ private $msg = '';
30
 
31
  /**
32
  * @var string $button_cancel The text of the cancel button
61
  }
62
 
63
  /**
64
+ * Either we can notify or not.
65
+ *
66
+ * @return bool Notification available or not.
67
  */
68
+ public function can_notify() {
69
  if ( ! $this->product->is_wordpress_available() ) {
70
  $this->disable();
71
 
75
  if ( 'no' === $show ) {
76
  return false;
77
  }
78
+ $finally_show = apply_filters( $this->product->get_key() . '_feedback_review_trigger', true );
79
+ if ( false !== $finally_show ) {
80
+ if ( is_array( $finally_show ) && ! empty( $finally_show ) ) {
81
+ $this->heading = $finally_show['heading'];
82
+ $this->msg = $finally_show['msg'];
83
+ }
84
+ } else {
85
+ return false;
86
+ }
87
 
88
  return true;
89
  }
90
 
91
+ /**
92
+ * Shows the notification
93
+ */
94
+ function show_notification() {
95
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
96
+ }
97
+
98
  /**
99
  * Shows the admin notice
100
  */
166
  $heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
167
  $heading = str_replace(
168
  array( '{product}' ),
169
+ $this->product->get_friendly_name(), $heading
170
  );
171
  $heading = str_replace( '{developer}', $this->developers[ $this->product->get_type() ][ rand( 0, ( count( $this->developers[ $this->product->get_type() ] ) - 1 ) ) ], $heading );
172
 
173
  $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
174
  $button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
175
+ $msg = apply_filters( $this->product->get_key() . '_feedback_review_message', $this->msg );
176
 
177
  return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
178
  . '<p>' . $heading . '</p>'
179
+ . ( $msg ? '<p>' . $msg . '</p>' : '' )
180
  . '<div class="actions">'
181
  . '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
182
  . get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-translate.php ADDED
@@ -0,0 +1,983 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Translate feedback model class for ThemeIsle SDK
4
+ *
5
+ * @package ThemeIsleSDK
6
+ * @subpackage Feedback
7
+ * @copyright Copyright (c) 2017, Marius Cristea
8
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
+ * @since 1.0.0
10
+ */
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Translate' ) ) :
16
+ /**
17
+ * Translate feedback model for ThemeIsle SDK.
18
+ */
19
+ class ThemeIsle_SDK_Feedback_Translate extends ThemeIsle_SDK_Feedback {
20
+
21
+ /**
22
+ * @var string $heading The heading of the modal
23
+ */
24
+ private $heading = 'Improve {product}';
25
+ /**
26
+ * @var string The message.
27
+ */
28
+ private $msg = 'Translating <b>{product}</b> into as many languages as possible is a huge project. We still need help with a lot of them, so if you are good at translating into <b>{language}</b>, it would be greatly appreciated.
29
+ The process is easy, and you can join by following the link below!';
30
+ /**
31
+ * @var string $button_cancel The text of the cancel button
32
+ */
33
+ private $button_cancel = 'No, thanks.';
34
+ /**
35
+ * @var string $button_already The text of the already did it button
36
+ */
37
+ private $button_do = 'Ok, I will gladly help.';
38
+ /**
39
+ * @var array Array of available locals.
40
+ */
41
+ private $locales = array(
42
+ 'af' => array(
43
+ 'slug' => 'af',
44
+ 'name' => 'Afrikaans',
45
+ ),
46
+ 'ak' => array(
47
+ 'slug' => 'ak',
48
+ 'name' => 'Akan',
49
+ ),
50
+ 'am' => array(
51
+ 'slug' => 'am',
52
+ 'name' => 'Amharic',
53
+ ),
54
+ 'ar' => array(
55
+ 'slug' => 'ar',
56
+ 'name' => 'Arabic',
57
+ ),
58
+ 'arq' => array(
59
+ 'slug' => 'arq',
60
+ 'name' => 'Algerian Arabic',
61
+ ),
62
+ 'ary' => array(
63
+ 'slug' => 'ary',
64
+ 'name' => 'Moroccan Arabic',
65
+ ),
66
+ 'as' => array(
67
+ 'slug' => 'as',
68
+ 'name' => 'Assamese',
69
+ ),
70
+ 'ast' => array(
71
+ 'slug' => 'ast',
72
+ 'name' => 'Asturian',
73
+ ),
74
+ 'az' => array(
75
+ 'slug' => 'az',
76
+ 'name' => 'Azerbaijani',
77
+ ),
78
+ 'azb' => array(
79
+ 'slug' => 'azb',
80
+ 'name' => 'South Azerbaijani',
81
+ ),
82
+ 'az_TR' => array(
83
+ 'slug' => 'az-tr',
84
+ 'name' => 'Azerbaijani (Turkey)',
85
+ ),
86
+ 'ba' => array(
87
+ 'slug' => 'ba',
88
+ 'name' => 'Bashkir',
89
+ ),
90
+ 'bal' => array(
91
+ 'slug' => 'bal',
92
+ 'name' => 'Catalan (Balear)',
93
+ ),
94
+ 'bcc' => array(
95
+ 'slug' => 'bcc',
96
+ 'name' => 'Balochi Southern',
97
+ ),
98
+ 'bel' => array(
99
+ 'slug' => 'bel',
100
+ 'name' => 'Belarusian',
101
+ ),
102
+ 'bg_BG' => array(
103
+ 'slug' => 'bg',
104
+ 'name' => 'Bulgarian',
105
+ ),
106
+ 'bn_BD' => array(
107
+ 'slug' => 'bn',
108
+ 'name' => 'Bengali',
109
+ ),
110
+ 'bo' => array(
111
+ 'slug' => 'bo',
112
+ 'name' => 'Tibetan',
113
+ ),
114
+ 'bre' => array(
115
+ 'slug' => 'br',
116
+ 'name' => 'Breton',
117
+ ),
118
+ 'bs_BA' => array(
119
+ 'slug' => 'bs',
120
+ 'name' => 'Bosnian',
121
+ ),
122
+ 'ca' => array(
123
+ 'slug' => 'ca',
124
+ 'name' => 'Catalan',
125
+ ),
126
+ 'ceb' => array(
127
+ 'slug' => 'ceb',
128
+ 'name' => 'Cebuano',
129
+ ),
130
+ 'ckb' => array(
131
+ 'slug' => 'ckb',
132
+ 'name' => 'Kurdish (Sorani)',
133
+ ),
134
+ 'co' => array(
135
+ 'slug' => 'co',
136
+ 'name' => 'Corsican',
137
+ ),
138
+ 'cs_CZ' => array(
139
+ 'slug' => 'cs',
140
+ 'name' => 'Czech',
141
+ ),
142
+ 'cy' => array(
143
+ 'slug' => 'cy',
144
+ 'name' => 'Welsh',
145
+ ),
146
+ 'da_DK' => array(
147
+ 'slug' => 'da',
148
+ 'name' => 'Danish',
149
+ ),
150
+ 'de_DE' => array(
151
+ 'slug' => 'de',
152
+ 'name' => 'German',
153
+ ),
154
+ 'de_CH' => array(
155
+ 'slug' => 'de-ch',
156
+ 'name' => 'German (Switzerland)',
157
+ ),
158
+ 'dv' => array(
159
+ 'slug' => 'dv',
160
+ 'name' => 'Dhivehi',
161
+ ),
162
+ 'dzo' => array(
163
+ 'slug' => 'dzo',
164
+ 'name' => 'Dzongkha',
165
+ ),
166
+ 'el' => array(
167
+ 'slug' => 'el',
168
+ 'name' => 'Greek',
169
+ ),
170
+ 'art_xemoji' => array(
171
+ 'slug' => 'art-xemoji',
172
+ 'name' => 'Emoji',
173
+ ),
174
+ 'en_US' => array(
175
+ 'slug' => 'en',
176
+ 'name' => 'English',
177
+ ),
178
+ 'en_AU' => array(
179
+ 'slug' => 'en-au',
180
+ 'name' => 'English (Australia)',
181
+ ),
182
+ 'en_CA' => array(
183
+ 'slug' => 'en-ca',
184
+ 'name' => 'English (Canada)',
185
+ ),
186
+ 'en_GB' => array(
187
+ 'slug' => 'en-gb',
188
+ 'name' => 'English (UK)',
189
+ ),
190
+ 'en_NZ' => array(
191
+ 'slug' => 'en-nz',
192
+ 'name' => 'English (New Zealand)',
193
+ ),
194
+ 'en_ZA' => array(
195
+ 'slug' => 'en-za',
196
+ 'name' => 'English (South Africa)',
197
+ ),
198
+ 'eo' => array(
199
+ 'slug' => 'eo',
200
+ 'name' => 'Esperanto',
201
+ ),
202
+ 'es_ES' => array(
203
+ 'slug' => 'es',
204
+ 'name' => 'Spanish (Spain)',
205
+ ),
206
+ 'es_AR' => array(
207
+ 'slug' => 'es-ar',
208
+ 'name' => 'Spanish (Argentina)',
209
+ ),
210
+ 'es_CL' => array(
211
+ 'slug' => 'es-cl',
212
+ 'name' => 'Spanish (Chile)',
213
+ ),
214
+ 'es_CO' => array(
215
+ 'slug' => 'es-co',
216
+ 'name' => 'Spanish (Colombia)',
217
+ ),
218
+ 'es_CR' => array(
219
+ 'slug' => 'es-cr',
220
+ 'name' => 'Spanish (Costa Rica)',
221
+ ),
222
+ 'es_GT' => array(
223
+ 'slug' => 'es-gt',
224
+ 'name' => 'Spanish (Guatemala)',
225
+ ),
226
+ 'es_MX' => array(
227
+ 'slug' => 'es-mx',
228
+ 'name' => 'Spanish (Mexico)',
229
+ ),
230
+ 'es_PE' => array(
231
+ 'slug' => 'es-pe',
232
+ 'name' => 'Spanish (Peru)',
233
+ ),
234
+ 'es_PR' => array(
235
+ 'slug' => 'es-pr',
236
+ 'name' => 'Spanish (Puerto Rico)',
237
+ ),
238
+ 'es_VE' => array(
239
+ 'slug' => 'es-ve',
240
+ 'name' => 'Spanish (Venezuela)',
241
+ ),
242
+ 'et' => array(
243
+ 'slug' => 'et',
244
+ 'name' => 'Estonian',
245
+ ),
246
+ 'eu' => array(
247
+ 'slug' => 'eu',
248
+ 'name' => 'Basque',
249
+ ),
250
+ 'fa_IR' => array(
251
+ 'slug' => 'fa',
252
+ 'name' => 'Persian',
253
+ ),
254
+ 'fa_AF' => array(
255
+ 'slug' => 'fa-af',
256
+ 'name' => 'Persian (Afghanistan)',
257
+ ),
258
+ 'fuc' => array(
259
+ 'slug' => 'fuc',
260
+ 'name' => 'Fulah',
261
+ ),
262
+ 'fi' => array(
263
+ 'slug' => 'fi',
264
+ 'name' => 'Finnish',
265
+ ),
266
+ 'fo' => array(
267
+ 'slug' => 'fo',
268
+ 'name' => 'Faroese',
269
+ ),
270
+ 'fr_FR' => array(
271
+ 'slug' => 'fr',
272
+ 'name' => 'French (France)',
273
+ ),
274
+ 'fr_BE' => array(
275
+ 'slug' => 'fr-be',
276
+ 'name' => 'French (Belgium)',
277
+ ),
278
+ 'fr_CA' => array(
279
+ 'slug' => 'fr-ca',
280
+ 'name' => 'French (Canada)',
281
+ ),
282
+ 'frp' => array(
283
+ 'slug' => 'frp',
284
+ 'name' => 'Arpitan',
285
+ ),
286
+ 'fur' => array(
287
+ 'slug' => 'fur',
288
+ 'name' => 'Friulian',
289
+ ),
290
+ 'fy' => array(
291
+ 'slug' => 'fy',
292
+ 'name' => 'Frisian',
293
+ ),
294
+ 'ga' => array(
295
+ 'slug' => 'ga',
296
+ 'name' => 'Irish',
297
+ ),
298
+ 'gd' => array(
299
+ 'slug' => 'gd',
300
+ 'name' => 'Scottish Gaelic',
301
+ ),
302
+ 'gl_ES' => array(
303
+ 'slug' => 'gl',
304
+ 'name' => 'Galician',
305
+ ),
306
+ 'gn' => array(
307
+ 'slug' => 'gn',
308
+ 'name' => 'Guaraní',
309
+ ),
310
+ 'gsw' => array(
311
+ 'slug' => 'gsw',
312
+ 'name' => 'Swiss German',
313
+ ),
314
+ 'gu' => array(
315
+ 'slug' => 'gu',
316
+ 'name' => 'Gujarati',
317
+ ),
318
+ 'hat' => array(
319
+ 'slug' => 'hat',
320
+ 'name' => 'Haitian Creole',
321
+ ),
322
+ 'hau' => array(
323
+ 'slug' => 'hau',
324
+ 'name' => 'Hausa',
325
+ ),
326
+ 'haw_US' => array(
327
+ 'slug' => 'haw',
328
+ 'name' => 'Hawaiian',
329
+ ),
330
+ 'haz' => array(
331
+ 'slug' => 'haz',
332
+ 'name' => 'Hazaragi',
333
+ ),
334
+ 'he_IL' => array(
335
+ 'slug' => 'he',
336
+ 'name' => 'Hebrew',
337
+ ),
338
+ 'hi_IN' => array(
339
+ 'slug' => 'hi',
340
+ 'name' => 'Hindi',
341
+ ),
342
+ 'hr' => array(
343
+ 'slug' => 'hr',
344
+ 'name' => 'Croatian',
345
+ ),
346
+ 'hu_HU' => array(
347
+ 'slug' => 'hu',
348
+ 'name' => 'Hungarian',
349
+ ),
350
+ 'hy' => array(
351
+ 'slug' => 'hy',
352
+ 'name' => 'Armenian',
353
+ ),
354
+ 'id_ID' => array(
355
+ 'slug' => 'id',
356
+ 'name' => 'Indonesian',
357
+ ),
358
+ 'ido' => array(
359
+ 'slug' => 'ido',
360
+ 'name' => 'Ido',
361
+ ),
362
+ 'is_IS' => array(
363
+ 'slug' => 'is',
364
+ 'name' => 'Icelandic',
365
+ ),
366
+ 'it_IT' => array(
367
+ 'slug' => 'it',
368
+ 'name' => 'Italian',
369
+ ),
370
+ 'ja' => array(
371
+ 'slug' => 'ja',
372
+ 'name' => 'Japanese',
373
+ ),
374
+ 'jv_ID' => array(
375
+ 'slug' => 'jv',
376
+ 'name' => 'Javanese',
377
+ ),
378
+ 'ka_GE' => array(
379
+ 'slug' => 'ka',
380
+ 'name' => 'Georgian',
381
+ ),
382
+ 'kab' => array(
383
+ 'slug' => 'kab',
384
+ 'name' => 'Kabyle',
385
+ ),
386
+ 'kal' => array(
387
+ 'slug' => 'kal',
388
+ 'name' => 'Greenlandic',
389
+ ),
390
+ 'kin' => array(
391
+ 'slug' => 'kin',
392
+ 'name' => 'Kinyarwanda',
393
+ ),
394
+ 'kk' => array(
395
+ 'slug' => 'kk',
396
+ 'name' => 'Kazakh',
397
+ ),
398
+ 'km' => array(
399
+ 'slug' => 'km',
400
+ 'name' => 'Khmer',
401
+ ),
402
+ 'kn' => array(
403
+ 'slug' => 'kn',
404
+ 'name' => 'Kannada',
405
+ ),
406
+ 'ko_KR' => array(
407
+ 'slug' => 'ko',
408
+ 'name' => 'Korean',
409
+ ),
410
+ 'kir' => array(
411
+ 'slug' => 'kir',
412
+ 'name' => 'Kyrgyz',
413
+ ),
414
+ 'lb_LU' => array(
415
+ 'slug' => 'lb',
416
+ 'name' => 'Luxembourgish',
417
+ ),
418
+ 'li' => array(
419
+ 'slug' => 'li',
420
+ 'name' => 'Limburgish',
421
+ ),
422
+ 'lin' => array(
423
+ 'slug' => 'lin',
424
+ 'name' => 'Lingala',
425
+ ),
426
+ 'lo' => array(
427
+ 'slug' => 'lo',
428
+ 'name' => 'Lao',
429
+ ),
430
+ 'lt_LT' => array(
431
+ 'slug' => 'lt',
432
+ 'name' => 'Lithuanian',
433
+ ),
434
+ 'lv' => array(
435
+ 'slug' => 'lv',
436
+ 'name' => 'Latvian',
437
+ ),
438
+ 'me_ME' => array(
439
+ 'slug' => 'me',
440
+ 'name' => 'Montenegrin',
441
+ ),
442
+ 'mg_MG' => array(
443
+ 'slug' => 'mg',
444
+ 'name' => 'Malagasy',
445
+ ),
446
+ 'mk_MK' => array(
447
+ 'slug' => 'mk',
448
+ 'name' => 'Macedonian',
449
+ ),
450
+ 'ml_IN' => array(
451
+ 'slug' => 'ml',
452
+ 'name' => 'Malayalam',
453
+ ),
454
+ 'mlt' => array(
455
+ 'slug' => 'mlt',
456
+ 'name' => 'Maltese',
457
+ ),
458
+ 'mn' => array(
459
+ 'slug' => 'mn',
460
+ 'name' => 'Mongolian',
461
+ ),
462
+ 'mr' => array(
463
+ 'slug' => 'mr',
464
+ 'name' => 'Marathi',
465
+ ),
466
+ 'mri' => array(
467
+ 'slug' => 'mri',
468
+ 'name' => 'Maori',
469
+ ),
470
+ 'ms_MY' => array(
471
+ 'slug' => 'ms',
472
+ 'name' => 'Malay',
473
+ ),
474
+ 'my_MM' => array(
475
+ 'slug' => 'mya',
476
+ 'name' => 'Myanmar (Burmese)',
477
+ ),
478
+ 'ne_NP' => array(
479
+ 'slug' => 'ne',
480
+ 'name' => 'Nepali',
481
+ ),
482
+ 'nb_NO' => array(
483
+ 'slug' => 'nb',
484
+ 'name' => 'Norwegian (Bokmål)',
485
+ ),
486
+ 'nl_NL' => array(
487
+ 'slug' => 'nl',
488
+ 'name' => 'Dutch',
489
+ ),
490
+ 'nl_BE' => array(
491
+ 'slug' => 'nl-be',
492
+ 'name' => 'Dutch (Belgium)',
493
+ ),
494
+ 'nn_NO' => array(
495
+ 'slug' => 'nn',
496
+ 'name' => 'Norwegian (Nynorsk)',
497
+ ),
498
+ 'oci' => array(
499
+ 'slug' => 'oci',
500
+ 'name' => 'Occitan',
501
+ ),
502
+ 'ory' => array(
503
+ 'slug' => 'ory',
504
+ 'name' => 'Oriya',
505
+ ),
506
+ 'os' => array(
507
+ 'slug' => 'os',
508
+ 'name' => 'Ossetic',
509
+ ),
510
+ 'pa_IN' => array(
511
+ 'slug' => 'pa',
512
+ 'name' => 'Punjabi',
513
+ ),
514
+ 'pl_PL' => array(
515
+ 'slug' => 'pl',
516
+ 'name' => 'Polish',
517
+ ),
518
+ 'pt_BR' => array(
519
+ 'slug' => 'pt-br',
520
+ 'name' => 'Portuguese (Brazil)',
521
+ ),
522
+ 'pt_PT' => array(
523
+ 'slug' => 'pt',
524
+ 'name' => 'Portuguese (Portugal)',
525
+ ),
526
+ 'ps' => array(
527
+ 'slug' => 'ps',
528
+ 'name' => 'Pashto',
529
+ ),
530
+ 'rhg' => array(
531
+ 'slug' => 'rhg',
532
+ 'name' => 'Rohingya',
533
+ ),
534
+ 'ro_RO' => array(
535
+ 'slug' => 'ro',
536
+ 'name' => 'Romanian',
537
+ ),
538
+ 'roh' => array(
539
+ 'slug' => 'roh',
540
+ 'name' => 'Romansh',
541
+ ),
542
+ 'ru_RU' => array(
543
+ 'slug' => 'ru',
544
+ 'name' => 'Russian',
545
+ ),
546
+ 'rue' => array(
547
+ 'slug' => 'rue',
548
+ 'name' => 'Rusyn',
549
+ ),
550
+ 'rup_MK' => array(
551
+ 'slug' => 'rup',
552
+ 'name' => 'Aromanian',
553
+ ),
554
+ 'sah' => array(
555
+ 'slug' => 'sah',
556
+ 'name' => 'Sakha',
557
+ ),
558
+ 'sa_IN' => array(
559
+ 'slug' => 'sa-in',
560
+ 'name' => 'Sanskrit',
561
+ ),
562
+ 'scn' => array(
563
+ 'slug' => 'scn',
564
+ 'name' => 'Sicilian',
565
+ ),
566
+ 'si_LK' => array(
567
+ 'slug' => 'si',
568
+ 'name' => 'Sinhala',
569
+ ),
570
+ 'sk_SK' => array(
571
+ 'slug' => 'sk',
572
+ 'name' => 'Slovak',
573
+ ),
574
+ 'sl_SI' => array(
575
+ 'slug' => 'sl',
576
+ 'name' => 'Slovenian',
577
+ ),
578
+ 'sna' => array(
579
+ 'slug' => 'sna',
580
+ 'name' => 'Shona',
581
+ ),
582
+ 'snd' => array(
583
+ 'slug' => 'snd',
584
+ 'name' => 'Sindhi',
585
+ ),
586
+ 'so_SO' => array(
587
+ 'slug' => 'so',
588
+ 'name' => 'Somali',
589
+ ),
590
+ 'sq' => array(
591
+ 'slug' => 'sq',
592
+ 'name' => 'Albanian',
593
+ ),
594
+ 'sq_XK' => array(
595
+ 'slug' => 'sq-xk',
596
+ 'name' => 'Shqip (Kosovo)',
597
+ ),
598
+ 'sr_RS' => array(
599
+ 'slug' => 'sr',
600
+ 'name' => 'Serbian',
601
+ ),
602
+ 'srd' => array(
603
+ 'slug' => 'srd',
604
+ 'name' => 'Sardinian',
605
+ ),
606
+ 'su_ID' => array(
607
+ 'slug' => 'su',
608
+ 'name' => 'Sundanese',
609
+ ),
610
+ 'sv_SE' => array(
611
+ 'slug' => 'sv',
612
+ 'name' => 'Swedish',
613
+ ),
614
+ 'sw' => array(
615
+ 'slug' => 'sw',
616
+ 'name' => 'Swahili',
617
+ ),
618
+ 'syr' => array(
619
+ 'slug' => 'syr',
620
+ 'name' => 'Syriac',
621
+ ),
622
+ 'szl' => array(
623
+ 'slug' => 'szl',
624
+ 'name' => 'Silesian',
625
+ ),
626
+ 'ta_IN' => array(
627
+ 'slug' => 'ta',
628
+ 'name' => 'Tamil',
629
+ ),
630
+ 'ta_LK' => array(
631
+ 'slug' => 'ta-lk',
632
+ 'name' => 'Tamil (Sri Lanka)',
633
+ ),
634
+ 'tah' => array(
635
+ 'slug' => 'tah',
636
+ 'name' => 'Tahitian',
637
+ ),
638
+ 'te' => array(
639
+ 'slug' => 'te',
640
+ 'name' => 'Telugu',
641
+ ),
642
+ 'tg' => array(
643
+ 'slug' => 'tg',
644
+ 'name' => 'Tajik',
645
+ ),
646
+ 'th' => array(
647
+ 'slug' => 'th',
648
+ 'name' => 'Thai',
649
+ ),
650
+ 'tir' => array(
651
+ 'slug' => 'tir',
652
+ 'name' => 'Tigrinya',
653
+ ),
654
+ 'tl' => array(
655
+ 'slug' => 'tl',
656
+ 'name' => 'Tagalog',
657
+ ),
658
+ 'tr_TR' => array(
659
+ 'slug' => 'tr',
660
+ 'name' => 'Turkish',
661
+ ),
662
+ 'tt_RU' => array(
663
+ 'slug' => 'tt',
664
+ 'name' => 'Tatar',
665
+ ),
666
+ 'tuk' => array(
667
+ 'slug' => 'tuk',
668
+ 'name' => 'Turkmen',
669
+ ),
670
+ 'twd' => array(
671
+ 'slug' => 'twd',
672
+ 'name' => 'Tweants',
673
+ ),
674
+ 'tzm' => array(
675
+ 'slug' => 'tzm',
676
+ 'name' => 'Tamazight (Central Atlas)',
677
+ ),
678
+ 'ug_CN' => array(
679
+ 'slug' => 'ug',
680
+ 'name' => 'Uighur',
681
+ ),
682
+ 'uk' => array(
683
+ 'slug' => 'uk',
684
+ 'name' => 'Ukrainian',
685
+ ),
686
+ 'ur' => array(
687
+ 'slug' => 'ur',
688
+ 'name' => 'Urdu',
689
+ ),
690
+ 'uz_UZ' => array(
691
+ 'slug' => 'uz',
692
+ 'name' => 'Uzbek',
693
+ ),
694
+ 'vi' => array(
695
+ 'slug' => 'vi',
696
+ 'name' => 'Vietnamese',
697
+ ),
698
+ 'wa' => array(
699
+ 'slug' => 'wa',
700
+ 'name' => 'Walloon',
701
+ ),
702
+ 'xho' => array(
703
+ 'slug' => 'xho',
704
+ 'name' => 'Xhosa',
705
+ ),
706
+ 'xmf' => array(
707
+ 'slug' => 'xmf',
708
+ 'name' => 'Mingrelian',
709
+ ),
710
+ 'yor' => array(
711
+ 'slug' => 'yor',
712
+ 'name' => 'Yoruba',
713
+ ),
714
+ 'zh_CN' => array(
715
+ 'slug' => 'zh-cn',
716
+ 'name' => 'Chinese (China)',
717
+ ),
718
+ 'zh_HK' => array(
719
+ 'slug' => 'zh-hk',
720
+ 'name' => 'Chinese (Hong Kong)',
721
+ ),
722
+ 'zh_TW' => array(
723
+ 'slug' => 'zh-tw',
724
+ 'name' => 'Chinese (Taiwan)',
725
+ ),
726
+ 'de_DE_formal' => array(
727
+ 'slug' => 'de/formal',
728
+ 'name' => 'German (Formal)',
729
+ ),
730
+ 'nl_NL_formal' => array(
731
+ 'slug' => 'nl/formal',
732
+ 'name' => 'Dutch (Formal)',
733
+ ),
734
+ 'de_CH_informal' => array(
735
+ 'slug' => 'de-ch/informal',
736
+ 'name' => 'Chinese (Taiwan)',
737
+ ),
738
+ 'pt_PT_ao90' => array(
739
+ 'slug' => 'pt/ao90',
740
+ 'name' => 'Portuguese (Portugal, AO90)',
741
+ ),
742
+ );
743
+
744
+ /**
745
+ * ThemeIsle_SDK_Feedback_Translate constructor.
746
+ *
747
+ * @param ThemeIsle_SDK_Product $product_object The product object.
748
+ */
749
+ public function __construct( $product_object ) {
750
+ parent::__construct( $product_object );
751
+ }
752
+
753
+ /**
754
+ * Return the locale path.
755
+ *
756
+ * @param string $locale Locale code.
757
+ *
758
+ * @return string Locale path.
759
+ */
760
+ private function get_locale_paths( $locale ) {
761
+ if ( empty( $locale ) ) {
762
+ return '';
763
+ }
764
+
765
+ $slug = isset( $this->locales[ $locale ] ) ? $this->locales[ $locale ]['slug'] : '';
766
+ if ( empty( $slug ) ) {
767
+ return '';
768
+ }
769
+ if ( strpos( $slug, '/' ) === false ) {
770
+ $slug .= '/default';
771
+ }
772
+ $url = 'https://translate.wordpress.org/projects/wp-' . $this->product->get_type() . 's/' . $this->product->get_slug() . '/' . ( $this->product->get_type() === 'plugin' ? 'dev/' : '' ) . $slug . '?filters%5Bstatus%5D=untranslated&sort%5Bby%5D=random';
773
+
774
+ return $url;
775
+ }
776
+
777
+ /**
778
+ * Registers the hooks
779
+ */
780
+ public function setup_hooks_child() {
781
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
782
+ }
783
+
784
+ /**
785
+ * Either we should show the notification or not.
786
+ *
787
+ * @return bool Valid notification.
788
+ */
789
+ function can_notify() {
790
+ if ( ! $this->product->is_wordpress_available() ) {
791
+ $this->disable();
792
+ return false;
793
+ }
794
+ $show = get_option( $this->product->get_key() . '_translate_flag', 'yes' );
795
+ if ( 'no' === $show ) {
796
+ return false;
797
+ }
798
+ $lang = $this->get_user_locale();
799
+ if ( 'en_US' === $lang ) {
800
+ return false;
801
+ }
802
+ $languages = $this->get_translations();
803
+ if ( ! is_array( $languages ) ) {
804
+ return false;
805
+ }
806
+ if ( ! isset( $languages['translations'] ) ) {
807
+ return false;
808
+ }
809
+
810
+ $languages = $languages['translations'];
811
+ $available = wp_list_pluck( $languages, 'language' );
812
+ if ( in_array( $lang, $available ) ) {
813
+ return false;
814
+ }
815
+ if ( ! isset( $this->locales[ $lang ] ) ) {
816
+ return false;
817
+ }
818
+
819
+ return true;
820
+ }
821
+
822
+ /**
823
+ * Get the user's locale.
824
+ */
825
+ private function get_user_locale() {
826
+ global $wp_version;
827
+ if ( version_compare( $wp_version, '4.7.0', '>=' ) ) {
828
+ return get_user_locale();
829
+ }
830
+ $user = wp_get_current_user();
831
+ if ( $user ) {
832
+ $locale = $user->locale;
833
+ }
834
+ return $locale ? $locale : get_locale();
835
+ }
836
+
837
+ /**
838
+ * Shows the notification
839
+ */
840
+ function show_notification() {
841
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
842
+ }
843
+
844
+ /**
845
+ * Shows the admin notice
846
+ */
847
+ function admin_notices() {
848
+ $id = $this->product->get_key() . '_translate';
849
+
850
+ $this->add_css( $this->product->get_key() );
851
+ $this->add_js( $this->product->get_key() );
852
+ $html = $this->get_html( $this->product->get_key() );
853
+
854
+ if ( $html ) {
855
+ echo '<div class="notice notice-success is-dismissible" id="' . $id . '" ><div class="themeisle-translate-box">' . $html . '</div></div>';
856
+ }
857
+ }
858
+
859
+ /**
860
+ * Loads the css
861
+ *
862
+ * @param string $key The product key.
863
+ */
864
+ function add_css( $key ) {
865
+ ?>
866
+ <style type="text/css" id="<?php echo $key; ?>ti-translate-css">
867
+ </style>
868
+ <?php
869
+ }
870
+
871
+ /**
872
+ * Loads the js
873
+ *
874
+ * @param string $key The product key.
875
+ */
876
+ function add_js( $key ) {
877
+ ?>
878
+ <script type="text/javascript" id="<?php echo $key; ?>ti-translate-js">
879
+ (function ($) {
880
+ $(document).ready(function () {
881
+ $('#<?php echo $key; ?>_translate').on('click', '.translate-dismiss', function (e) {
882
+
883
+ $.ajax({
884
+ url: ajaxurl,
885
+ method: "post",
886
+ data: {
887
+ 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ ); ?>',
888
+ 'action': '<?php echo $this->product->get_key() . __CLASS__; ?>'
889
+ },
890
+ success: function () {
891
+ $('#<?php echo $key; ?>_translate').hide();
892
+ }
893
+ });
894
+ });
895
+ });
896
+ })(jQuery);
897
+ </script>
898
+ <?php
899
+ }
900
+
901
+ /**
902
+ * Fetch translations from api.
903
+ *
904
+ * @return mixed Translation array.
905
+ */
906
+ private function get_translations() {
907
+ $cache_key = $this->product->get_key() . '_all_languages';
908
+ $translations = get_transient( $cache_key );
909
+
910
+ if ( $translations === false ) {
911
+ require_once( ABSPATH . 'wp-admin/includes/translation-install.php' );
912
+ $translations = translations_api(
913
+ $this->product->get_type() . 's',
914
+ array(
915
+ 'slug' => $this->product->get_slug(),
916
+ 'version' => $this->product->get_version(),
917
+ )
918
+ );
919
+ set_transient( $cache_key, $translations, WEEK_IN_SECONDS );
920
+ }
921
+
922
+ return $translations;
923
+
924
+ }
925
+
926
+ /**
927
+ * Generates the HTML
928
+ *
929
+ * @param string $key The product key.
930
+ *
931
+ * @return void|string Html code of the notification.
932
+ */
933
+ function get_html( $key ) {
934
+ $lang = $this->get_user_locale();
935
+ $link = $this->get_locale_paths( $lang );
936
+ $heading = apply_filters( $this->product->get_key() . '_feedback_translate_heading', $this->heading );
937
+ $product = $this->product->get_friendly_name();
938
+ $heading = str_replace(
939
+ array( '{product}' ),
940
+ $product, $heading
941
+ );
942
+
943
+ $message = apply_filters( $this->product->get_key() . '_feedback_translation', $this->msg );
944
+ $language_meta = $this->locales[ $lang ];
945
+ $message = str_replace( '{language}', $language_meta['name'], $message );
946
+ $message = str_replace( '{product}', $product, $message );
947
+ $button_cancel = apply_filters( $this->product->get_key() . '_feedback_translate_button_cancel', $this->button_cancel );
948
+ $button_do = apply_filters( $this->product->get_key() . '_feedback_translate_button_do', $this->button_do );
949
+
950
+ return '<div id="' . $this->product->get_key() . '-translate-notification" class="themeisle-sdk-translate-box">'
951
+ . '<h2>' . $heading . '</h2>'
952
+ . '<p>' . $message . '</p>'
953
+ . '<div class="actions">'
954
+ . '<a href="' . $link . '" target="_blank" class="button button-primary translate-dismiss"> ' . $button_do . '</a>&nbsp;'
955
+ . get_submit_button( $button_cancel, 'translate-dismiss ' . $this->product->get_key() . '-ti-translate', $this->product->get_key() . 'ti-translate-no', false )
956
+ . '</div></br></div>';
957
+ }
958
+
959
+ /**
960
+ * Called when the either button is clicked
961
+ */
962
+ function dismiss() {
963
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
964
+
965
+ $this->disable();
966
+ }
967
+
968
+ /**
969
+ * Disables the notification
970
+ */
971
+ protected function disable() {
972
+
973
+ update_option( $this->product->get_key() . '_translate_flag', 'no' );
974
+ }
975
+
976
+ /**
977
+ * Enables the notification
978
+ */
979
+ protected function enable() {
980
+ update_option( $this->product->get_key() . '_translate_flag', 'yes' );
981
+ }
982
+ }
983
+ endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php CHANGED
@@ -34,7 +34,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
34
  */
35
  public function __construct( $product_object ) {
36
  if ( $product_object instanceof ThemeIsle_SDK_Product ) {
37
- $this->product = $product_object;
38
  }
39
  $this->setup_hooks();
40
  }
@@ -52,12 +52,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
52
  * @param string $attributes The attributes of the post body.
53
  */
54
  protected function call_api( $attributes ) {
55
- $slug = $this->product->get_slug();
56
  $version = $this->product->get_version();
57
- $attributes['slug'] = $slug;
58
  $attributes['version'] = $version;
59
 
60
- $response = wp_remote_post(
61
  $this->feedback_url, array(
62
  'body' => $attributes,
63
  )
@@ -70,8 +70,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
70
  * @param array $options The options array.
71
  */
72
  function randomize_options( $options ) {
73
- $new = array();
74
- $keys = array_keys( $options );
75
  shuffle( $keys );
76
 
77
  foreach ( $keys as $key ) {
34
  */
35
  public function __construct( $product_object ) {
36
  if ( $product_object instanceof ThemeIsle_SDK_Product ) {
37
+ $this->product = $product_object;
38
  }
39
  $this->setup_hooks();
40
  }
52
  * @param string $attributes The attributes of the post body.
53
  */
54
  protected function call_api( $attributes ) {
55
+ $slug = $this->product->get_slug();
56
  $version = $this->product->get_version();
57
+ $attributes['slug'] = $slug;
58
  $attributes['version'] = $version;
59
 
60
+ $response = wp_remote_post(
61
  $this->feedback_url, array(
62
  'body' => $attributes,
63
  )
70
  * @param array $options The options array.
71
  */
72
  function randomize_options( $options ) {
73
+ $new = array();
74
+ $keys = array_keys( $options );
75
  shuffle( $keys );
76
 
77
  foreach ( $keys as $key ) {
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php CHANGED
@@ -66,11 +66,16 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
66
  if ( array_key_exists( 'review', $instances ) ) {
67
  $notifications[] = $instances['review'];
68
  }
 
 
 
69
  new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
70
  if ( ! $product_object->is_external_author() ) {
71
  new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
72
  }
73
-
 
 
74
  return self::$instance;
75
  }
76
 
66
  if ( array_key_exists( 'review', $instances ) ) {
67
  $notifications[] = $instances['review'];
68
  }
69
+ if ( array_key_exists( 'translate', $instances ) ) {
70
+ $notifications[] = $instances['translate'];
71
+ }
72
  new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
73
  if ( ! $product_object->is_external_author() ) {
74
  new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
75
  }
76
+ if ( ! $product_object->is_external_author() ) {
77
+ new ThemeIsle_SDK_Rollback( $product_object );
78
+ }
79
  return self::$instance;
80
  }
81
 
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php CHANGED
@@ -37,7 +37,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
37
  /**
38
  * @var string $heading The heading of the modal
39
  */
40
- private $heading = 'Do you enjoy {product}? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.';
41
 
42
  /**
43
  * @var string $button_submit The text of the submit button
@@ -110,20 +110,27 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
110
  }
111
 
112
  /**
113
- * Shows the notification
 
 
114
  */
115
- function show_notification() {
116
  $show = $this->product->is_logger_active();
117
  $checked = get_option( $this->product->logger_option, '' );
118
  if ( ! $show && $checked == '' ) {
119
- add_action( 'admin_notices', array( $this, 'admin_notices' ) );
120
-
121
  return true;
122
  }
123
 
124
  return false;
125
  }
126
 
 
 
 
 
 
 
 
127
  /**
128
  * Shows the admin notice
129
  */
37
  /**
38
  * @var string $heading The heading of the modal
39
  */
40
+ private $heading = 'Do you enjoy <b>{product}</b>? Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.';
41
 
42
  /**
43
  * @var string $button_submit The text of the submit button
110
  }
111
 
112
  /**
113
+ * Either we should show the notification or not.
114
+ *
115
+ * @return bool Valida notification.
116
  */
117
+ function can_notify() {
118
  $show = $this->product->is_logger_active();
119
  $checked = get_option( $this->product->logger_option, '' );
120
  if ( ! $show && $checked == '' ) {
 
 
121
  return true;
122
  }
123
 
124
  return false;
125
  }
126
 
127
+ /**
128
+ * Shows the notification
129
+ */
130
+ function show_notification() {
131
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
132
+ }
133
+
134
  /**
135
  * Shows the admin notice
136
  */
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php CHANGED
@@ -24,7 +24,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
24
  /**
25
  * @var array Notifications for the current product.
26
  */
27
- private $notifications = array();
28
  /**
29
  * @var ThemeIsle_SDK_Product Current product.
30
  */
@@ -57,7 +57,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
57
  if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
58
  if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
59
  foreach ( $this->callbacks as $instance ) {
60
- $this->notifications[ $this->product->get_key() . get_class( $instance ) ] = $instance;
61
  }
62
  }
63
  }
@@ -75,45 +75,31 @@ if ( ! class_exists( 'ThemeIsle_SDK_Notification_Manager' ) ) :
75
  * Shows the notification
76
  */
77
  function show_notification() {
78
-
79
- $hidden = get_option( 'themeisle_sdk_notification_hidden', array() );
80
- $instances = $this->notifications;
81
  if ( empty( $instances ) ) {
82
  return;
83
  }
84
 
85
- // Get timestamp of last notification.
86
- $old = 0;
87
- if ( ! empty( $hidden ) ) {
88
- $old = $hidden[ count( $hidden ) - 1 ]['time'];
89
- }
90
- // Check if the current one is expired.
91
- if ( ( time() - $old ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
92
- // Get hidden notifications key.
93
- $hidden_ones = wp_list_pluck( $hidden, 'key' );
94
- // Get the non-hidden notifications.
95
- $available_notifications = array_diff( array_keys( $instances ), $hidden_ones );
96
- if ( empty( $available_notifications ) ) {
97
- return;
98
- }
99
- // Get the first notification available.
100
- $new_one = reset( $available_notifications );
101
 
102
- $instance = $instances[ $new_one ];
103
- $hidden[] = array(
104
- 'time' => time(),
105
- 'key' => $new_one,
106
- );
107
- update_option( 'themeisle_sdk_notification_hidden', $hidden );
108
- } else {
109
- $key = $hidden[ count( $hidden ) - 1 ]['key'];
110
- if ( ! isset( $this->notifications[ $key ] ) ) {
111
- return;
112
- } else {
113
- $instance = $this->notifications[ $key ];
114
  }
115
  }
116
- $instance->show_notification();
117
  }
118
  }
119
  endif;
24
  /**
25
  * @var array Notifications for the current product.
26
  */
27
+ static private $notifications = array();
28
  /**
29
  * @var ThemeIsle_SDK_Product Current product.
30
  */
57
  if ( ( time() - $this->product->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
58
  if ( $this->product instanceof ThemeIsle_SDK_Product && $this->callbacks && is_array( $this->callbacks ) ) {
59
  foreach ( $this->callbacks as $instance ) {
60
+ self::$notifications[ $this->product->get_key() . get_class( $instance ) ] = $instance;
61
  }
62
  }
63
  }
75
  * Shows the notification
76
  */
77
  function show_notification() {
78
+ $instances = self::$notifications;
 
 
79
  if ( empty( $instances ) ) {
80
  return;
81
  }
82
 
83
+ $available = array_keys( $instances );
84
+ $active = get_option( 'themeisle_sdk_active_notification', array() );
85
+
86
+ foreach ( $available as $key ) {
87
+ $instance = $instances[ $key ];
88
+ if ( $instance->can_notify() ) {
 
 
 
 
 
 
 
 
 
 
89
 
90
+ // Detect notification switch.
91
+ if ( empty( $active['key'] ) || ( $active['key'] != $key ) ) {
92
+ $active['key'] = $key;
93
+ $active['time'] = time();
94
+ update_option( 'themeisle_sdk_active_notification', $active );
95
+ }
96
+ if ( ( time() - $active['time'] ) > ( self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) ) {
97
+ $instance->show_notification();
98
+ }
99
+ break;
 
 
100
  }
101
  }
102
+
103
  }
104
  }
105
  endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php CHANGED
@@ -60,7 +60,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
60
  /**
61
  * @var array $allowed_authors The allowed authors.
62
  */
63
- private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com' );
64
  /**
65
  * @var bool $requires_license Either user needs to activate it with license.
66
  */
@@ -154,6 +154,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
154
  }
155
  if ( $this->is_wordpress_available() ) {
156
  $this->feedback_types[] = 'review';
 
157
  }
158
  }
159
 
@@ -247,6 +248,147 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
247
  return $this->wordpress_available;
248
  }
249
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
250
  /**
251
  * Return the product key.
252
  *
@@ -256,6 +398,18 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
256
  return $this->key;
257
  }
258
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  /**
260
  * Either the product requires license or not.
261
  *
60
  /**
61
  * @var array $allowed_authors The allowed authors.
62
  */
63
+ private $allowed_authors = array( 'proteusthemes.com', 'anarieldesign.com', 'prothemedesign.com' );
64
  /**
65
  * @var bool $requires_license Either user needs to activate it with license.
66
  */
154
  }
155
  if ( $this->is_wordpress_available() ) {
156
  $this->feedback_types[] = 'review';
157
+ $this->feedback_types[] = 'translate';
158
  }
159
  }
160
 
248
  return $this->wordpress_available;
249
  }
250
 
251
+ /**
252
+ * @return array Array of available versions.
253
+ */
254
+ private function get_plugin_versions() {
255
+
256
+ $url = sprintf( 'https://api.wordpress.org/plugins/info/1.0/%s', $this->get_slug() );
257
+ $response = wp_remote_get( $url );
258
+ if ( is_wp_error( $response ) ) {
259
+ return array();
260
+ }
261
+ $response = wp_remote_retrieve_body( $response );
262
+ $response = maybe_unserialize( $response );
263
+
264
+ if ( ! is_object( $response ) ) {
265
+ return array();
266
+ }
267
+ if ( ! isset( $response->versions ) ) {
268
+ return array();
269
+ }
270
+ $versions = array();
271
+ foreach ( $response->versions as $version => $zip ) {
272
+ $versions[] = array(
273
+ 'version' => $version,
274
+ 'url' => $zip,
275
+ );
276
+ }
277
+
278
+ return $versions;
279
+ }
280
+
281
+ /**
282
+ * Return theme versions.
283
+ *
284
+ * @return array Theme versions array.
285
+ */
286
+ public function get_theme_versions() {
287
+ $url = sprintf( 'https://api.wordpress.org/themes/info/1.1/?action=theme_information&request[slug]=%s&request[fields][versions]=true', $this->get_slug() );
288
+ $response = wp_remote_get( $url );
289
+ if ( is_wp_error( $response ) ) {
290
+ return array();
291
+ }
292
+ $response = wp_remote_retrieve_body( $response );
293
+ $response = json_decode( $response );
294
+
295
+ if ( ! is_object( $response ) ) {
296
+ return array();
297
+ }
298
+ if ( ! isset( $response->versions ) ) {
299
+ return array();
300
+ }
301
+ $versions = array();
302
+ foreach ( $response->versions as $version => $zip ) {
303
+ $versions[] = array(
304
+ 'version' => $version,
305
+ 'url' => $zip,
306
+ );
307
+ }
308
+
309
+ return $versions;
310
+ }
311
+
312
+ /**
313
+ * Get versions array from wp.org
314
+ *
315
+ * @return array Array of versions.
316
+ */
317
+ private function get_api_versions() {
318
+ if ( ! $this->is_wordpress_available() ) {
319
+ return array();
320
+ }
321
+
322
+ $cache_key = $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions';
323
+ $cache_versions = get_transient( $this->get_key() . '_' . preg_replace( '/[^0-9a-zA-Z ]/m', '', $this->version ) . 'versions' );
324
+ if ( false == $cache_versions ) {
325
+ $versions = array();
326
+ if ( $this->get_type() === 'plugin' ) {
327
+ $versions = $this->get_plugin_versions();
328
+ }
329
+
330
+ if ( $this->get_type() === 'theme' ) {
331
+ $versions = $this->get_theme_versions();
332
+ }
333
+ set_transient( $cache_key, $versions, MONTH_IN_SECONDS );
334
+ } else {
335
+ $versions = is_array( $cache_versions ) ? $cache_versions : array();
336
+ }
337
+
338
+ return $versions;
339
+ }
340
+
341
+ /**
342
+ * Get the last rollback for this product.
343
+ *
344
+ * @return array The rollback version.
345
+ */
346
+ public function get_rollback() {
347
+ $rollback = array();
348
+ $versions = $this->get_api_versions();
349
+ $versions = apply_filters( $this->get_key() . '_rollbacks', $versions );
350
+
351
+ if ( $versions ) {
352
+ usort( $versions, array( $this, 'sort_rollback_array' ) );
353
+ foreach ( $versions as $version ) {
354
+ if ( isset( $version['version'] ) && isset( $version['url'] ) && version_compare( $this->version, $version['version'], '>' ) ) {
355
+ $rollback = $version;
356
+ break;
357
+ }
358
+ }
359
+ }
360
+
361
+ return $rollback;
362
+ }
363
+
364
+ /**
365
+ * Sort the rollbacks array in descending order.
366
+ */
367
+ public function sort_rollback_array( $a, $b ) {
368
+ return version_compare( $a['version'], $b['version'], '<' ) > 0;
369
+ }
370
+
371
+ /**
372
+ * If product can be rolled back.
373
+ *
374
+ * @return bool Can the product be rolled back or not.
375
+ */
376
+ public function can_rollback() {
377
+ if ( $this->get_type() === 'theme' ) {
378
+ if ( ! current_user_can( 'switch_themes' ) ) {
379
+ return false;
380
+ }
381
+ }
382
+ if ( $this->get_type() === 'plugin' ) {
383
+ if ( ! current_user_can( 'install_plugins' ) ) {
384
+ return false;
385
+ }
386
+ }
387
+ $rollback = $this->get_rollback();
388
+
389
+ return ! empty( $rollback );
390
+ }
391
+
392
  /**
393
  * Return the product key.
394
  *
398
  return $this->key;
399
  }
400
 
401
+ /**
402
+ * Return friendly name.
403
+ *
404
+ * @return string Friendly name.
405
+ */
406
+ public function get_friendly_name() {
407
+ $name = apply_filters( $this->get_key() . '_friendly_name', trim( str_replace( 'Lite', '', $this->get_name() ) ) );
408
+ $name = rtrim( $name, '- ' );
409
+
410
+ return $name;
411
+ }
412
+
413
  /**
414
  * Either the product requires license or not.
415
  *
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-rollback.php ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The rollback class for ThemeIsle SDK
4
+ *
5
+ * @package ThemeIsleSDK
6
+ * @subpackage Rollback
7
+ * @copyright Copyright (c) 2017, Marius Cristea
8
+ * @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
9
+ * @since 1.0.0
10
+ */
11
+ // Exit if accessed directly.
12
+ if ( ! defined( 'ABSPATH' ) ) {
13
+ exit;
14
+ }
15
+ if ( ! class_exists( 'ThemeIsle_SDK_Rollback' ) ) :
16
+ /**
17
+ * Rollback for ThemeIsle SDK.
18
+ */
19
+ class ThemeIsle_SDK_Rollback {
20
+
21
+ /**
22
+ * @var ThemeIsle_SDK_Product $product Themeisle Product.
23
+ */
24
+ protected $product;
25
+
26
+
27
+ /**
28
+ * ThemeIsle_SDK_Rollback constructor.
29
+ *
30
+ * @param ThemeIsle_SDK_Product $product_object Product Object.
31
+ */
32
+ public function __construct( $product_object ) {
33
+ if ( $product_object instanceof ThemeIsle_SDK_Product ) {
34
+ $this->product = $product_object;
35
+ }
36
+ if ( $this->product->can_rollback() ) {
37
+ $this->show_link();
38
+ $this->add_hooks();
39
+
40
+ }
41
+ }
42
+
43
+ /**
44
+ * Add js scripts for themes rollback.
45
+ */
46
+ public function add_footer() {
47
+ $screen = get_current_screen();
48
+ if ( ! isset( $screen->parent_file ) ) {
49
+ return;
50
+ }
51
+ if ( $screen->parent_file !== 'themes.php' ) {
52
+ return;
53
+ }
54
+ if ( $this->product->get_type() === 'plugin' ) {
55
+ return;
56
+ }
57
+
58
+ $version = $this->product->get_rollback();
59
+ ?>
60
+ <script type="text/javascript">
61
+ jQuery(document).ready(function ($) {
62
+ setInterval(checkTheme, 500);
63
+
64
+ function checkTheme() {
65
+ var theme = '<?php echo esc_attr( $this->product->get_slug() ); ?>-action';
66
+
67
+ if (jQuery('#' + theme).length > 0) {
68
+ if (jQuery('.theme-overlay.active').is(':visible')) {
69
+ if (jQuery('#' + theme + '-rollback').length === 0) {
70
+ jQuery('.theme-actions .active-theme').prepend('<a class="button" style="float:left" id="' + theme + '-rollback" href="<?php echo esc_url( wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) ); ?>">Rollback to v<?php echo esc_attr( $version['version'] ); ?></a>')
71
+ }
72
+ }
73
+
74
+ }
75
+ }
76
+ })
77
+
78
+ </script>
79
+ <?php
80
+
81
+ }
82
+
83
+ /**
84
+ * Set the rollback hook. Strangely, this does not work if placed in the ThemeIsle_SDK_Rollback class, so it is being called from there instead.
85
+ */
86
+ public function add_hooks() {
87
+ add_action( 'admin_post_' . $this->product->get_key() . '_rollback', array( $this, 'start_rollback' ) );
88
+ add_action( 'admin_footer', array( $this, 'add_footer' ) );
89
+ }
90
+
91
+ /**
92
+ * If product can be rolled back, show the link to rollback.
93
+ */
94
+ private function show_link() {
95
+ add_filter(
96
+ 'plugin_action_links_' . plugin_basename( $this->product->get_basefile() ), array(
97
+ $this,
98
+ 'add_rollback_link',
99
+ )
100
+ );
101
+ }
102
+
103
+ /**
104
+ * Show the rollback links in the plugin page.
105
+ *
106
+ * @return array The links.
107
+ */
108
+ public function add_rollback_link( $links ) {
109
+ $version = $this->product->get_rollback();
110
+ $links[] = '<a href="' . wp_nonce_url( admin_url( 'admin-post.php?action=' . $this->product->get_key() . '_rollback' ), $this->product->get_key() . '_rollback' ) . '">' . sprintf( apply_filters( $this->product->get_key() . '_rollback_label', 'Rollback to v%s' ), $version['version'] ) . '</a>';
111
+
112
+ return $links;
113
+ }
114
+
115
+ /**
116
+ * Start the rollback operation.
117
+ */
118
+ public function start_rollback() {
119
+ if ( ! isset( $_GET['_wpnonce'] ) || ! wp_verify_nonce( $_GET['_wpnonce'], $this->product->get_key() . '_rollback' ) ) {
120
+ wp_nonce_ays( '' );
121
+ }
122
+
123
+ if ( $this->product->get_type() === 'plugin' ) {
124
+ $this->start_rollback_plugin();
125
+ } elseif ( $this->product->get_type() === 'theme' ) {
126
+ $this->start_rollback_theme();
127
+ }
128
+ }
129
+
130
+ /**
131
+ * Alter links and remove duplicate customize message.
132
+ *
133
+ * @param array $links Array of old links.
134
+ *
135
+ * @return mixed Array of links.
136
+ */
137
+ public function alter_links_theme_upgrade( $links ) {
138
+ if ( isset( $links['preview'] ) ) {
139
+ $links['preview'] = str_replace( '<span aria-hidden="true">Customize</span>', '', $links['preview'] );
140
+ }
141
+
142
+ return $links;
143
+ }
144
+
145
+ /**
146
+ * Start the rollback operation for the theme.
147
+ */
148
+ private function start_rollback_theme() {
149
+ add_filter( 'update_theme_complete_actions', array( $this, 'alter_links_theme_upgrade' ) );
150
+ $rollback = $this->product->get_rollback();
151
+ $transient = get_site_transient( 'update_themes' );
152
+ $folder = $this->product->get_slug();
153
+ $version = $rollback['version'];
154
+ $temp_array = array(
155
+ 'new_version' => $version,
156
+ 'package' => $rollback['url'],
157
+ );
158
+
159
+ $transient->response[ $folder . '/style.css' ] = $temp_array;
160
+ set_site_transient( 'update_themes', $transient );
161
+
162
+ $transient = get_transient( $this->product->get_key() . '_warning_rollback' );
163
+
164
+ if ( false === $transient ) {
165
+ set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
166
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
167
+ $title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
168
+ $theme = $folder . '/style.css';
169
+ $nonce = 'upgrade-theme_' . $theme;
170
+ $url = 'update.php?action=upgrade-theme&theme=' . urlencode( $theme );
171
+
172
+ $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
173
+ $upgrader->upgrade( $theme );
174
+ delete_transient( $this->product->get_key() . '_warning_rollback' );
175
+ wp_die(
176
+ '', $title, array(
177
+ 'response' => 200,
178
+ )
179
+ );
180
+ }
181
+ }
182
+
183
+ /**
184
+ * Start the rollback operation for the plugin.
185
+ */
186
+ private function start_rollback_plugin() {
187
+ $rollback = $this->product->get_rollback();
188
+ $plugin_transient = get_site_transient( 'update_plugins' );
189
+ $plugin_folder = $this->product->get_slug();
190
+ $plugin_file = $this->product->get_file();
191
+ $version = $rollback['version'];
192
+ $temp_array = array(
193
+ 'slug' => $plugin_folder,
194
+ 'new_version' => $version,
195
+ 'package' => $rollback['url'],
196
+ );
197
+
198
+ $temp_object = (object) $temp_array;
199
+ $plugin_transient->response[ $plugin_folder . '/' . $plugin_file ] = $temp_object;
200
+ set_site_transient( 'update_plugins', $plugin_transient );
201
+
202
+ $transient = get_transient( $this->product->get_key() . '_warning_rollback' );
203
+
204
+ if ( false === $transient ) {
205
+ set_transient( $this->product->get_key() . '_warning_rollback', 'in progress', 30 );
206
+ require_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );
207
+ $title = sprintf( apply_filters( $this->product->get_key() . '_rollback_message', 'Rolling back %s to v%s' ), $this->product->get_name(), $version );
208
+ $plugin = $plugin_folder . '/' . $plugin_file;
209
+ $nonce = 'upgrade-plugin_' . $plugin;
210
+ $url = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );
211
+ $upgrader_skin = new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) );
212
+ $upgrader = new Plugin_Upgrader( $upgrader_skin );
213
+ $upgrader->upgrade( $plugin );
214
+ delete_transient( $this->product->get_key() . '_warning_rollback' );
215
+ wp_die(
216
+ '', $title, array(
217
+ 'response' => 200,
218
+ )
219
+ );
220
+ }
221
+ }
222
+ }
223
+ endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php CHANGED
@@ -170,6 +170,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
170
  color: #72777c;
171
  }
172
 
 
 
 
 
 
 
173
  </style>
174
  <ul>
175
  <?php
@@ -231,6 +237,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
231
  (<a class="thickbox open-plugin-details-modal"
232
  href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
233
  </li>
 
 
 
234
 
235
  <?php
236
  }
170
  color: #72777c;
171
  }
172
 
173
+ .ti-dw-powered-by {
174
+ font-style: italic;
175
+ text-align: right;
176
+ margin-top:3px;
177
+ }
178
+
179
  </style>
180
  <ul>
181
  <?php
237
  (<a class="thickbox open-plugin-details-modal"
238
  href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php echo apply_filters( 'themeisle_sdk_dashboard_install_label', 'Install' ); ?></a>)
239
  </li>
240
+ <li class="ti-dw-powered-by">
241
+ Powered by <?php echo esc_attr( $this->product->get_friendly_name() ); ?>
242
+ </li>
243
 
244
  <?php
245
  }
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php CHANGED
@@ -29,7 +29,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget' ) ) :
29
  */
30
  public function __construct( $product_object ) {
31
  if ( $product_object instanceof ThemeIsle_SDK_Product ) {
32
- $this->product = $product_object;
33
  }
34
  $this->setup_hooks();
35
  }
29
  */
30
  public function __construct( $product_object ) {
31
  if ( $product_object instanceof ThemeIsle_SDK_Product ) {
32
+ $this->product = $product_object;
33
  }
34
  $this->setup_hooks();
35
  }
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widgets-factory.php CHANGED
@@ -27,8 +27,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widgets_Factory' ) ) :
27
  public function __construct( $product_object, $widgets ) {
28
  if ( $product_object instanceof ThemeIsle_SDK_Product && $widgets && is_array( $widgets ) ) {
29
  foreach ( $widgets as $widget ) {
30
- $class = 'ThemeIsle_SDK_Widget_' . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $widget ) ) );
31
- $instance = new $class( $product_object );
32
  $instance->setup_hooks();
33
  }
34
  }
27
  public function __construct( $product_object, $widgets ) {
28
  if ( $product_object instanceof ThemeIsle_SDK_Product && $widgets && is_array( $widgets ) ) {
29
  foreach ( $widgets as $widget ) {
30
+ $class = 'ThemeIsle_SDK_Widget_' . str_replace( ' ', '_', ucwords( str_replace( '_', ' ', $widget ) ) );
31
+ $instance = new $class( $product_object );
32
  $instance->setup_hooks();
33
  }
34
  }
vendor/codeinwp/themeisle-sdk/load.php CHANGED
@@ -11,7 +11,7 @@
11
  */
12
 
13
  // Current SDK version and path.
14
- $themeisle_sdk_version = '1.5.6';
15
  $themeisle_sdk_path = dirname( __FILE__ );
16
 
17
  global $themeisle_sdk_max_version;
11
  */
12
 
13
  // Current SDK version and path.
14
+ $themeisle_sdk_version = '1.9.1';
15
  $themeisle_sdk_path = dirname( __FILE__ );
16
 
17
  global $themeisle_sdk_max_version;
vendor/codeinwp/themeisle-sdk/start.php CHANGED
@@ -14,10 +14,12 @@ $files_to_load = array(
14
  'class-themeisle-sdk-product.php',
15
  'class-themeisle-sdk-logger.php',
16
  'class-themeisle-sdk-licenser.php',
 
17
  'class-themeisle-sdk-feedback-factory.php',
18
  'class-themeisle-sdk-feedback.php',
19
  'class-themeisle-sdk-feedback-deactivate.php',
20
  'class-themeisle-sdk-feedback-review.php',
 
21
  'class-themeisle-sdk-notification-manager.php',
22
  'class-themeisle-sdk-widget.php',
23
  'class-themeisle-sdk-widget-dashboard-blog.php',
14
  'class-themeisle-sdk-product.php',
15
  'class-themeisle-sdk-logger.php',
16
  'class-themeisle-sdk-licenser.php',
17
+ 'class-themeisle-sdk-rollback.php',
18
  'class-themeisle-sdk-feedback-factory.php',
19
  'class-themeisle-sdk-feedback.php',
20
  'class-themeisle-sdk-feedback-deactivate.php',
21
  'class-themeisle-sdk-feedback-review.php',
22
+ 'class-themeisle-sdk-feedback-translate.php',
23
  'class-themeisle-sdk-notification-manager.php',
24
  'class-themeisle-sdk-widget.php',
25
  'class-themeisle-sdk-widget-dashboard-blog.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit8e2a7ffc39fa568c5785487ec0fdeb5c
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit8e2a7ffc39fa568c5785487ec0fdeb5c
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit8e2a7ffc39fa568c5785487ec0fdeb5c', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit8e2a7ffc39fa568c5785487ec0fdeb5c', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
@@ -42,14 +42,14 @@ class ComposerAutoloaderInit8e2a7ffc39fa568c5785487ec0fdeb5c
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
- composerRequire8e2a7ffc39fa568c5785487ec0fdeb5c($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
- function composerRequire8e2a7ffc39fa568c5785487ec0fdeb5c($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 ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit3e22e0262c213607de4c7ae45810e79f', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
42
 
43
  $includeFiles = require __DIR__ . '/autoload_files.php';
44
  foreach ($includeFiles as $fileIdentifier => $file) {
45
+ composerRequire3e22e0262c213607de4c7ae45810e79f($fileIdentifier, $file);
46
  }
47
 
48
  return $loader;
49
  }
50
  }
51
 
52
+ function composerRequire3e22e0262c213607de4c7ae45810e79f($fileIdentifier, $file)
53
  {
54
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
55
  require $file;
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": "1fb829fd268e739864b6f1822239c1112d80853f"
10
  },
11
  "dist": {
12
  "type": "zip",
13
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/1fb829fd268e739864b6f1822239c1112d80853f",
14
- "reference": "1fb829fd268e739864b6f1822239c1112d80853f",
15
  "shasum": ""
16
  },
17
- "time": "2017-08-22 16:09:34",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
@@ -22,6 +22,7 @@
22
  "load.php"
23
  ]
24
  },
 
25
  "license": [
26
  "GPL-2.0+"
27
  ],
@@ -36,10 +37,6 @@
36
  "homepage": "https://github.com/Codeinwp/themeisle-sdk",
37
  "keywords": [
38
  "wordpress"
39
- ],
40
- "support": {
41
- "issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
42
- "source": "https://github.com/Codeinwp/themeisle-sdk/tree/master"
43
- }
44
  }
45
  ]
6
  "source": {
7
  "type": "git",
8
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
9
+ "reference": "a05ab89594381a935573300f0aafdae8c28cefe5"
10
  },
11
  "dist": {
12
  "type": "zip",
13
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/a05ab89594381a935573300f0aafdae8c28cefe5",
14
+ "reference": "a05ab89594381a935573300f0aafdae8c28cefe5",
15
  "shasum": ""
16
  },
17
+ "time": "2017-11-13 10:52:46",
18
  "type": "library",
19
  "installation-source": "dist",
20
  "autoload": {
22
  "load.php"
23
  ]
24
  },
25
+ "notification-url": "https://packagist.org/downloads/",
26
  "license": [
27
  "GPL-2.0+"
28
  ],
37
  "homepage": "https://github.com/Codeinwp/themeisle-sdk",
38
  "keywords": [
39
  "wordpress"
40
+ ]
 
 
 
 
41
  }
42
  ]