FEEDZY RSS Feeds Lite - Version 3.1.3

Version Description

  • 29/05/2017 =
  • Added new SDK features.
  • Fixed some edge case issues on image parsing.
Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 FEEDZY RSS Feeds Lite
Version 3.1.3
Comparing to
See all releases

Code changes from version 3.1.2 to 3.1.3

CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
 
2
- ### v3.1.2 - 2017-05-26
 
 
 
 
 
3
  **Changes:**
4
  - Release 3.1.2
5
 
1
 
2
+ ### v3.1.3 - 2017-05-30
3
+ **Changes:**
4
+ - * Added new SDK features.
5
+ - * Fixed some edge case issues on image parsing.
6
+
7
+ ### v3.1.2 - 2017-05-25
8
  **Changes:**
9
  - Release 3.1.2
10
 
css/feedzy-rss-feeds.css CHANGED
@@ -2,7 +2,7 @@
2
  * feedzy-rss-feeds.css
3
  * Feedzy RSS Feed
4
  * Copyright: (c) 2016 Themeisle, themeisle.com
5
- * Version: 3.1.2
6
  * Plugin Name: FEEDZY RSS Feeds
7
  * Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
8
  * Author: Themeisle
2
  * feedzy-rss-feeds.css
3
  * Feedzy RSS Feed
4
  * Copyright: (c) 2016 Themeisle, themeisle.com
5
+ * Version: 3.1.3
6
  * Plugin Name: FEEDZY RSS Feeds
7
  * Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
8
  * Author: Themeisle
feedzy-rss-feed.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Feedzy RSS Feeds Lite
16
  * Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
17
  * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
18
- * Version: 3.1.2
19
  * Author: Themeisle
20
  * Author URI: http://themeisle.com
21
  * License: GPL-2.0+
15
  * Plugin Name: Feedzy RSS Feeds Lite
16
  * Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
17
  * Description: This is a short description of what the plugin does. It's displayed in the WordPress admin area.
18
+ * Version: 3.1.3
19
  * Author: Themeisle
20
  * Author URI: http://themeisle.com
21
  * License: GPL-2.0+
includes/abstract/feedzy-rss-feeds-admin-abstract.php CHANGED
@@ -681,13 +681,13 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
681
  if ( empty( $theThumbnail ) ) {
682
  $feedDescription = $item->get_content();
683
  $theThumbnail = $this->feedzy_return_image( $feedDescription );
 
684
  }
685
  // Description image
686
  if ( empty( $theThumbnail ) ) {
687
  $feedDescription = $item->get_description();
688
  $theThumbnail = $this->feedzy_return_image( $feedDescription );
689
  }
690
-
691
  return $theThumbnail;
692
  }
693
 
681
  if ( empty( $theThumbnail ) ) {
682
  $feedDescription = $item->get_content();
683
  $theThumbnail = $this->feedzy_return_image( $feedDescription );
684
+
685
  }
686
  // Description image
687
  if ( empty( $theThumbnail ) ) {
688
  $feedDescription = $item->get_description();
689
  $theThumbnail = $this->feedzy_return_image( $feedDescription );
690
  }
 
691
  return $theThumbnail;
692
  }
693
 
includes/admin/feedzy-rss-feeds-admin.php CHANGED
@@ -98,66 +98,6 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
98
 
99
  }
100
 
101
- /**
102
- * Ajax endpoint for url tracking.
103
- *
104
- * @since 3.0.12
105
- * @access public
106
- */
107
- public function track_url() {
108
- check_admin_referer( 'feedzy-track', 'nonce' );
109
- $status = $_POST['status'];
110
- if ( $status == 'yes' ) {
111
- update_option( 'feedzy_logger_flag', 'yes' );
112
- } else {
113
- update_option( 'feedzy_logger_flag', 'no' );
114
- }
115
- wp_send_json_success( array(
116
- 'status' => $status,
117
- ) );
118
- }
119
-
120
- /**
121
- * Adds tracking box to the edit screen
122
- *
123
- * @since 3.0.12
124
- * @access public
125
- */
126
- public function enable_tracking() {
127
- $checked = get_option( 'feedzy_logger_flag', 'no' ) === 'yes' ? 'checked' : '';
128
- ?>
129
- <div class="feedzy-tracking"><label class="feedzy-switch" style="display: inline-block;"><input type="checkbox"
130
- onchange="return toggel_track();" <?php echo $checked; ?>>
131
- <div class="feedzy-track visualizer-round"></div>
132
- </label><span><?php _e( 'Enable Tracking', 'feedzy-rss-feeds' ); ?> <sup>*</sup></span>
133
- <p>
134
- <small><sup>*</sup><?php _e( 'Allow Themeisle to anonymously track how this plugin is used and help us make the
135
- plugin better. No sensitive data is tracked.', 'feedzy-rss-feeds' ); ?>
136
- </small>
137
- </p>
138
- </div>
139
- <script type="text/javascript">
140
- function toggel_track() {
141
-
142
- var check_status = jQuery('.feedzy-switch input').is(':checked');
143
-
144
- var data = {
145
- 'action': 'track_url',
146
- 'nonce': '<?php echo wp_create_nonce( 'feedzy-track' ); ?>',
147
- 'status': ( check_status ) ? 'yes' : 'no'
148
- };
149
-
150
- // since 2.8 ajaxurl is always defined in the admin header and points to admin-ajax.php
151
- jQuery.post(ajaxurl, data, function (response) {
152
- console.log(response);
153
- });
154
-
155
- return true;
156
- }
157
- </script>
158
- <?php
159
- }
160
-
161
  /**
162
  * Method to register custom post type for
163
  * Feedzy RSS Feeds Categories.
@@ -187,7 +127,7 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
187
  'public' => true,
188
  'exclude_from_search' => true,
189
  'publicly_queryable' => false,
190
- 'show_in_nav_menus' => false,
191
  'capability_type' => 'post',
192
  'rewrite' => array( 'slug' => 'feedzy-category' ),
193
  'show_in_menu' => 'feedzy-admin-menu',
@@ -209,16 +149,6 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
209
  $this,
210
  'feedzy_category_feed',
211
  ), 'feedzy_categories', 'normal', 'high' );
212
- if ( ! class_exists( 'Feedzy_Rss_Feeds_Pro' ) ) {
213
- add_meta_box(
214
- 'feedzy_categories_enable_tracking', __( 'Contribute to Feedzy RSS Feeds', 'feedzy-rss-feeds' ),
215
- array(
216
- $this,
217
- 'enable_tracking',
218
- ),
219
- 'feedzy_categories', 'side'
220
- );
221
- }
222
  }
223
 
224
  /**
@@ -352,7 +282,7 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
352
  'doc' => '<a href="http://docs.themeisle.com/article/277-feedzy-rss-feeds-hooks" target="_blank" title="' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '">' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '</a>',
353
  'more_features' => '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank" title="' . __( 'More Plugins', 'feedzy-rss-feeds' ) . '">' . __( 'More Features', 'feedzy-rss-feeds' ) . '<i class="dashicons dashicons-unlock more-features-icon"></i></a>',
354
  );
355
- $links = array_merge( $links, $new_links );
356
  }
357
 
358
  return $links;
@@ -380,15 +310,4 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
380
  }
381
  }
382
  }
383
-
384
- /**
385
- * Track the feedzy rss feeds usage.
386
- *
387
- * @since 3.0.12
388
- * @access public
389
- * @return bool Either we should track or not.
390
- */
391
- public function check_logger() {
392
- return ( get_option( 'feedzy_logger_flag', 'no' ) === 'yes' );
393
- }
394
  }
98
 
99
  }
100
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  /**
102
  * Method to register custom post type for
103
  * Feedzy RSS Feeds Categories.
127
  'public' => true,
128
  'exclude_from_search' => true,
129
  'publicly_queryable' => false,
130
+ 'show_in_nav_menus' => false,
131
  'capability_type' => 'post',
132
  'rewrite' => array( 'slug' => 'feedzy-category' ),
133
  'show_in_menu' => 'feedzy-admin-menu',
149
  $this,
150
  'feedzy_category_feed',
151
  ), 'feedzy_categories', 'normal', 'high' );
 
 
 
 
 
 
 
 
 
 
152
  }
153
 
154
  /**
282
  'doc' => '<a href="http://docs.themeisle.com/article/277-feedzy-rss-feeds-hooks" target="_blank" title="' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '">' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '</a>',
283
  'more_features' => '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank" title="' . __( 'More Plugins', 'feedzy-rss-feeds' ) . '">' . __( 'More Features', 'feedzy-rss-feeds' ) . '<i class="dashicons dashicons-unlock more-features-icon"></i></a>',
284
  );
285
+ $links = array_merge( $links, $new_links );
286
  }
287
 
288
  return $links;
310
  }
311
  }
312
  }
 
 
 
 
 
 
 
 
 
 
 
313
  }
includes/feedzy-rss-feeds-activator.php CHANGED
@@ -30,7 +30,12 @@ class Feedzy_Rss_Feeds_Activator {
30
  * @access public
31
  */
32
  public static function activate() {
33
- $options = get_option( Feedzy_Rss_Feeds::get_plugin_name(), array() );
 
 
 
 
 
34
  if ( ! isset( $options['is_new'] ) ) {
35
  update_option( Feedzy_Rss_Feeds::get_plugin_name(), array(
36
  'is_new' => 'yes',
30
  * @access public
31
  */
32
  public static function activate() {
33
+ $options = get_option( Feedzy_Rss_Feeds::get_plugin_name(), array() );
34
+ $old_logger_option = get_option( 'feedzy_logger_flag', 'no' );
35
+ if ( $old_logger_option == 'yes' ) {
36
+ update_option( 'feedzy_rss_feeds_logger_flag', 'yes' );
37
+ update_option( 'feedzy_logger_flag', 'no' );
38
+ }
39
  if ( ! isset( $options['is_new'] ) ) {
40
  update_option( Feedzy_Rss_Feeds::get_plugin_name(), array(
41
  'is_new' => 'yes',
includes/feedzy-rss-feeds.php CHANGED
@@ -104,7 +104,7 @@ class Feedzy_Rss_Feeds {
104
  */
105
  public function init() {
106
  self::$plugin_name = 'feedzy-rss-feeds';
107
- self::$version = '3.1.2';
108
  self::$instance->load_dependencies();
109
  self::$instance->set_locale();
110
  self::$instance->define_admin_hooks();
@@ -194,9 +194,6 @@ class Feedzy_Rss_Feeds {
194
  self::$instance->loader->add_action( 'manage_feedzy_categories_posts_custom_column', self::$instance->admin, 'manage_feedzy_category_columns', 10, 2 );
195
  self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );
196
 
197
- self::$instance->loader->add_filter( 'feedzy_rss_feeds_logger_flag', self::$instance->admin, 'check_logger', 10, 2 );
198
- self::$instance->loader->add_action( 'wp_ajax_track_url', self::$instance->admin, 'track_url' );
199
-
200
  self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages' );
201
  self::$instance->loader->add_filter( 'mce_external_languages', $plugin_ui, 'feedzy_add_tinymce_lang', 10, 1 );
202
  self::$instance->loader->add_filter( 'plugin_row_meta', self::$instance->admin, 'feedzy_filter_plugin_row_meta', 10, 2 );
104
  */
105
  public function init() {
106
  self::$plugin_name = 'feedzy-rss-feeds';
107
+ self::$version = '3.1.3';
108
  self::$instance->load_dependencies();
109
  self::$instance->set_locale();
110
  self::$instance->define_admin_hooks();
194
  self::$instance->loader->add_action( 'manage_feedzy_categories_posts_custom_column', self::$instance->admin, 'manage_feedzy_category_columns', 10, 2 );
195
  self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );
196
 
 
 
 
197
  self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages' );
198
  self::$instance->loader->add_filter( 'mce_external_languages', $plugin_ui, 'feedzy_add_tinymce_lang', 10, 1 );
199
  self::$instance->loader->add_filter( 'plugin_row_meta', self::$instance->admin, 'feedzy_filter_plugin_row_meta', 10, 2 );
languages/feedzy-rss-feeds.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Feedzy RSS Feeds Lite 3.1.1\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/feedzy-rss-feeds/issues\n"
7
- "POT-Creation-Date: 2017-05-25 13:42: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"
@@ -50,102 +50,87 @@ msgstr ""
50
  msgid "at"
51
  msgstr ""
52
 
53
- #: includes/admin/feedzy-rss-feeds-admin.php:132
54
- msgid "Enable Tracking"
55
- msgstr ""
56
-
57
- #: includes/admin/feedzy-rss-feeds-admin.php:134
58
- msgid ""
59
- "Allow Themeisle to anonymously track how this plugin is used and help us "
60
- "make the\n"
61
- "\t\t\t\t\tplugin better. No sensitive data is tracked."
62
- msgstr ""
63
-
64
- #: includes/admin/feedzy-rss-feeds-admin.php:170
65
  msgid "Feed Categories"
66
  msgstr ""
67
 
68
- #: includes/admin/feedzy-rss-feeds-admin.php:171
69
  msgid "Feed Category"
70
  msgstr ""
71
 
72
- #: includes/admin/feedzy-rss-feeds-admin.php:172
73
- #: includes/admin/feedzy-rss-feeds-admin.php:173
74
  msgid "Add Category"
75
  msgstr ""
76
 
77
- #: includes/admin/feedzy-rss-feeds-admin.php:174
78
  msgid "Edit Category"
79
  msgstr ""
80
 
81
- #: includes/admin/feedzy-rss-feeds-admin.php:175
82
  msgid "New Feed Category"
83
  msgstr ""
84
 
85
- #: includes/admin/feedzy-rss-feeds-admin.php:176
86
  msgid "View Category"
87
  msgstr ""
88
 
89
- #: includes/admin/feedzy-rss-feeds-admin.php:177
90
  msgid "Search Category"
91
  msgstr ""
92
 
93
- #: includes/admin/feedzy-rss-feeds-admin.php:178
94
  msgid "No categories found"
95
  msgstr ""
96
 
97
- #: includes/admin/feedzy-rss-feeds-admin.php:179
98
  msgid "No categories in the trash"
99
  msgstr ""
100
 
101
- #: includes/admin/feedzy-rss-feeds-admin.php:208
102
  msgid "Category Feeds"
103
  msgstr ""
104
 
105
- #: includes/admin/feedzy-rss-feeds-admin.php:214
106
- msgid "Contribute to Feedzy RSS Feeds"
107
- msgstr ""
108
-
109
- #: includes/admin/feedzy-rss-feeds-admin.php:238
110
  msgid "Place your URL's here followed by a comma."
111
  msgstr ""
112
 
113
- #: includes/admin/feedzy-rss-feeds-admin.php:299
114
  msgid "Category Title"
115
  msgstr ""
116
 
117
- #: includes/admin/feedzy-rss-feeds-admin.php:300
118
- #: includes/admin/feedzy-rss-feeds-admin.php:303
119
  msgid "Slug"
120
  msgstr ""
121
 
122
- #: includes/admin/feedzy-rss-feeds-admin.php:327
123
  msgid "Undefined"
124
  msgstr ""
125
 
126
- #: includes/admin/feedzy-rss-feeds-admin.php:352
127
  msgid "Documentation and examples"
128
  msgstr ""
129
 
130
- #: includes/admin/feedzy-rss-feeds-admin.php:353
131
  msgid "More Plugins"
132
  msgstr ""
133
 
134
- #: includes/admin/feedzy-rss-feeds-admin.php:353
135
- #: includes/admin/feedzy-rss-feeds-admin.php:371
136
  msgid "More Features"
137
  msgstr ""
138
 
139
- #: includes/admin/feedzy-rss-feeds-admin.php:369
140
  #: includes/admin/feedzy-wp-widget.php:40
141
  msgid "Feedzy RSS Feeds"
142
  msgstr ""
143
 
144
- #: includes/admin/feedzy-rss-feeds-admin.php:369
145
  msgid "Feedzy RSS"
146
  msgstr ""
147
 
148
- #: includes/admin/feedzy-rss-feeds-admin.php:379
149
  msgid "Import Posts"
150
  msgstr ""
151
 
@@ -383,6 +368,10 @@ msgid ""
383
  "stop, OK to update."
384
  msgstr ""
385
 
 
 
 
 
386
  #. Plugin Name of the plugin/theme
387
  msgid "Feedzy RSS Feeds Lite"
388
  msgstr ""
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Feedzy RSS Feeds Lite 3.1.2\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/feedzy-rss-feeds/issues\n"
7
+ "POT-Creation-Date: 2017-05-29 10:20:44+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
50
  msgid "at"
51
  msgstr ""
52
 
53
+ #: includes/admin/feedzy-rss-feeds-admin.php:110
 
 
 
 
 
 
 
 
 
 
 
54
  msgid "Feed Categories"
55
  msgstr ""
56
 
57
+ #: includes/admin/feedzy-rss-feeds-admin.php:111
58
  msgid "Feed Category"
59
  msgstr ""
60
 
61
+ #: includes/admin/feedzy-rss-feeds-admin.php:112
62
+ #: includes/admin/feedzy-rss-feeds-admin.php:113
63
  msgid "Add Category"
64
  msgstr ""
65
 
66
+ #: includes/admin/feedzy-rss-feeds-admin.php:114
67
  msgid "Edit Category"
68
  msgstr ""
69
 
70
+ #: includes/admin/feedzy-rss-feeds-admin.php:115
71
  msgid "New Feed Category"
72
  msgstr ""
73
 
74
+ #: includes/admin/feedzy-rss-feeds-admin.php:116
75
  msgid "View Category"
76
  msgstr ""
77
 
78
+ #: includes/admin/feedzy-rss-feeds-admin.php:117
79
  msgid "Search Category"
80
  msgstr ""
81
 
82
+ #: includes/admin/feedzy-rss-feeds-admin.php:118
83
  msgid "No categories found"
84
  msgstr ""
85
 
86
+ #: includes/admin/feedzy-rss-feeds-admin.php:119
87
  msgid "No categories in the trash"
88
  msgstr ""
89
 
90
+ #: includes/admin/feedzy-rss-feeds-admin.php:148
91
  msgid "Category Feeds"
92
  msgstr ""
93
 
94
+ #: includes/admin/feedzy-rss-feeds-admin.php:168
 
 
 
 
95
  msgid "Place your URL's here followed by a comma."
96
  msgstr ""
97
 
98
+ #: includes/admin/feedzy-rss-feeds-admin.php:229
99
  msgid "Category Title"
100
  msgstr ""
101
 
102
+ #: includes/admin/feedzy-rss-feeds-admin.php:230
103
+ #: includes/admin/feedzy-rss-feeds-admin.php:233
104
  msgid "Slug"
105
  msgstr ""
106
 
107
+ #: includes/admin/feedzy-rss-feeds-admin.php:257
108
  msgid "Undefined"
109
  msgstr ""
110
 
111
+ #: includes/admin/feedzy-rss-feeds-admin.php:282
112
  msgid "Documentation and examples"
113
  msgstr ""
114
 
115
+ #: includes/admin/feedzy-rss-feeds-admin.php:283
116
  msgid "More Plugins"
117
  msgstr ""
118
 
119
+ #: includes/admin/feedzy-rss-feeds-admin.php:283
120
+ #: includes/admin/feedzy-rss-feeds-admin.php:301
121
  msgid "More Features"
122
  msgstr ""
123
 
124
+ #: includes/admin/feedzy-rss-feeds-admin.php:299
125
  #: includes/admin/feedzy-wp-widget.php:40
126
  msgid "Feedzy RSS Feeds"
127
  msgstr ""
128
 
129
+ #: includes/admin/feedzy-rss-feeds-admin.php:299
130
  msgid "Feedzy RSS"
131
  msgstr ""
132
 
133
+ #: includes/admin/feedzy-rss-feeds-admin.php:309
134
  msgid "Import Posts"
135
  msgstr ""
136
 
368
  "stop, OK to update."
369
  msgstr ""
370
 
371
+ #: vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php:189
372
+ msgid "Install"
373
+ msgstr ""
374
+
375
  #. Plugin Name of the plugin/theme
376
  msgid "Feedzy RSS Feeds Lite"
377
  msgstr ""
readme.txt CHANGED
@@ -203,6 +203,10 @@ http://docs.themeisle.com/article/638-how-to-eliminate-duplicate-feed-item
203
 
204
  == Changelog ==
205
 
 
 
 
 
206
  = 3.1.2 - 22/05/2017 =
207
  * Fixed author protocol.
208
  * Added core fetch_feed method.
203
 
204
  == Changelog ==
205
 
206
+ = 3.1.3 - 29/05/2017 =
207
+ * Added new SDK features.
208
+ * Fixed some edge case issues on image parsing.
209
+
210
  = 3.1.2 - 22/05/2017 =
211
  * Fixed author protocol.
212
  * Added core fetch_feed method.
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit276c9582fa115366ac05248d47125f8f::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit18b613712091f63dc58167e7cc218d6b::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit05b53f459746cd03dadab9a349c46a87::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit62e4e293119ab0f071c321d4f25057f8::getLoader();
vendor/codeinwp/themeisle-sdk/README.md DELETED
@@ -1,2 +0,0 @@
1
- # themeisle-sdk
2
- ThemeIsle SDK library
 
 
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php CHANGED
@@ -127,7 +127,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
127
  display: block;
128
  }
129
 
130
- body.plugins-php .<?php echo $key; ?>-containe #TB_window.thickbox-loading:before {
131
  background: none !important;
132
  }
133
 
@@ -230,7 +230,8 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
230
  <script type="text/javascript" id="ti-deactivate-js">
231
  (function ($) {
232
  $(document).ready(function () {
233
- var href = $('tr[data-slug="<?php echo $this->product->get_slug();?>"] span.deactivate a').attr('href');
 
234
  $('#<?php echo $key;?>ti-deactivate-no').on('click', function (e) {
235
  e.preventDefault();
236
  e.stopPropagation();
@@ -271,9 +272,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
271
  });
272
  location.href = $(this).attr('data-ti-action');
273
  });
274
- $('tr[data-slug="<?php echo $this->product->get_slug();?>"] span.deactivate a').attr('name', '<?php echo esc_html( $heading ); ?>').attr('href', '<?php echo $src;?>').addClass('thickbox');
275
  var thicbox_timer;
276
- $('tr[data-slug="<?php echo $this->product->get_slug();?>"] span.deactivate a').on('click', function () {
277
  tiBindThickbox();
278
  });
279
 
@@ -283,6 +284,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Deactivate' ) ) :
283
  $("body").trigger('thickbox:iframe:loaded');
284
  $("#TB_window").addClass("<?php echo $key; ?>-container");
285
  clearTimeout(thicbox_timer);
 
286
  } else {
287
  tiBindThickbox();
288
  }
127
  display: block;
128
  }
129
 
130
+ body.plugins-php .<?php echo $key; ?>-container #TB_window.thickbox-loading:before {
131
  background: none !important;
132
  }
133
 
230
  <script type="text/javascript" id="ti-deactivate-js">
231
  (function ($) {
232
  $(document).ready(function () {
233
+
234
+ var href = $('tr[data-plugin^="<?php echo $this->product->get_slug();?>/"] span.deactivate a').attr('href');
235
  $('#<?php echo $key;?>ti-deactivate-no').on('click', function (e) {
236
  e.preventDefault();
237
  e.stopPropagation();
272
  });
273
  location.href = $(this).attr('data-ti-action');
274
  });
275
+ $('tr[data-plugin^="<?php echo $this->product->get_slug();?>/"] span.deactivate a').attr('name', '<?php echo esc_html( $heading ); ?>').attr('href', '<?php echo $src;?>').addClass('thickbox');
276
  var thicbox_timer;
277
+ $('tr[data-plugin^="<?php echo $this->product->get_slug();?>/"] span.deactivate a').on('click', function () {
278
  tiBindThickbox();
279
  });
280
 
284
  $("body").trigger('thickbox:iframe:loaded');
285
  $("#TB_window").addClass("<?php echo $key; ?>-container");
286
  clearTimeout(thicbox_timer);
287
+ $('body').unbind('thickbox:removed');
288
  } else {
289
  tiBindThickbox();
290
  }
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php CHANGED
@@ -18,6 +18,11 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
18
  */
19
  class ThemeIsle_SDK_Feedback_Factory {
20
 
 
 
 
 
 
21
  /**
22
  * ThemeIsle_SDK_Feedback_Factory constructor.
23
  *
@@ -29,9 +34,17 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback_Factory' ) ) :
29
  foreach ( $feedback_types as $type ) {
30
  $class = 'ThemeIsle_SDK_Feedback_' . ucwords( $type );
31
  $instance = new $class( $product_object );
 
32
  $instance->setup_hooks();
33
  }
34
  }
35
  }
 
 
 
 
 
 
 
36
  }
37
  endif;
18
  */
19
  class ThemeIsle_SDK_Feedback_Factory {
20
 
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.
28
  *
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
  }
40
  }
41
  }
42
+
43
+ /**
44
+ * Get the registered instances
45
+ */
46
+ public function get_instances() {
47
+ return $this->_instances;
48
+ }
49
  }
50
  endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The review 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_Review' ) ) :
16
+ /**
17
+ * Deactivate feedback model for ThemeIsle SDK.
18
+ */
19
+ class ThemeIsle_SDK_Feedback_Review extends ThemeIsle_SDK_Feedback {
20
+
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/>~ Marius, developer of {product}';
25
+
26
+ /**
27
+ * @var string $button_cancel The text of the cancel button
28
+ */
29
+ private $button_cancel = 'No, thanks.';
30
+ /**
31
+ * @var string $button_already The text of the already did it button
32
+ */
33
+ private $button_do = 'Ok, I will gladly help.';
34
+
35
+ /**
36
+ * ThemeIsle_SDK_Feedback_Deactivate constructor.
37
+ *
38
+ * @param ThemeIsle_SDK_Product $product_object The product object.
39
+ */
40
+ public function __construct( $product_object ) {
41
+ parent::__construct( $product_object );
42
+ }
43
+
44
+ /**
45
+ * Registers the hooks
46
+ */
47
+ public function setup_hooks_child() {
48
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
49
+ }
50
+
51
+ /**
52
+ * Shows the notification
53
+ */
54
+ function show_notification() {
55
+ if ( ! $this->product->is_wordpress_available() ) {
56
+ $this->disable();
57
+
58
+ return false;
59
+ }
60
+ $show = get_option( $this->product->get_key() . '_review_flag', 'yes' );
61
+ if ( 'no' === $show ) {
62
+ return false;
63
+ }
64
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
65
+
66
+ return true;
67
+ }
68
+
69
+ /**
70
+ * Shows the admin notice
71
+ */
72
+ function admin_notices() {
73
+ $id = $this->product->get_key() . '_review';
74
+
75
+ $this->add_css( $this->product->get_key() );
76
+ $this->add_js( $this->product->get_key() );
77
+
78
+ echo '<div class="notice notice-success is-dismissible" id="' . $id . '" ><div class="themeisle-review-box">' . $this->get_html( $this->product->get_key() ) . '</div></div>';
79
+ }
80
+
81
+ /**
82
+ * Loads the css
83
+ *
84
+ * @param string $key The product key.
85
+ */
86
+ function add_css( $key ) {
87
+ ?>
88
+ <style type="text/css" id="<?php echo $key; ?>ti-review-css">
89
+ #<?php echo $key; ?>-review-notification{
90
+ padding-bottom:5px;
91
+ }
92
+ #<?php echo $key; ?>-review-notification .review-dismiss{
93
+ margin-left:5px;
94
+ }
95
+ </style>
96
+ <?php
97
+ }
98
+
99
+ /**
100
+ * Loads the js
101
+ *
102
+ * @param string $key The product key.
103
+ */
104
+ function add_js( $key ) {
105
+ ?>
106
+ <script type="text/javascript" id="<?php echo $key; ?>ti-review-js">
107
+ (function ($) {
108
+ $(document).ready(function () {
109
+ $('#<?php echo $key?>_review').on('click', '.notice-dismiss, .review-dismiss', function (e) {
110
+
111
+ $.ajax({
112
+ url: ajaxurl,
113
+ method: "post",
114
+ data: {
115
+ 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ );?>',
116
+ 'action': '<?php echo $this->product->get_key() . __CLASS__;?>'
117
+ },
118
+ success: function () {
119
+ $('#<?php echo $key;?>_review').hide();
120
+ }
121
+ });
122
+ });
123
+ });
124
+ })(jQuery);
125
+ </script>
126
+ <?php
127
+ }
128
+
129
+ /**
130
+ * Generates the HTML
131
+ *
132
+ * @param string $key The product key.
133
+ */
134
+ function get_html( $key ) {
135
+ $link = 'https://wordpress.org/support/plugin/' . $this->product->get_slug() . '/reviews/#wporg-footer';
136
+ $heading = apply_filters( $this->product->get_key() . '_feedback_review_heading', $this->heading );
137
+ $heading = str_replace( array( '{product}' ),
138
+ str_replace( 'Lite', '', $this->product->get_name() ), $heading );
139
+ $button_cancel = apply_filters( $this->product->get_key() . '_feedback_review_button_cancel', $this->button_cancel );
140
+ $button_do = apply_filters( $this->product->get_key() . '_feedback_review_button_do', $this->button_do );
141
+
142
+ return '<div id="' . $this->product->get_key() . '-review-notification" class="themeisle-sdk-review-box">'
143
+ . '<p>' . $heading . '</p>'
144
+ . '<div class="actions">'
145
+ . '<a href="' . $link . '" target="_blank" class="button button-primary review-dismiss"> ' . $button_do . '</a>'
146
+ . get_submit_button( $button_cancel, 'review-dismiss ' . $this->product->get_key() . '-ti-review', $this->product->get_key() . 'ti-review-no', false )
147
+ . '</div></div>';
148
+ }
149
+
150
+ /**
151
+ * Called when the either button is clicked
152
+ */
153
+ function dismiss() {
154
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
155
+
156
+ $this->disable();
157
+ }
158
+
159
+ /**
160
+ * Disables the notification
161
+ */
162
+ protected function disable() {
163
+ update_option( $this->product->get_key() . '_review_flag', 'no' );
164
+ }
165
+
166
+ /**
167
+ * Enables the notification
168
+ */
169
+ protected function enable() {
170
+ update_option( $this->product->get_key() . '_review_flag', 'yes' );
171
+ }
172
+ }
173
+ endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php CHANGED
@@ -53,7 +53,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Feedback' ) ) :
53
  */
54
  protected function call_api( $attributes ) {
55
  $slug = $this->product->get_slug();
 
56
  $attributes['slug'] = $slug;
 
57
 
58
  $response = wp_remote_post( $this->feedback_url, array(
59
  'body' => $attributes,
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( $this->feedback_url, array(
61
  'body' => $attributes,
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php CHANGED
@@ -44,23 +44,31 @@ if ( ! class_exists( 'ThemeIsle_SDK_Loader' ) ) :
44
  }
45
  $product_object = new ThemeIsle_SDK_Product( $basefile );
46
  self::$products[ $product_object->get_slug() ] = $product_object;
 
 
47
  // Based on the Wordpress Available file header we enable the logger or not.
48
  if ( ! $product_object->is_wordpress_available() ) {
49
  $licenser = new ThemeIsle_SDK_Licenser( $product_object );
50
  $licenser->enable();
51
  }
52
- // We enable the logger feature.
 
53
  if ( $product_object->is_logger_active() ) {
54
- $logger = new ThemeIsle_SDK_Logger( $product_object );
55
  $logger->enable();
 
 
56
  }
57
 
58
- // If we should load the uninstall feedback or no.
59
- if ( $product_object->require_uninstall_feedback() ) {
60
- $feedback = new ThemeIsle_SDK_Feedback_Factory( $product_object, $product_object->get_feedback_types() );
 
 
61
  }
 
 
 
62
 
63
- $widgets = new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
64
  return self::$instance;
65
  }
66
 
44
  }
45
  $product_object = new ThemeIsle_SDK_Product( $basefile );
46
  self::$products[ $product_object->get_slug() ] = $product_object;
47
+
48
+ $notifications = array();
49
  // Based on the Wordpress Available file header we enable the logger or not.
50
  if ( ! $product_object->is_wordpress_available() ) {
51
  $licenser = new ThemeIsle_SDK_Licenser( $product_object );
52
  $licenser->enable();
53
  }
54
+
55
+ $logger = new ThemeIsle_SDK_Logger( $product_object );
56
  if ( $product_object->is_logger_active() ) {
 
57
  $logger->enable();
58
+ } else {
59
+ $notifications[] = $logger;
60
  }
61
 
62
+ $feedback = new ThemeIsle_SDK_Feedback_Factory( $product_object, $product_object->get_feedback_types() );
63
+
64
+ $instances = $feedback->get_instances();
65
+ if ( array_key_exists( 'review', $instances ) ) {
66
+ $notifications[] = $instances['review'];
67
  }
68
+ new ThemeIsle_SDK_Notification_Manager( $product_object, $notifications );
69
+
70
+ new ThemeIsle_SDK_Widgets_Factory( $product_object, $product_object->get_widget_types() );
71
 
 
72
  return self::$instance;
73
  }
74
 
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php CHANGED
@@ -22,7 +22,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
22
  /**
23
  * @var string $logging_url Url where to send the logs
24
  */
25
- private $logging_url = 'http://mirror.themeisle.com';
26
 
27
  /**
28
  * @var ThemeIsle_SDK_Product $product Themeisle Product.
@@ -34,6 +34,21 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
34
  */
35
  private $product_cron;
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  /**
38
  * ThemeIsle_SDK_Logger constructor.
39
  *
@@ -44,6 +59,7 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
44
  $this->product = $product_object;
45
  $this->product_cron = $product_object->get_key() . '_log_activity';
46
  }
 
47
  }
48
 
49
 
@@ -70,11 +86,119 @@ if ( ! class_exists( 'ThemeIsle_SDK_Logger' ) ) :
70
  ),
71
  'body' => array(
72
  'site' => get_site_url(),
73
- 'product' => $this->product->get_slug(),
74
  'version' => $this->product->get_version(),
 
75
  ),
76
  ) );
77
  }
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
  endif;
22
  /**
23
  * @var string $logging_url Url where to send the logs
24
  */
25
+ private $logging_url = 'http://log.themeisle.com/wp-json/v1/logs/';
26
 
27
  /**
28
  * @var ThemeIsle_SDK_Product $product Themeisle Product.
34
  */
35
  private $product_cron;
36
 
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 plugin data tracking. We guarantee no sensitive data is collected.';
41
+
42
+ /**
43
+ * @var string $button_submit The text of the submit button
44
+ */
45
+ private $button_submit = 'Sure, I would love to help.';
46
+
47
+ /**
48
+ * @var string $button_cancel The text of the cancel button
49
+ */
50
+ private $button_cancel = 'No, thanks.';
51
+
52
  /**
53
  * ThemeIsle_SDK_Logger constructor.
54
  *
59
  $this->product = $product_object;
60
  $this->product_cron = $product_object->get_key() . '_log_activity';
61
  }
62
+ add_action( 'wp_ajax_' . $this->product->get_key() . __CLASS__, array( $this, 'dismiss' ) );
63
  }
64
 
65
 
86
  ),
87
  'body' => array(
88
  'site' => get_site_url(),
89
+ 'slug' => $this->product->get_slug(),
90
  'version' => $this->product->get_version(),
91
+ 'data' => apply_filters( $this->product->get_key() . '_logger_data', array() ),
92
  ),
93
  ) );
94
  }
95
 
96
+ /**
97
+ * Dismiss the notification
98
+ */
99
+ function dismiss() {
100
+ check_ajax_referer( (string) __CLASS__, 'nonce' );
101
+
102
+ $flag = intval( $_POST['enable'] ) === 1;
103
+ update_option( $this->product->logger_option, ( $flag ? 'yes' : 'no' ) );
104
+
105
+ if ( true === $flag ) {
106
+ $this->enable();
107
+ }
108
+ }
109
+
110
+ /**
111
+ * Shows the notification
112
+ */
113
+ function show_notification() {
114
+ $show = $this->product->is_logger_active();
115
+ $checked = get_option( $this->product->logger_option, '' );
116
+ if ( ! $show && $checked == '' ) {
117
+ add_action( 'admin_notices', array( $this, 'admin_notices' ) );
118
+
119
+ return true;
120
+ }
121
+
122
+ return false;
123
+ }
124
+
125
+ /**
126
+ * Shows the admin notice
127
+ */
128
+ function admin_notices() {
129
+ $id = $this->product->get_key() . '_logger';
130
+
131
+ $this->add_media( $this->product->get_key() );
132
+
133
+ echo '<div class="notice notice-success is-dismissible " id="' . $this->product->get_key() . '-logger-notification" ><div id="' . $id . '" class="themeisle-logger-box">' . $this->get_html( $this->product->get_key() ) . '</div></div>';
134
+ }
135
+
136
+ /**
137
+ * Generates the HTML
138
+ *
139
+ * @param string $key The product key.
140
+ */
141
+ function get_html( $key ) {
142
+ $heading = apply_filters( $this->product->get_key() . '_logger_heading', $this->heading );
143
+ $heading = str_replace( array( '{product}' ), array(
144
+ str_replace( 'Lite', '', $this->product->get_name() )
145
+ ),
146
+ $heading
147
+ );
148
+ $button_submit = apply_filters( $this->product->get_key() . '_logger_button_submit', $this->button_submit );
149
+ $button_cancel = apply_filters( $this->product->get_key() . '_logger_button_cancel', $this->button_cancel );
150
+
151
+ return '<div >'
152
+ . '<p>' . $heading . '</p>'
153
+ . '<div class="actions">'
154
+ . get_submit_button( __( $button_submit ), 'primary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-yes', false, array(
155
+ 'data-ti-log-enable' => 1,
156
+ ) )
157
+ . get_submit_button( __( $button_cancel ), 'secondary ' . $this->product->get_key() . '-ti-logger', $this->product->get_key() . 'ti-logger-no', false, array(
158
+ 'data-ti-log-enable' => 0,
159
+ ) )
160
+ . '</div></div>';
161
+ }
162
+
163
+ /**
164
+ * Loads the js
165
+ *
166
+ * @param string $key The product key.
167
+ */
168
+ function add_media( $key ) {
169
+ ?>
170
+ <style type="text/css">
171
+ #<?php echo $key; ?>-logger-notification {
172
+ padding-bottom: 5px;
173
+ }
174
+
175
+ #<?php echo $key; ?>-logger-notification .button {
176
+ margin-left: 5px;
177
+ }
178
+ </style>
179
+ <script type="text/javascript" id="<?php echo $key; ?>ti-logger-js">
180
+ (function ($) {
181
+ $(document).ready(function () {
182
+ $('.<?php echo $key?>-ti-logger').on('click', function (e) {
183
+
184
+ $.ajax({
185
+ url: ajaxurl,
186
+ method: "post",
187
+ data: {
188
+ 'nonce': '<?php echo wp_create_nonce( (string) __CLASS__ );?>',
189
+ 'action': '<?php echo $this->product->get_key() . __CLASS__;?>',
190
+ 'enable': $(this).attr('data-ti-log-enable')
191
+ },
192
+ success: function () {
193
+ $('#<?php echo $key;?>-logger-notification').hide();
194
+ }
195
+ });
196
+ });
197
+ });
198
+ })(jQuery);
199
+ </script>
200
+ <?php
201
+ }
202
+
203
  }
204
  endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The notification manager class for ThemeIsle SDK
4
+ *
5
+ * @package ThemeIsleSDK
6
+ * @subpackage Notification
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_Notification_Manager' ) ) :
16
+ /**
17
+ * Notification manager model for ThemeIsle SDK.
18
+ */
19
+ class ThemeIsle_SDK_Notification_Manager {
20
+ /**
21
+ * Time between notifications.
22
+ */
23
+ const NOTIFICATION_INTERVAL_HOURS = 100;
24
+ /**
25
+ * @var array Notifications for the current product.
26
+ */
27
+ private $notifications = array();
28
+
29
+ /**
30
+ * ThemeIsle_SDK_Notification_Manager constructor.
31
+ *
32
+ * @param ThemeIsle_SDK_Product $product_object Product Object.
33
+ * @param array $callbacks the objects that will be called when a notification is due.
34
+ */
35
+ public function __construct( $product_object, $callbacks ) {
36
+
37
+ // Load the notifications only if we have it installed after the required interval.
38
+ if ( ( time() - $product_object->get_install_time() ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
39
+ if ( $product_object instanceof ThemeIsle_SDK_Product && $callbacks && is_array( $callbacks ) ) {
40
+ foreach ( $callbacks as $instance ) {
41
+ $this->notifications[ $product_object->get_key() . get_class( $instance ) ] = $instance;
42
+ }
43
+ }
44
+ }
45
+
46
+ $this->setup_hooks();
47
+ }
48
+
49
+ /**
50
+ * Setup the internal hooks
51
+ */
52
+ private function setup_hooks() {
53
+ add_action( 'admin_head', array( $this, 'show_notification' ) );
54
+ }
55
+
56
+ /**
57
+ * Shows the notification
58
+ */
59
+ function show_notification() {
60
+
61
+ $hidden = get_option( 'themeisle_sdk_notification_hidden', array() );
62
+ $instances = $this->notifications;
63
+ if ( empty( $instances ) ) {
64
+ return;
65
+ }
66
+
67
+ // Get timestamp of last notification.
68
+ $old = 0;
69
+ if ( ! empty( $hidden ) ) {
70
+ $old = $hidden[ count( $hidden ) - 1 ]['time'];
71
+ }
72
+ // Check if the current one is expired.
73
+ if ( ( time() - $old ) > self::NOTIFICATION_INTERVAL_HOURS * HOUR_IN_SECONDS ) {
74
+ // Get hidden notifications key.
75
+ $hidden_ones = wp_list_pluck( $hidden, 'key' );
76
+ // Get the non-hidden notifications.
77
+ $available_notifications = array_diff( array_keys( $instances ), $hidden_ones );
78
+ if ( empty( $available_notifications ) ) {
79
+ return;
80
+ }
81
+ // Get the first notification available.
82
+ $new_one = reset( $available_notifications );
83
+
84
+ $instance = $instances[ $new_one ];
85
+ $hidden[] = array(
86
+ 'time' => time(),
87
+ 'key' => $new_one,
88
+ );
89
+ update_option( 'themeisle_sdk_notification_hidden', $hidden );
90
+ } else {
91
+ $key = $hidden[ count( $hidden ) - 1 ]['key'];
92
+ if ( ! isset( $this->notifications[ $key ] ) ) {
93
+ return;
94
+ } else {
95
+ $instance = $this->notifications[ $key ];
96
+ }
97
+ }
98
+ $instance->show_notification();
99
+ }
100
+ }
101
+ endif;
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php CHANGED
@@ -45,6 +45,10 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
45
  * @var string $store_url The store url.
46
  */
47
  private $store_url;
 
 
 
 
48
  /**
49
  * @var string $store_name The store name.
50
  */
@@ -61,10 +65,14 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
61
  * @var string $version The product version.
62
  */
63
  private $version;
 
 
 
 
64
  /**
65
  * @var string $feedback_types All the feedback types the product supports
66
  */
67
- private $feedback_types = array( 'deactivate' );
68
 
69
  /**
70
  * @var string $widget_types All the widget types the product supports
@@ -84,6 +92,14 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
84
  $this->setup_from_fileheaders();
85
  }
86
  }
 
 
 
 
 
 
 
 
87
  }
88
 
89
  /**
@@ -104,7 +120,12 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
104
  $this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
105
  $this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
106
  $this->version = $file_headers['Version'];
107
-
 
 
 
 
 
108
  }
109
 
110
  /**
@@ -284,10 +305,19 @@ if ( ! class_exists( 'ThemeIsle_SDK_Product' ) ) :
284
  } else {
285
  // If we have the product on wprog, by default this will be false
286
  // and we can change it in each product.
287
- return apply_filters( $this->get_key() . '_logger_flag', false );
288
  }
289
  }
290
 
 
 
 
 
 
 
 
 
 
291
  /**
292
  * We require feedback on uninstall.
293
  *
45
  * @var string $store_url The store url.
46
  */
47
  private $store_url;
48
+ /**
49
+ * @var int $install The date of install.
50
+ */
51
+ private $install;
52
  /**
53
  * @var string $store_name The store name.
54
  */
65
  * @var string $version The product version.
66
  */
67
  private $version;
68
+ /**
69
+ * @var string $logger_option Logger option key.
70
+ */
71
+ public $logger_option;
72
  /**
73
  * @var string $feedback_types All the feedback types the product supports
74
  */
75
+ private $feedback_types = array();
76
 
77
  /**
78
  * @var string $widget_types All the widget types the product supports
92
  $this->setup_from_fileheaders();
93
  }
94
  }
95
+ $install = get_option( $this->get_key() . '_install', 0 );
96
+ if ( $install === 0 ) {
97
+ $install = time();
98
+ update_option( $this->get_key() . '_install', time() );
99
+ }
100
+ $this->install = $install;
101
+
102
+ $this->logger_option = $this->get_key() . '_logger_flag';
103
  }
104
 
105
  /**
120
  $this->requires_license = ( $file_headers['Requires License'] == 'yes' ) ? true : false;
121
  $this->wordpress_available = ( $file_headers['WordPress Available'] == 'yes' ) ? true : false;
122
  $this->version = $file_headers['Version'];
123
+ if ( $this->require_uninstall_feedback() ) {
124
+ $this->feedback_types[] = 'deactivate';
125
+ }
126
+ if ( $this->is_wordpress_available() && $this->get_type() === 'plugin' ) {
127
+ $this->feedback_types[] = 'review';
128
+ }
129
  }
130
 
131
  /**
305
  } else {
306
  // If we have the product on wprog, by default this will be false
307
  // and we can change it in each product.
308
+ return ( get_option( $this->get_key() . '_logger_flag', 'no' ) === 'yes' );
309
  }
310
  }
311
 
312
+ /**
313
+ * Return the install timestamp.
314
+ *
315
+ * @return int The install timestamp.
316
+ */
317
+ public function get_install_time() {
318
+ return $this->install;
319
+ }
320
+
321
  /**
322
  * We require feedback on uninstall.
323
  *
vendor/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php CHANGED
@@ -98,7 +98,9 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
98
 
99
  padding-left: 7px;
100
  border-top: 1px solid #eee;
101
- padding-top: 3px;
 
 
102
  }
103
 
104
  #themeisle h2.hndle {
@@ -144,6 +146,11 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
144
  text-align: center;
145
  }
146
 
 
 
 
 
 
147
  </style>
148
  <ul>
149
  <?php
@@ -175,17 +182,19 @@ if ( ! class_exists( 'ThemeIsle_SDK_Widget_Dashboard_Blog' ) ) :
175
  if ( 'plugin' === $type ) {
176
 
177
  $url = add_query_arg( array(
178
- 'tab' => 'plugin-information',
179
  'plugin' => $recommend['slug'],
180
  ), network_admin_url( 'plugin-install.php' ) );
181
  }
182
  ?>
183
- <li class="ti-dw-recommend-item">
184
  <span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
185
- :
186
- <?php echo trim( str_replace( array( 'lite', 'Lite' ), '', $recommend['name'] ) ); ?>
187
- (<a class="thickbox open-plugin-details-modal"
188
- href="<?php echo $url . '&TB_iframe=true&width=600&height=500' ; ?>"><?php _e( 'Install' ); ?></a>)</span>
 
 
189
  </li>
190
 
191
  <?php
98
 
99
  padding-left: 7px;
100
  border-top: 1px solid #eee;
101
+
102
+ margin-bottom: 0px;
103
+ padding-top: 6px;
104
  }
105
 
106
  #themeisle h2.hndle {
146
  text-align: center;
147
  }
148
 
149
+
150
+ .ti-dw-recommend-item span {
151
+ color: #72777c;
152
+ }
153
+
154
  </style>
155
  <ul>
156
  <?php
182
  if ( 'plugin' === $type ) {
183
 
184
  $url = add_query_arg( array(
185
+ 'tab' => 'plugin-information',
186
  'plugin' => $recommend['slug'],
187
  ), network_admin_url( 'plugin-install.php' ) );
188
  }
189
  ?>
190
+ <li class="ti-dw-recommend-item ">
191
  <span class="ti-dw-recommend"><?php echo apply_filters( 'themeisle_sdk_dashboard_popular_label', sprintf( 'Popular %s', ucwords( $type ) ) ); ?>
192
+ : </span><?php echo trim( str_replace( array(
193
+ 'lite',
194
+ 'Lite',
195
+ ), '', $recommend['name'] ) ); ?>
196
+ (<a class="thickbox open-plugin-details-modal"
197
+ href="<?php echo $url . '&TB_iframe=true&width=600&height=500'; ?>"><?php _e( 'Install' ); ?></a>)
198
  </li>
199
 
200
  <?php
vendor/codeinwp/themeisle-sdk/composer.json CHANGED
@@ -22,6 +22,8 @@
22
  "class-themeisle-sdk-feedback-factory.php",
23
  "class-themeisle-sdk-feedback.php",
24
  "class-themeisle-sdk-feedback-deactivate.php",
 
 
25
  "class-themeisle-sdk-widget.php",
26
  "class-themeisle-sdk-widget-dashboard-blog.php",
27
  "class-themeisle-sdk-widgets-factory.php"
22
  "class-themeisle-sdk-feedback-factory.php",
23
  "class-themeisle-sdk-feedback.php",
24
  "class-themeisle-sdk-feedback-deactivate.php",
25
+ "class-themeisle-sdk-feedback-review.php",
26
+ "class-themeisle-sdk-notification-manager.php",
27
  "class-themeisle-sdk-widget.php",
28
  "class-themeisle-sdk-widget-dashboard-blog.php",
29
  "class-themeisle-sdk-widgets-factory.php"
vendor/codeinwp/themeisle-sdk/phpcs.xml DELETED
@@ -1,35 +0,0 @@
1
- <?xml version="1.0"?>
2
- <ruleset name="Themeisle">
3
- <description>Themeisle rules for PHP_CodeSnifferr</description>
4
-
5
- <file>.</file>
6
-
7
- <exclude-pattern>node_modules/*</exclude-pattern>
8
- <exclude-pattern>vendor/*</exclude-pattern>
9
- <exclude-pattern>lib/*</exclude-pattern>
10
- <exclude-pattern>old/*</exclude-pattern>
11
- <exclude-pattern>*.min.js</exclude-pattern>
12
- <exclude-pattern>*.min.css</exclude-pattern>
13
- <rule ref="WordPress-Core">
14
- <exclude name="Squiz.Commenting.FileComment.SpacingAfterComment"/>
15
- <exclude name="Squiz.Commenting.FunctionComment.MissingParamTag"/>
16
- <exclude name="Squiz.Commenting.InlineComment.InvalidEndChar"/>
17
- <exclude name="Generic.Commenting.DocComment.MissingShort"/>
18
- <exclude name="Squiz.Commenting.InlineComment.NotCapital"/>
19
- <exclude name="Squiz.Commenting.LongConditionClosingComment.Missing"/>
20
- <exclude name="Squiz.Commenting.LongConditionClosingComment.Invalid"/>
21
- <exclude name="WordPress.NamingConvention.ValidVariableName.StringNotSnakeCase"/>
22
- <exclude name="WordPress.NamingConventions.ValidVariableName.NotSnakeCase"/>
23
- <exclude name="WordPress.PHP.YodaConditions.NotYoda"/>
24
- <exclude name="WordPress.WP.I18n.NonSingularStringLiteralText"/>
25
- <exclude name="Squiz.PHP.DisallowMultipleAssignments" />
26
- </rule>
27
- <rule ref="WordPress-Docs">
28
-
29
- </rule>
30
-
31
- <rule ref="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing">
32
- <severity>0</severity>
33
- </rule>
34
-
35
- </ruleset>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
vendor/composer/autoload_classmap.php CHANGED
@@ -9,9 +9,11 @@ return array(
9
  'ThemeIsle_SDK_Feedback' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php',
10
  'ThemeIsle_SDK_Feedback_Deactivate' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php',
11
  'ThemeIsle_SDK_Feedback_Factory' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php',
 
12
  'ThemeIsle_SDK_Licenser' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php',
13
  'ThemeIsle_SDK_Loader' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php',
14
  'ThemeIsle_SDK_Logger' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php',
 
15
  'ThemeIsle_SDK_Product' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php',
16
  'ThemeIsle_SDK_Widget' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php',
17
  'ThemeIsle_SDK_Widget_Dashboard_Blog' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-widget-dashboard-blog.php',
9
  'ThemeIsle_SDK_Feedback' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback.php',
10
  'ThemeIsle_SDK_Feedback_Deactivate' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-deactivate.php',
11
  'ThemeIsle_SDK_Feedback_Factory' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-factory.php',
12
+ 'ThemeIsle_SDK_Feedback_Review' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-feedback-review.php',
13
  'ThemeIsle_SDK_Licenser' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-licenser.php',
14
  'ThemeIsle_SDK_Loader' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-loader.php',
15
  'ThemeIsle_SDK_Logger' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-logger.php',
16
+ 'ThemeIsle_SDK_Notification_Manager' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-notification-manager.php',
17
  'ThemeIsle_SDK_Product' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-product.php',
18
  'ThemeIsle_SDK_Widget' => $vendorDir . '/codeinwp/themeisle-sdk/class-themeisle-sdk-widget.php',
19
  'ThemeIsle_SDK_Widget_Dashboard_Blog' => $vendorDir . '/codeinwp/themeisle-sdk/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 ComposerAutoloaderInit276c9582fa115366ac05248d47125f8f
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit276c9582fa115366ac05248d47125f8f
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit276c9582fa115366ac05248d47125f8f', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit276c9582fa115366ac05248d47125f8f', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit18b613712091f63dc58167e7cc218d6b
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit18b613712091f63dc58167e7cc218d6b', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit18b613712091f63dc58167e7cc218d6b', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit05b53f459746cd03dadab9a349c46a87 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit05b53f459746cd03dadab9a349c46a87 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit05b53f459746cd03dadab9a349c46a87', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit05b53f459746cd03dadab9a349c46a87', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit62e4e293119ab0f071c321d4f25057f8 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit62e4e293119ab0f071c321d4f25057f8', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit62e4e293119ab0f071c321d4f25057f8', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/installed.json CHANGED
@@ -39,17 +39,17 @@
39
  "source": {
40
  "type": "git",
41
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
42
- "reference": "6f80d2f1820e34188121824fb43937494b676084"
43
  },
44
  "dist": {
45
  "type": "zip",
46
- "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/6f80d2f1820e34188121824fb43937494b676084",
47
- "reference": "6f80d2f1820e34188121824fb43937494b676084",
48
  "shasum": ""
49
  },
50
- "time": "2017-05-26 17:00:03",
51
  "type": "library",
52
- "installation-source": "source",
53
  "autoload": {
54
  "classmap": [
55
  "class-themeisle-sdk-loader.php",
@@ -59,6 +59,8 @@
59
  "class-themeisle-sdk-feedback-factory.php",
60
  "class-themeisle-sdk-feedback.php",
61
  "class-themeisle-sdk-feedback-deactivate.php",
 
 
62
  "class-themeisle-sdk-widget.php",
63
  "class-themeisle-sdk-widget-dashboard-blog.php",
64
  "class-themeisle-sdk-widgets-factory.php"
39
  "source": {
40
  "type": "git",
41
  "url": "https://github.com/Codeinwp/themeisle-sdk.git",
42
+ "reference": "7817845a4f1ffea73264861d67094588bf095400"
43
  },
44
  "dist": {
45
  "type": "zip",
46
+ "url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/7817845a4f1ffea73264861d67094588bf095400",
47
+ "reference": "7817845a4f1ffea73264861d67094588bf095400",
48
  "shasum": ""
49
  },
50
+ "time": "2017-05-30 09:47:46",
51
  "type": "library",
52
+ "installation-source": "dist",
53
  "autoload": {
54
  "classmap": [
55
  "class-themeisle-sdk-loader.php",
59
  "class-themeisle-sdk-feedback-factory.php",
60
  "class-themeisle-sdk-feedback.php",
61
  "class-themeisle-sdk-feedback-deactivate.php",
62
+ "class-themeisle-sdk-feedback-review.php",
63
+ "class-themeisle-sdk-notification-manager.php",
64
  "class-themeisle-sdk-widget.php",
65
  "class-themeisle-sdk-widget-dashboard-blog.php",
66
  "class-themeisle-sdk-widgets-factory.php"