Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | FEEDZY RSS Feeds Lite |
Version | 4.0.2 |
Comparing to | |
See all releases |
Code changes from version 4.0.1 to 4.0.2
- CHANGELOG.md +9 -0
- css/feedzy-rss-feed-import.css +70 -0
- css/feedzy-rss-feeds.css +1 -1
- css/form.css +3 -3
- feedzy-rss-feed.php +14 -5
- includes/admin/feedzy-rss-feeds-admin.php +3 -3
- includes/admin/feedzy-rss-feeds-import.php +22 -7
- includes/admin/feedzy-rss-feeds-ui-lang.php +2 -2
- includes/admin/feedzy-rss-feeds-ui.php +1 -1
- includes/elementor/widgets/register-widget.php +1 -1
- includes/feedzy-rss-feeds-feed-tweaks.php +5 -0
- includes/feedzy-rss-feeds.php +2 -2
- includes/gutenberg/build/block.js +1 -1
- includes/layouts/feedzy-pro.php +1 -1
- includes/layouts/feedzy-support.php +1 -1
- includes/layouts/feedzy-tutorial.php +7 -8
- includes/views/import-metabox-edit.php +9 -9
- includes/views/js/import-metabox-edit.js +3 -0
- includes/views/spinnerchief-view.php +1 -1
- includes/views/wordai-view.php +1 -1
- readme.txt +13 -1
- vendor/autoload.php +1 -1
- vendor/codeinwp/themeisle-sdk/CHANGELOG.md +16 -0
- vendor/codeinwp/themeisle-sdk/assets/images/animation.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/images/conditions.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/images/css.jpg +0 -0
- vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php +1 -0
- vendor/codeinwp/themeisle-sdk/assets/js/build/index.js +1 -0
- vendor/codeinwp/themeisle-sdk/load.php +103 -1
- vendor/codeinwp/themeisle-sdk/src/Loader.php +2 -1
- vendor/codeinwp/themeisle-sdk/src/Modules/Compatibilities.php +236 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php +2 -1
- vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php +112 -10
- vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php +254 -0
- vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php +8 -6
- vendor/codeinwp/themeisle-sdk/src/Product.php +25 -1
- vendor/codeinwp/themeisle-sdk/start.php +2 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.json +7 -8
- vendor/composer/installed.php +10 -12
CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 4.0.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v4.0.0...v4.0.1) (2022-07-19)
|
2 |
|
3 |
#### Fixes:
|
1 |
+
##### [Version 4.0.2](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v4.0.1...v4.0.2) (2022-09-09)
|
2 |
+
|
3 |
+
#### Fixes
|
4 |
+
- Fix compatibility issues with Jnews-essential
|
5 |
+
- Fix duplicate upsell card
|
6 |
+
- Fix Feedzy icon not visible in the classic editor
|
7 |
+
- Change red color after import
|
8 |
+
- Update dependencies
|
9 |
+
|
10 |
##### [Version 4.0.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v4.0.0...v4.0.1) (2022-07-19)
|
11 |
|
12 |
#### Fixes:
|
css/feedzy-rss-feed-import.css
CHANGED
@@ -130,6 +130,11 @@ td.feedzy-has-popup {
|
|
130 |
color: #ca4a1f !important;
|
131 |
background-color: inherit !important;
|
132 |
}
|
|
|
|
|
|
|
|
|
|
|
133 |
.feedzy-onboarding-modal {
|
134 |
max-width: 350px;
|
135 |
}
|
@@ -206,6 +211,71 @@ td.feedzy-has-popup {
|
|
206 |
box-shadow: inset 0 0 0 1px #4268cf;
|
207 |
color: #4268cf;
|
208 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
209 |
@media screen and (max-width: 782px) {
|
210 |
tr.feedzy-import-status-row table {
|
211 |
width: 100%;
|
130 |
color: #ca4a1f !important;
|
131 |
background-color: inherit !important;
|
132 |
}
|
133 |
+
|
134 |
+
.feedzy_run_now_msg.import_success {
|
135 |
+
color: #246B3B !important;
|
136 |
+
}
|
137 |
+
|
138 |
.feedzy-onboarding-modal {
|
139 |
max-width: 350px;
|
140 |
}
|
211 |
box-shadow: inset 0 0 0 1px #4268cf;
|
212 |
color: #4268cf;
|
213 |
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* TinyMce UI button
|
217 |
+
*/
|
218 |
+
i.mce-i-feedzy-icon {
|
219 |
+
background-image: none, url("../img/feedzy.svg"), url("../img/feedzy.png");
|
220 |
+
}
|
221 |
+
|
222 |
+
#feedzy-rss-button-insert {
|
223 |
+
border-color: #4cae4c;
|
224 |
+
color: #fff;
|
225 |
+
background-color: #5cb85c;
|
226 |
+
}
|
227 |
+
|
228 |
+
#feedzy-rss-button-insert button {
|
229 |
+
color: #fff;
|
230 |
+
}
|
231 |
+
|
232 |
+
#feedzy-rss-button-insert:hover,
|
233 |
+
#feedzy-rss-button-insert:focus {
|
234 |
+
border-color: #398439;
|
235 |
+
color: #fff;
|
236 |
+
background-color: #449d44;
|
237 |
+
}
|
238 |
+
|
239 |
+
#feedzy-rss-button-cancel {
|
240 |
+
border-color: #ccc;
|
241 |
+
color: #333;
|
242 |
+
background-color: #fff;
|
243 |
+
}
|
244 |
+
|
245 |
+
#feedzy-rss-button-cancel button {
|
246 |
+
color: #333;
|
247 |
+
}
|
248 |
+
|
249 |
+
#feedzy-rss-button-cancel:hover,
|
250 |
+
#feedzy-rss-button-cancel:focus {
|
251 |
+
border-color: #adadad;
|
252 |
+
color: #333;
|
253 |
+
background-color: #e6e6e6;
|
254 |
+
}
|
255 |
+
|
256 |
+
#feedzy-rss-button-pro {
|
257 |
+
position: absolute;
|
258 |
+
left: 10px !important;
|
259 |
+
border-color: #46b8da;
|
260 |
+
color: #fff;
|
261 |
+
background-color: #5bc0de;
|
262 |
+
}
|
263 |
+
|
264 |
+
#feedzy-rss-button-pro button {
|
265 |
+
color: #fff;
|
266 |
+
}
|
267 |
+
|
268 |
+
#feedzy-rss-button-pro:hover,
|
269 |
+
#feedzy-rss-button-pro:focus {
|
270 |
+
border-color: #269abc;
|
271 |
+
color: #fff;
|
272 |
+
background-color: #31b0d5;
|
273 |
+
}
|
274 |
+
|
275 |
+
#feedzy-rss-insert-dialog-title {
|
276 |
+
font-weight: 300;
|
277 |
+
text-align: center;
|
278 |
+
}
|
279 |
@media screen and (max-width: 782px) {
|
280 |
tr.feedzy-import-status-row table {
|
281 |
width: 100%;
|
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: 4.0.
|
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: 4.0.2
|
6 |
* Plugin Name: FEEDZY RSS Feeds
|
7 |
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
|
8 |
* Author: Themeisle
|
css/form.css
CHANGED
@@ -708,15 +708,15 @@ img {
|
|
708 |
}
|
709 |
|
710 |
.feedzy-template-default {
|
711 |
-
background: url(../img/feedzy-default-template.
|
712 |
}
|
713 |
|
714 |
.feedzy-template-style1 {
|
715 |
-
background: url(../img/feedzy-style1-template.
|
716 |
}
|
717 |
|
718 |
.feedzy-template-style2 {
|
719 |
-
background: url(../img/feedzy-style2-template.
|
720 |
}
|
721 |
|
722 |
input[disabled],
|
708 |
}
|
709 |
|
710 |
.feedzy-template-default {
|
711 |
+
background: url(../img/feedzy-default-template.png) no-repeat bottom center;
|
712 |
}
|
713 |
|
714 |
.feedzy-template-style1 {
|
715 |
+
background: url(../img/feedzy-style1-template.png) no-repeat bottom center;
|
716 |
}
|
717 |
|
718 |
.feedzy-template-style2 {
|
719 |
+
background: url(../img/feedzy-style2-template.png) no-repeat bottom center;
|
720 |
}
|
721 |
|
722 |
input[disabled],
|
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/
|
17 |
* Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
|
18 |
-
* Version: 4.0.
|
19 |
* Author: Themeisle
|
20 |
* Author URI: http://themeisle.com
|
21 |
* License: GPL-2.0+
|
@@ -120,6 +120,7 @@ function run_feedzy_rss_feeds() {
|
|
120 |
define( 'FEEDZY_ABSURL', plugins_url( '/', __FILE__ ) );
|
121 |
define( 'FEEDZY_BASENAME', plugin_basename( __FILE__ ) );
|
122 |
define( 'FEEDZY_ABSPATH', dirname( __FILE__ ) );
|
|
|
123 |
define( 'FEEDZY_UPSELL_LINK', 'https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/' );
|
124 |
define( 'FEEDZY_NAME', 'Feedzy RSS Feeds' );
|
125 |
define( 'FEEDZY_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' );
|
@@ -132,16 +133,24 @@ function run_feedzy_rss_feeds() {
|
|
132 |
// also used in gutenberg.
|
133 |
define( 'FEEDZY_DISABLE_CACHE_FOR_TESTING', false );
|
134 |
|
135 |
-
$feedzy = Feedzy_Rss_Feeds::instance();
|
136 |
-
$feedzy->run();
|
137 |
$vendor_file = FEEDZY_ABSPATH . '/vendor/autoload.php';
|
138 |
if ( is_readable( $vendor_file ) ) {
|
139 |
require_once $vendor_file;
|
140 |
}
|
141 |
-
|
|
|
142 |
add_filter( 'themeisle_sdk_products', 'feedzy_register_sdk', 10, 1 );
|
143 |
add_filter( 'pirate_parrot_log', 'feedzy_register_parrot', 10, 1 );
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
define( 'FEEDZY_SURVEY_PRO', 'https://forms.gle/FZXhL3D48KJUhb7q9' );
|
146 |
define( 'FEEDZY_SURVEY_FREE', 'https://forms.gle/yQUGSrKEa7XJTGLx8' );
|
147 |
|
15 |
* Plugin Name: Feedzy RSS Feeds Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds/
|
17 |
* Description: A small and lightweight RSS aggregator plugin. Fast and very easy to use, it allows you to aggregate multiple RSS feeds into your WordPress site through fully customizable shortcodes & widgets.
|
18 |
+
* Version: 4.0.2
|
19 |
* Author: Themeisle
|
20 |
* Author URI: http://themeisle.com
|
21 |
* License: GPL-2.0+
|
120 |
define( 'FEEDZY_ABSURL', plugins_url( '/', __FILE__ ) );
|
121 |
define( 'FEEDZY_BASENAME', plugin_basename( __FILE__ ) );
|
122 |
define( 'FEEDZY_ABSPATH', dirname( __FILE__ ) );
|
123 |
+
define( 'FEEDZY_DIRNAME', basename( FEEDZY_ABSPATH ) );
|
124 |
define( 'FEEDZY_UPSELL_LINK', 'https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/' );
|
125 |
define( 'FEEDZY_NAME', 'Feedzy RSS Feeds' );
|
126 |
define( 'FEEDZY_USER_AGENT', 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' );
|
133 |
// also used in gutenberg.
|
134 |
define( 'FEEDZY_DISABLE_CACHE_FOR_TESTING', false );
|
135 |
|
|
|
|
|
136 |
$vendor_file = FEEDZY_ABSPATH . '/vendor/autoload.php';
|
137 |
if ( is_readable( $vendor_file ) ) {
|
138 |
require_once $vendor_file;
|
139 |
}
|
140 |
+
$feedzy = Feedzy_Rss_Feeds::instance();
|
141 |
+
$feedzy->run();
|
142 |
add_filter( 'themeisle_sdk_products', 'feedzy_register_sdk', 10, 1 );
|
143 |
add_filter( 'pirate_parrot_log', 'feedzy_register_parrot', 10, 1 );
|
144 |
+
add_filter(
|
145 |
+
'themeisle_sdk_compatibilities/' . FEEDZY_DIRNAME, function ( $compatibilities ) {
|
146 |
+
$compatibilities['FeedzyPRO'] = array(
|
147 |
+
'basefile' => defined( 'FEEDZY_PRO_BASEFILE' ) ? FEEDZY_PRO_BASEFILE : '',
|
148 |
+
'required' => '1.7',
|
149 |
+
'tested_up' => '2.1',
|
150 |
+
);
|
151 |
+
return $compatibilities;
|
152 |
+
}
|
153 |
+
);
|
154 |
define( 'FEEDZY_SURVEY_PRO', 'https://forms.gle/FZXhL3D48KJUhb7q9' );
|
155 |
define( 'FEEDZY_SURVEY_FREE', 'https://forms.gle/yQUGSrKEa7XJTGLx8' );
|
156 |
|
includes/admin/feedzy-rss-feeds-admin.php
CHANGED
@@ -284,7 +284,7 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
|
|
284 |
<li>- Translate content</li>
|
285 |
<li>- Elementor Templates support</li>
|
286 |
</ul>';
|
287 |
-
echo '<a class="button button-primary " href="' .
|
288 |
|
289 |
}
|
290 |
|
@@ -452,9 +452,9 @@ class Feedzy_Rss_Feeds_Admin extends Feedzy_Rss_Feeds_Admin_Abstract {
|
|
452 |
$new_links['doc'] = '<a href="https://docs.themeisle.com/article/658-feedzy-rss-feeds" target="_blank" title="' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '">' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '</a>';
|
453 |
|
454 |
if ( ! feedzy_is_pro() ) {
|
455 |
-
$new_links['more_features'] = '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade to Pro', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
|
456 |
} elseif ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
|
457 |
-
$new_links['more_features'] = '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade your license', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
|
458 |
}
|
459 |
$links = array_merge( $links, $new_links );
|
460 |
}
|
284 |
<li>- Translate content</li>
|
285 |
<li>- Elementor Templates support</li>
|
286 |
</ul>';
|
287 |
+
echo '<a class="button button-primary " href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'metabox', 'new-category' ) . '" target="_blank">View more details</a>';
|
288 |
|
289 |
}
|
290 |
|
452 |
$new_links['doc'] = '<a href="https://docs.themeisle.com/article/658-feedzy-rss-feeds" target="_blank" title="' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '">' . __( 'Documentation and examples', 'feedzy-rss-feeds' ) . '</a>';
|
453 |
|
454 |
if ( ! feedzy_is_pro() ) {
|
455 |
+
$new_links['more_features'] = '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'rowmeta', 'plugins' ) . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade to Pro', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
|
456 |
} elseif ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) {
|
457 |
+
$new_links['more_features'] = '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'rowmetamore', 'plugins' ) . '" target="_blank" title="' . __( 'More Features', 'feedzy-rss-feeds' ) . '">' . __( 'Upgrade your license', 'feedzy-rss-feeds' ) . '<i style="width: 17px; height: 17px; margin-left: 4px; color: #ffca54; font-size: 17px; vertical-align: -3px;" class="dashicons dashicons-unlock more-features-icon"></i></a>';
|
458 |
}
|
459 |
$links = array_merge( $links, $new_links );
|
460 |
}
|
includes/admin/feedzy-rss-feeds-import.php
CHANGED
@@ -102,7 +102,7 @@ class Feedzy_Rss_Feeds_Import {
|
|
102 |
<div class="only-pro-container">
|
103 |
<div class="only-pro-inner upgrade-alert">
|
104 |
' . __( 'This feature is available in the Pro version. Unlock more features, by', 'feedzy-rss-feeds' ) . '
|
105 |
-
<a target="_blank" href="' . FEEDZY_UPSELL_LINK . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">' . __( 'upgrading to Feedzy Pro', 'feedzy-rss-feeds' ) . '</a>
|
106 |
</div>
|
107 |
</div>
|
108 |
</div>';
|
@@ -1051,7 +1051,7 @@ class Feedzy_Rss_Feeds_Import {
|
|
1051 |
$msg = $count > 0 ? __( 'Successfully run!', 'feedzy-rss-feeds' ) : __( 'Nothing imported!', 'feedzy-rss-feeds' );
|
1052 |
$msg .= ' (' . __( 'Refresh this page for the updated status', 'feedzy-rss-feeds' ) . ')';
|
1053 |
|
1054 |
-
wp_send_json_success( array( 'msg' => $msg ) );
|
1055 |
}
|
1056 |
|
1057 |
/**
|
@@ -1367,7 +1367,7 @@ class Feedzy_Rss_Feeds_Import {
|
|
1367 |
$import_title
|
1368 |
);
|
1369 |
|
1370 |
-
if ( $this->feedzy_is_business() ) {
|
1371 |
$post_title = apply_filters( 'feedzy_parse_custom_tags', $post_title, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $item['item_index'] );
|
1372 |
}
|
1373 |
|
@@ -1458,7 +1458,7 @@ class Feedzy_Rss_Feeds_Import {
|
|
1458 |
$post_content = apply_filters( 'feedzy_invoke_services', $post_content, 'full_content', $full_content, $job );
|
1459 |
}
|
1460 |
|
1461 |
-
if ( $this->feedzy_is_business() ) {
|
1462 |
$post_content = apply_filters( 'feedzy_parse_custom_tags', $post_content, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $item['item_index'] );
|
1463 |
}
|
1464 |
|
@@ -1525,7 +1525,7 @@ class Feedzy_Rss_Feeds_Import {
|
|
1525 |
$post_excerpt
|
1526 |
);
|
1527 |
|
1528 |
-
if ( $this->feedzy_is_business() ) {
|
1529 |
$item_post_excerpt = apply_filters( 'feedzy_parse_custom_tags', $item_post_excerpt, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $item['item_index'] );
|
1530 |
}
|
1531 |
|
@@ -1570,7 +1570,9 @@ class Feedzy_Rss_Feeds_Import {
|
|
1570 |
}
|
1571 |
} elseif ( strpos( $import_featured_img, '[#item_custom' ) !== false ) {
|
1572 |
// custom image tag
|
1573 |
-
|
|
|
|
|
1574 |
if ( ! empty( $value ) && strpos( $value, '[#item_custom' ) === false ) {
|
1575 |
$image_url = $value;
|
1576 |
} else {
|
@@ -1661,7 +1663,9 @@ class Feedzy_Rss_Feeds_Import {
|
|
1661 |
}
|
1662 |
} elseif ( strpos( $import_featured_img, '[#item_custom' ) !== false ) {
|
1663 |
// custom image tag
|
1664 |
-
|
|
|
|
|
1665 |
if ( ! empty( $value ) && strpos( $value, '[#item_custom' ) === false ) {
|
1666 |
$image_url = $value;
|
1667 |
} else {
|
@@ -1947,6 +1951,17 @@ class Feedzy_Rss_Feeds_Import {
|
|
1947 |
return $this->feedzy_is_license_of_type( false, 'agency' );
|
1948 |
}
|
1949 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1950 |
/**
|
1951 |
* Method to return the type of licence.
|
1952 |
*
|
102 |
<div class="only-pro-container">
|
103 |
<div class="only-pro-inner upgrade-alert">
|
104 |
' . __( 'This feature is available in the Pro version. Unlock more features, by', 'feedzy-rss-feeds' ) . '
|
105 |
+
<a target="_blank" href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'upsell-content', 'import' ) . '" title="' . __( 'Buy Now', 'feedzy-rss-feeds' ) . '">' . __( 'upgrading to Feedzy Pro', 'feedzy-rss-feeds' ) . '</a>
|
106 |
</div>
|
107 |
</div>
|
108 |
</div>';
|
1051 |
$msg = $count > 0 ? __( 'Successfully run!', 'feedzy-rss-feeds' ) : __( 'Nothing imported!', 'feedzy-rss-feeds' );
|
1052 |
$msg .= ' (' . __( 'Refresh this page for the updated status', 'feedzy-rss-feeds' ) . ')';
|
1053 |
|
1054 |
+
wp_send_json_success( array( 'msg' => $msg, 'import_success' => $count > 0 ) );
|
1055 |
}
|
1056 |
|
1057 |
/**
|
1367 |
$import_title
|
1368 |
);
|
1369 |
|
1370 |
+
if ( $this->feedzy_is_business() || $this->feedzy_is_personal() ) {
|
1371 |
$post_title = apply_filters( 'feedzy_parse_custom_tags', $post_title, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $item['item_index'] );
|
1372 |
}
|
1373 |
|
1458 |
$post_content = apply_filters( 'feedzy_invoke_services', $post_content, 'full_content', $full_content, $job );
|
1459 |
}
|
1460 |
|
1461 |
+
if ( $this->feedzy_is_business() || $this->feedzy_is_personal() ) {
|
1462 |
$post_content = apply_filters( 'feedzy_parse_custom_tags', $post_content, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $item['item_index'] );
|
1463 |
}
|
1464 |
|
1525 |
$post_excerpt
|
1526 |
);
|
1527 |
|
1528 |
+
if ( $this->feedzy_is_business() || $this->feedzy_is_personal() ) {
|
1529 |
$item_post_excerpt = apply_filters( 'feedzy_parse_custom_tags', $item_post_excerpt, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $item['item_index'] );
|
1530 |
}
|
1531 |
|
1570 |
}
|
1571 |
} elseif ( strpos( $import_featured_img, '[#item_custom' ) !== false ) {
|
1572 |
// custom image tag
|
1573 |
+
if ( $this->feedzy_is_business() || $this->feedzy_is_personal() ) {
|
1574 |
+
$value = apply_filters( 'feedzy_parse_custom_tags', $import_featured_img, $results['feed'], $index );
|
1575 |
+
}
|
1576 |
if ( ! empty( $value ) && strpos( $value, '[#item_custom' ) === false ) {
|
1577 |
$image_url = $value;
|
1578 |
} else {
|
1663 |
}
|
1664 |
} elseif ( strpos( $import_featured_img, '[#item_custom' ) !== false ) {
|
1665 |
// custom image tag
|
1666 |
+
if ( $this->feedzy_is_business() || $this->feedzy_is_personal() ) {
|
1667 |
+
$value = apply_filters( 'feedzy_parse_custom_tags', $import_featured_img, ! empty( $xml_results ) ? $xml_results['feed'] : $results['feed'], $index );
|
1668 |
+
}
|
1669 |
if ( ! empty( $value ) && strpos( $value, '[#item_custom' ) === false ) {
|
1670 |
$image_url = $value;
|
1671 |
} else {
|
1951 |
return $this->feedzy_is_license_of_type( false, 'agency' );
|
1952 |
}
|
1953 |
|
1954 |
+
/**
|
1955 |
+
* Method to return if licence is personal.
|
1956 |
+
*
|
1957 |
+
* @return bool
|
1958 |
+
* @since 1.8.2
|
1959 |
+
* @access public
|
1960 |
+
*/
|
1961 |
+
public function feedzy_is_personal() {
|
1962 |
+
return $this->feedzy_is_license_of_type( false, 'pro' );
|
1963 |
+
}
|
1964 |
+
|
1965 |
/**
|
1966 |
* Method to return the type of licence.
|
1967 |
*
|
includes/admin/feedzy-rss-feeds-ui-lang.php
CHANGED
@@ -48,7 +48,7 @@ class Feedzy_Rss_Feeds_Ui_Lang {
|
|
48 |
public function __construct() {
|
49 |
$this->strings = array(
|
50 |
'popup_url' => wp_nonce_url( 'admin-ajax.php', 'feedzy_ajax_token', 'feedzy_request_form_token' ),
|
51 |
-
'pro_url' => FEEDZY_UPSELL_LINK,
|
52 |
'plugin_label' => __( 'Feedzy Lite', 'feedzy-rss-feeds' ),
|
53 |
'plugin_title' => __( 'Insert Feedzy RSS Feeds Shortcode', 'feedzy-rss-feeds' ),
|
54 |
'image_button' => __( 'Use Image', 'feedzy-rss-feeds' ),
|
@@ -418,7 +418,7 @@ class Feedzy_Rss_Feeds_Ui_Lang {
|
|
418 |
),
|
419 |
'section_pro' => array(
|
420 |
'title' => __( 'PRO Options', 'feedzy-rss-feeds' ),
|
421 |
-
'description' => __( 'Get access to more options and customizations with full version of Feedzy RSS Feeds . Use existing templates or extend them and make them your own.', 'feedzy-rss-feeds' ) . '<br/>' . '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank"><small>' . __( 'See more features of Feedzy RSS Feeds PRO', 'feedzy-rss-feeds' ) . '</small></a>',
|
422 |
'elements' => array(
|
423 |
'price' => array(
|
424 |
'label' => sprintf( __( 'Should we display the price from the feed if it is available? <br/> You can read about how to extract price from a custom tag %1$shere%2$s', 'feedzy-rss-feeds' ), '<a href="https://docs.themeisle.com/article/977-how-do-i-extract-values-from-custom-tags-in-feedzy" target="_blank">', '</a>' ),
|
48 |
public function __construct() {
|
49 |
$this->strings = array(
|
50 |
'popup_url' => wp_nonce_url( 'admin-ajax.php', 'feedzy_ajax_token', 'feedzy_request_form_token' ),
|
51 |
+
'pro_url' => tsdk_utmify( FEEDZY_UPSELL_LINK, 'shortcode' ),
|
52 |
'plugin_label' => __( 'Feedzy Lite', 'feedzy-rss-feeds' ),
|
53 |
'plugin_title' => __( 'Insert Feedzy RSS Feeds Shortcode', 'feedzy-rss-feeds' ),
|
54 |
'image_button' => __( 'Use Image', 'feedzy-rss-feeds' ),
|
418 |
),
|
419 |
'section_pro' => array(
|
420 |
'title' => __( 'PRO Options', 'feedzy-rss-feeds' ),
|
421 |
+
'description' => __( 'Get access to more options and customizations with full version of Feedzy RSS Feeds . Use existing templates or extend them and make them your own.', 'feedzy-rss-feeds' ) . '<br/>' . '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'sectionpro' ) . '" target="_blank"><small>' . __( 'See more features of Feedzy RSS Feeds PRO', 'feedzy-rss-feeds' ) . '</small></a>',
|
422 |
'elements' => array(
|
423 |
'price' => array(
|
424 |
'label' => sprintf( __( 'Should we display the price from the feed if it is available? <br/> You can read about how to extract price from a custom tag %1$shere%2$s', 'feedzy-rss-feeds' ), '<a href="https://docs.themeisle.com/article/977-how-do-i-extract-values-from-custom-tags-in-feedzy" target="_blank">', '</a>' ),
|
includes/admin/feedzy-rss-feeds-ui.php
CHANGED
@@ -221,7 +221,7 @@ class Feedzy_Rss_Feeds_Ui {
|
|
221 |
<?php if ( ! feedzy_is_pro() ) : ?>
|
222 |
<div class="upgrade-alert mb-24">
|
223 |
<?php
|
224 |
-
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), FEEDZY_UPSELL_LINK ) );
|
225 |
?>
|
226 |
<button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>
|
227 |
</div>
|
221 |
<?php if ( ! feedzy_is_pro() ) : ?>
|
222 |
<div class="upgrade-alert mb-24">
|
223 |
<?php
|
224 |
+
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), tsdk_utmify( FEEDZY_UPSELL_LINK, 'post_title', 'import-screen' ) ) );
|
225 |
?>
|
226 |
<button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>
|
227 |
</div>
|
includes/elementor/widgets/register-widget.php
CHANGED
@@ -505,7 +505,7 @@ class Feedzy_Register_Widget extends Elementor\Widget_Base {
|
|
505 |
'label' => __( 'Add your referral parameters', 'feedzy-rss-feeds' ),
|
506 |
'label_block' => true,
|
507 |
'type' => Controls_Manager::TEXT,
|
508 |
-
'description' => ! feedzy_is_pro() ? wp_sprintf( __( 'Unlock this feature and more advanced options with <a href="%s" target="_blank">Feedzy Pro</a>.', 'feedzy-rss-feeds' ),
|
509 |
'classes' => $this->upsell_class(),
|
510 |
)
|
511 |
);
|
505 |
'label' => __( 'Add your referral parameters', 'feedzy-rss-feeds' ),
|
506 |
'label_block' => true,
|
507 |
'type' => Controls_Manager::TEXT,
|
508 |
+
'description' => ! feedzy_is_pro() ? wp_sprintf( __( 'Unlock this feature and more advanced options with <a href="%s" target="_blank">Feedzy Pro</a>.', 'feedzy-rss-feeds' ), ( tsdk_utmify( FEEDZY_UPSELL_LINK, 'refferal', 'widget-area' ) ) ) : '',
|
509 |
'classes' => $this->upsell_class(),
|
510 |
)
|
511 |
);
|
includes/feedzy-rss-feeds-feed-tweaks.php
CHANGED
@@ -242,6 +242,7 @@ add_filter(
|
|
242 |
'class' => array(),
|
243 |
'selected' => array(),
|
244 |
'data-feedzy' => array(),
|
|
|
245 |
),
|
246 |
'option' => array(
|
247 |
'type' => array(),
|
@@ -260,6 +261,7 @@ add_filter(
|
|
260 |
'checked' => array(),
|
261 |
'placeholder' => array(),
|
262 |
'data-feedzy' => array(),
|
|
|
263 |
),
|
264 |
'textarea' => array(
|
265 |
'id' => array(),
|
@@ -322,6 +324,9 @@ add_filter(
|
|
322 |
'allowfullscreen' => array(),
|
323 |
'data-*' => true,
|
324 |
),
|
|
|
|
|
|
|
325 |
);
|
326 |
}
|
327 |
);
|
242 |
'class' => array(),
|
243 |
'selected' => array(),
|
244 |
'data-feedzy' => array(),
|
245 |
+
'disabled' => array(),
|
246 |
),
|
247 |
'option' => array(
|
248 |
'type' => array(),
|
261 |
'checked' => array(),
|
262 |
'placeholder' => array(),
|
263 |
'data-feedzy' => array(),
|
264 |
+
'disabled' => array(),
|
265 |
),
|
266 |
'textarea' => array(
|
267 |
'id' => array(),
|
324 |
'allowfullscreen' => array(),
|
325 |
'data-*' => true,
|
326 |
),
|
327 |
+
'small' => array(
|
328 |
+
'class' => array(),
|
329 |
+
),
|
330 |
);
|
331 |
}
|
332 |
);
|
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 = '4.0.
|
108 |
self::$instance->load_dependencies();
|
109 |
self::$instance->set_locale();
|
110 |
self::$instance->define_admin_hooks();
|
@@ -199,7 +199,7 @@ class Feedzy_Rss_Feeds {
|
|
199 |
self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages' );
|
200 |
self::$instance->loader->add_action( 'wp_ajax_get_tinymce_form', self::$instance->admin, 'get_tinymce_form' );
|
201 |
self::$instance->loader->add_action( 'wp_enqueue_scripts', self::$instance->admin, 'enqueue_styles' );
|
202 |
-
self::$instance->loader->add_action( 'admin_enqueue_scripts', self::$instance->admin, 'enqueue_styles_admin' );
|
203 |
self::$instance->loader->add_action( 'wp_ajax_feedzy_categories', self::$instance->admin, 'ajax' );
|
204 |
|
205 |
self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );
|
104 |
*/
|
105 |
public function init() {
|
106 |
self::$plugin_name = 'feedzy-rss-feeds';
|
107 |
+
self::$version = '4.0.2';
|
108 |
self::$instance->load_dependencies();
|
109 |
self::$instance->set_locale();
|
110 |
self::$instance->define_admin_hooks();
|
199 |
self::$instance->loader->add_action( 'admin_menu', self::$instance->admin, 'feedzy_menu_pages' );
|
200 |
self::$instance->loader->add_action( 'wp_ajax_get_tinymce_form', self::$instance->admin, 'get_tinymce_form' );
|
201 |
self::$instance->loader->add_action( 'wp_enqueue_scripts', self::$instance->admin, 'enqueue_styles' );
|
202 |
+
self::$instance->loader->add_action( 'admin_enqueue_scripts', self::$instance->admin, 'enqueue_styles_admin', 99 );
|
203 |
self::$instance->loader->add_action( 'wp_ajax_feedzy_categories', self::$instance->admin, 'ajax' );
|
204 |
|
205 |
self::$instance->loader->add_filter( 'manage_feedzy_categories_posts_columns', self::$instance->admin, 'feedzy_category_columns' );
|
includes/gutenberg/build/block.js
CHANGED
@@ -3,4 +3,4 @@
|
|
3 |
Copyright (c) 2018 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
-
*/!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&e.push(s)}}else if("object"===o)if(a.toString===Object.prototype.toString)for(var i in a)r.call(a,i)&&a[i]&&e.push(i);else e.push(a.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()},228:function(e,t,r){"use strict";r.r(t);var a={feeds:{type:"string"},max:{type:"number",default:5},offset:{type:"number",default:0},feed_title:{type:"boolean",default:!0},refresh:{type:"string",default:"12_hours"},sort:{type:"string",default:"default"},target:{type:"string",default:"_blank"},title:{type:"number"},meta:{type:"boolean",default:!0},lazy:{type:"boolean",default:!1},metafields:{type:"string",default:""},multiple_meta:{type:"string",default:""},summary:{type:"boolean",default:!0},summarylength:{type:"number"},keywords_title:{type:"string"},keywords_inc_on:{type:"string",default:"title"},keywords_ban:{type:"string"},keywords_exc_on:{type:"string",default:"title"},thumb:{type:"string",default:"auto"},default:{type:"object"},size:{type:"number",default:150},http:{type:"string"},referral_url:{type:"string"},columns:{type:"number",default:1},template:{type:"string",default:"default"},price:{type:"boolean",default:!0},route:{type:"string",default:"home"},feedData:{type:"object"},categories:{type:"object"},from_datetime:{type:"string"},to_datetime:{type:"string"},itemTitle:{type:"boolean",default:!0}},n=r(105),o=r.n(n),s=lodash.isEmpty,i=wp.components.BaseControl;var l=(0,wp.compose.withInstanceId)((function(e){var t=e.label,r=e.selected,a=e.help,n=e.instanceId,o=e.onChange,l=e.disabled,p=e.options,u=void 0===p?[]:p,c="inspector-radio-image-control-".concat(n),m=function(e){return o(e.target.value)};return!s(u)&&wp.element.createElement(i,{label:t,id:c,help:a,className:"components-radio-image-control feedzy-template"},wp.element.createElement("div",{className:"components-radio-image-control__container"},u.map((function(e,t){return wp.element.createElement("div",{key:"".concat(c,"-").concat(t),className:"components-radio-image-control__option"},wp.element.createElement("input",{id:"".concat(c,"-").concat(t),className:"components-radio-image-control__input",type:"radio",name:c,value:e.value,onChange:m,checked:e.value===r,"aria-describedby":a?"".concat(c,"__help"):void 0,disabled:l}),wp.element.createElement("label",{htmlFor:"".concat(c,"-").concat(t),title:e.label},wp.element.createElement("img",{src:e.src}),wp.element.createElement("span",{class:"image-clickable"})),wp.element.createElement("span",null,e.label))}))))})),p=r(20),u=r.n(p);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=b(e);if(t){var n=b(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return y(this,r)}}function y(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=wp.i18n.__,w=wp.hooks.applyFilters,v=wp.blockEditor||wp.editor,E=v.InspectorControls,k=v.MediaUpload,z=wp.element,T=z.Component,C=z.Fragment,x=wp.components,N=x.BaseControl,O=x.ExternalLink,S=x.PanelBody,j=x.RangeControl,F=x.TextControl,R=x.Button,P=x.ToggleControl,A=x.SelectControl,L=x.ResponsiveWrapper,D=x.Dashicon,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(o,e);var t,r,a,n=h(o);function o(){var e;return m(this,o),(e=n.apply(this,arguments)).state={tab:"content"},e}return t=o,(r=[{key:"render",value:function(){var e=this,t="",r=w("feedzy_widget_refresh_feed",[{label:g("1 Hour"),value:"1_hours"},{label:g("2 Hours"),value:"3_hours"},{label:g("12 Hours"),value:"12_hours"},{label:g("1 Day"),value:"1_days"},{label:g("3 Days"),value:"3_days"},{label:g("15 Days"),value:"15_days"}]);return"https"===this.props.attributes.http&&(t+=g("Please verify that the images exist on HTTPS.")),wp.element.createElement(C,null,wp.element.createElement(E,{key:"inspector"},wp.element.createElement(S,{className:"fz-section-header-panel"},wp.element.createElement(R,{className:u()("header-tab",{"is-selected":"content"===this.state.tab}),onClick:function(){return e.setState({tab:"content"})}},wp.element.createElement("span",null,wp.element.createElement(D,{icon:"editor-table"}),g("Content"))),wp.element.createElement(R,{className:u()("header-tab",{"is-selected":"style"===this.state.tab}),onClick:function(){return e.setState({tab:"style"})}},wp.element.createElement("span",null,wp.element.createElement(D,{icon:"admin-customizer"}),g("Style"))),wp.element.createElement(R,{className:u()("header-tab",{"is-selected":"advanced"===this.state.tab}),onClick:function(){return e.setState({tab:"advanced"})}},wp.element.createElement("span",null,wp.element.createElement(D,{icon:"admin-generic"}),g("Advanced")))),"content"===this.state.tab&&wp.element.createElement(C,null,wp.element.createElement(S,{title:g("Feed Source"),initialOpen:!0},0!==this.props.attributes.status&&[wp.element.createElement(F,{label:g("Feed Source"),className:"feedzy-source",value:this.props.attributes.feeds,onChange:this.props.edit.onChangeFeed}),wp.element.createElement(R,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.props.edit.loadFeed,className:"loadFeed"},g("Load Feed"))],"fetched"===this.props.state.route&&[wp.element.createElement(j,{label:g("Number of Items"),value:Number(this.props.attributes.max)||5,onChange:this.props.edit.onChangeMax,min:1,max:this.props.attributes.feedData.items.length||10,beforeIcon:"sort",className:"feedzy-max"}),wp.element.createElement(A,{label:g("Sorting Order"),value:this.props.attributes.sort,options:[{label:g("Default"),value:"default"},{label:g("Date Descending"),value:"date_desc"},{label:g("Date Ascending"),value:"date_asc"},{label:g("Title Descending"),value:"title_desc"},{label:g("Title Ascending"),value:"title_asc"}],onChange:this.props.edit.onSort,className:"feedzy-sort"}),wp.element.createElement(A,{label:g("Feed Caching Time"),value:this.props.attributes.refresh,options:r,onChange:this.props.edit.onRefresh,className:"feedzy-refresh"})]),wp.element.createElement(S,{title:g("Item Options"),initialOpen:!1,className:"feedzy-item-options"},wp.element.createElement(A,{label:g("Open Links In"),value:this.props.attributes.target,options:[{label:g("New Tab"),value:"_blank"},{label:g("Same Tab"),value:"_self"}],onChange:this.props.edit.onTarget}),wp.element.createElement(P,{label:g("Display item Title"),checked:!!this.props.attributes.itemTitle,onChange:this.props.edit.onToggleItemTitle,className:"feedzy-summary"}),this.props.attributes.itemTitle&&wp.element.createElement(F,{label:g("Title Character Limit"),help:g("Leave empty to show full title. A value of 0 will remove the title."),type:"number",value:this.props.attributes.title,onChange:this.props.edit.onTitle,className:"feedzy-title-length"}),wp.element.createElement(P,{label:g("Display post description?"),checked:!!this.props.attributes.summary,onChange:this.props.edit.onToggleSummary,className:"feedzy-summary"}),this.props.attributes.summary&&wp.element.createElement(F,{label:g("Description Character Limit"),help:g("Leave empty to show full description."),type:"number",value:this.props.attributes.summarylength,onChange:this.props.edit.onSummaryLength,className:"feedzy-summary-length",min:0})),wp.element.createElement(S,{title:[g("Filter items"),!feedzyjs.isPro&&wp.element.createElement("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,className:feedzyjs.isPro?"feedzy-item-filter":"feedzy-item-filter fz-locked"},!feedzyjs.isPro&&wp.element.createElement("div",{className:"fz-upsell-notice"},g("Unlock this feature and more advanced options with")," ",wp.element.createElement(O,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/"},g("Feedzy Pro"))),wp.element.createElement(F,{label:g("Only display if selected field contains:"),help:g("Use comma(,) and plus(+) keyword"),value:this.props.attributes.keywords_title,onChange:this.props.edit.onKeywordsTitle,className:"feedzy-include"}),wp.element.createElement(A,{label:g("Select a field if you want to inc keyword."),value:this.props.attributes.keywords_inc_on,options:[{label:g("Title"),value:"title"},{label:g("Author"),value:"author"},{label:g("Description"),value:"description"}],onChange:this.props.edit.onKeywordsIncludeOn}),wp.element.createElement(F,{label:g("Exclude if selected field contains:"),help:g("Use comma(,) and plus(+) keyword"),value:this.props.attributes.keywords_ban,onChange:this.props.edit.onKeywordsBan,className:"feedzy-ban"}),wp.element.createElement(A,{label:g("Select a field if you want to exc keyword."),value:this.props.attributes.keywords_exc_on,options:[{label:g("Title"),value:"title"},{label:g("Author"),value:"author"},{label:g("Description"),value:"description"}],onChange:this.props.edit.onKeywordsExcludeOn}),wp.element.createElement("p",{className:"fz-main-label"},g("Filter feed item by date range.")),wp.element.createElement(F,{type:"datetime-local",label:g("From:"),value:this.props.attributes.from_datetime,onChange:this.props.edit.onFromDateTime}),wp.element.createElement(F,{type:"datetime-local",label:g("To:"),value:this.props.attributes.to_datetime,onChange:this.props.edit.onToDateTime}))),"fetched"===this.props.state.route&&"style"===this.state.tab&&[wp.element.createElement(C,null,wp.element.createElement(S,{title:g("Item Image Options"),initialOpen:!1,className:"feedzy-image-options"},wp.element.createElement(A,{label:g("Display first image if available?"),value:this.props.attributes.thumb,options:[{label:g("Yes (without a fallback image)"),value:"auto"},{label:g("Yes (with a fallback image)"),value:"yes"},{label:g("No"),value:"no"}],onChange:this.props.edit.onThumb,className:"feedzy-thumb"}),"no"!==this.props.attributes.thumb&&["auto"!==this.props.attributes.thumb&&wp.element.createElement("div",{className:"feedzy-blocks-base-control"},wp.element.createElement("label",{className:"blocks-base-control__label",for:"inspector-media-upload"},g("Fallback image if no image is found.")),wp.element.createElement(k,{type:"image",id:"inspector-media-upload",value:this.props.attributes.default,onSelect:this.props.edit.onDefault,render:function(t){var r=t.open;return[void 0!==e.props.attributes.default&&[wp.element.createElement(L,{naturalWidth:e.props.attributes.default.width,naturalHeight:e.props.attributes.default.height},wp.element.createElement("img",{src:e.props.attributes.default.url,alt:g("Featured image")})),wp.element.createElement(R,{isLarge:!0,isSecondary:!0,onClick:function(){return e.props.setAttributes({default:void 0})},style:{marginTop:"10px"}},g("Remove Image"))],wp.element.createElement(R,{isLarge:!0,isPrimary:!0,onClick:r,style:{marginTop:"10px"},className:void 0===e.props.attributes.default&&"feedzy_image_upload"},g("Upload Image"))]}})),wp.element.createElement(F,{label:g("Thumbnails dimension."),type:"number",value:this.props.attributes.size,onChange:this.props.edit.onSize}),wp.element.createElement(A,{label:g("How should we treat HTTP images?"),value:this.props.attributes.http,options:[{label:g("Show with HTTP link"),value:"auto"},{label:g("Force HTTPS"),value:"https"},{label:g("Ignore and show the default image instead"),value:"default"}],onChange:this.props.edit.onHTTP,className:"feedzy-http",help:t})]),wp.element.createElement(S,{title:[g("Feed Layout"),!feedzyjs.isPro&&wp.element.createElement("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,className:feedzyjs.isPro?"feedzy-layout":"feedzy-layout fz-locked"},!feedzyjs.isPro&&wp.element.createElement("div",{className:"fz-upsell-notice"},g("Unlock this feature and more advanced options with")," ",wp.element.createElement(O,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/"},g("Feedzy Pro"))),wp.element.createElement(j,{label:g("Columns"),help:g("How many columns we should use to display the feed items?"),value:this.props.attributes.columns||1,onChange:this.props.edit.onColumns,min:1,max:6,beforeIcon:"sort",allowReset:!0}),wp.element.createElement(l,{label:g("Template"),selected:this.props.attributes.template,options:[{label:g("Default"),src:feedzyjs.imagepath+"feedzy-default-template.png",value:"default"},{label:g("Round"),src:feedzyjs.imagepath+"feedzy-style1-template.png",value:"style1"},{label:g("Cards"),src:feedzyjs.imagepath+"feedzy-style2-template.png",value:"style2"}],onChange:this.props.edit.onTemplate})))],"fetched"===this.props.state.route&&"advanced"===this.state.tab&&[wp.element.createElement(C,null,wp.element.createElement(S,{title:g("Feed Items Custom Options"),className:"feedzy-advanced-options",initialOpen:!1},wp.element.createElement(N,null,wp.element.createElement(F,{label:feedzyjs.isPro?g("Should we display additional meta fields out of author, date, time or categories? (comma-separated list, in order of display)."):g("Should we display additional meta fields out of author, date or time? (comma-separated list, in order of display)."),help:g('Leave empty to display all and "no" to display nothing.'),placeholder:feedzyjs.isPro?g("(eg: author, date, time, tz=local, categories)"):g("(eg: author, date, time, tz=local)"),value:this.props.attributes.metafields,onChange:this.props.edit.onChangeMeta,className:"feedzy-meta"}),wp.element.createElement(F,{label:g("When using multiple sources, should we display additional meta fields? - source (comma-separated list)."),placeholder:g("(eg: source)"),value:this.props.attributes.multiple_meta,onChange:this.props.edit.onChangeMultipleMeta,className:"feedzy-multiple-meta"}),wp.element.createElement(O,{href:"https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed"},g("You can find more info about available meta field values here."))),wp.element.createElement(P,{label:g("Display price if available?"),help:this.props.attributes.price&&"default"===this.props.attributes.template?g("Choose a different template for this to work."):null,checked:!!this.props.attributes.price,onChange:this.props.edit.onTogglePrice,className:feedzyjs.isPro?"feedzy-pro-price":"feedzy-pro-price fz-locked"}),null!==this.props.attributes.feedData.channel&&wp.element.createElement(P,{label:g("Display feed title?"),checked:!!this.props.attributes.feed_title,onChange:this.props.edit.onToggleFeedTitle,className:"feedzy-title"}),wp.element.createElement(j,{label:g("Ignore first N items"),value:Number(this.props.attributes.offset)||0,onChange:this.props.edit.onChangeOffset,min:0,max:this.props.attributes.feedData.items.length,beforeIcon:"sort",className:"feedzy-offset"}),wp.element.createElement(P,{label:g("Lazy load feed?"),checked:!!this.props.attributes.lazy,onChange:this.props.edit.onToggleLazy,className:"feedzy-lazy",help:g("Only on the front end.")})),wp.element.createElement(S,{title:[g("Referral URL"),!feedzyjs.isPro&&wp.element.createElement("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,className:feedzyjs.isPro?"feedzy-pro-options":"feedzy-pro-options fz-locked"},!feedzyjs.isPro&&wp.element.createElement("div",{className:"fz-upsell-notice"},g("Unlock this feature and more advanced options with")," ",wp.element.createElement(O,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/"},g("Feedzy Pro"))),wp.element.createElement(F,{label:g("Referral URL parameters."),help:g('Without ("?")'),placeholder:_("(eg. promo_code=feedzy_is_awesome)"),value:this.props.attributes.referral_url,onChange:this.props.edit.onReferralURL})))]))}}])&&d(t.prototype,r),a&&d(t,a),o}(T),U=function(e){var t=document.createElement("div");return t.innerHTML=e,void 0!==t.innerText?t.innerText:t.textContent},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="",r=[];return""!==e&&e.replace(/[^a-zA-Z]/g,"").length<=500&&(e.split(",").forEach((function(e){""!==(e=e.trim())&&(e=e.split("+").map((function(e){return"(?=.*"+(e=e.trim())+")"})),r.push(e.join("")))})),t="^"+(t=r.join("|"))+".*$",t=new RegExp(t,"i")),t};function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function H(e,t,r,a,n,o,s){try{var i=e[o](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(a,n)}function $(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var o=e.apply(t,r);function s(e){H(o,a,n,s,i,"next",e)}function i(e){H(o,a,n,s,i,"throw",e)}s(void 0)}))}}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=Z(e);if(t){var n=Z(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return X(this,r)}}function X(e,t){return!t||"object"!==B(t)&&"function"!=typeof t?Q(e):t}function Q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=wp.i18n.__,J=wp,ee=(J.apiFetch,J.apiRequest),te=wp.element,re=te.Component,ae=(te.Fragment,wp.components),ne=ae.ExternalLink,oe=ae.Placeholder,se=ae.TextControl,ie=ae.Button,le=ae.Spinner,pe=(wp.date.date,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(l,e);var t,r,a,n,s,i=W(l);function l(){var e;return Y(this,l),(e=i.apply(this,arguments)).loadFeed=e.loadFeed.bind(Q(e)),e.loadCategories=e.loadCategories.bind(Q(e)),e.metaExists=e.metaExists.bind(Q(e)),e.multipleMetaExists=e.multipleMetaExists.bind(Q(e)),e.getImageURL=e.getImageURL.bind(Q(e)),e.getValidateURL=e.getValidateURL.bind(Q(e)),e.onChangeFeed=e.onChangeFeed.bind(Q(e)),e.onChangeMax=e.onChangeMax.bind(Q(e)),e.onChangeOffset=e.onChangeOffset.bind(Q(e)),e.onToggleFeedTitle=e.onToggleFeedTitle.bind(Q(e)),e.onRefresh=e.onRefresh.bind(Q(e)),e.onSort=e.onSort.bind(Q(e)),e.onTarget=e.onTarget.bind(Q(e)),e.onTitle=e.onTitle.bind(Q(e)),e.onChangeMeta=e.onChangeMeta.bind(Q(e)),e.onChangeMultipleMeta=e.onChangeMultipleMeta.bind(Q(e)),e.onToggleSummary=e.onToggleSummary.bind(Q(e)),e.onToggleLazy=e.onToggleLazy.bind(Q(e)),e.onSummaryLength=e.onSummaryLength.bind(Q(e)),e.onKeywordsTitle=e.onKeywordsTitle.bind(Q(e)),e.onKeywordsBan=e.onKeywordsBan.bind(Q(e)),e.onThumb=e.onThumb.bind(Q(e)),e.onDefault=e.onDefault.bind(Q(e)),e.onSize=e.onSize.bind(Q(e)),e.onHTTP=e.onHTTP.bind(Q(e)),e.onReferralURL=e.onReferralURL.bind(Q(e)),e.onColumns=e.onColumns.bind(Q(e)),e.onTemplate=e.onTemplate.bind(Q(e)),e.onTogglePrice=e.onTogglePrice.bind(Q(e)),e.onKeywordsIncludeOn=e.onKeywordsIncludeOn.bind(Q(e)),e.onKeywordsExcludeOn=e.onKeywordsExcludeOn.bind(Q(e)),e.onFromDateTime=e.onFromDateTime.bind(Q(e)),e.onToDateTime=e.onToDateTime.bind(Q(e)),e.feedzyCategoriesList=e.feedzyCategoriesList.bind(Q(e)),e.onToggleItemTitle=e.onToggleItemTitle.bind(Q(e)),e.state={route:e.props.attributes.route,loading:!1,error:!1},e}return t=l,(r=[{key:"componentDidMount",value:(s=$(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.loadFeed(),void 0===this.props.attributes.categories&&(this.props.attributes.meta||this.props.setAttributes({meta:!0,metafields:"no"}),setTimeout((function(){t.loadCategories()})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"componentDidUpdate",value:(n=$(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"reload"===this.state.route&&this.loadFeed();case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"loadFeed",value:function(){var e=this,t=this.props.attributes.feeds;if(void 0!==t){if(function(e,t){if(void 0===t)return!1;for(var r=!1,a=0;a<t.length;a++)if(t[a]===e){r=!0;break}return r}(t,this.props.attributes.categories)){var r=t;t=o.a.stringify({category:r},{arrayFormat:"bracket"})}else t=t.replace(/\s/g,"").split(",").filter((function(e){return""!==e})),t=o.a.stringify({url:t},{arrayFormat:"bracket"});this.setState({route:"home",loading:!0}),ee({path:"/feedzy/v1/feed?".concat(t),method:"POST",data:this.props.attributes}).then((function(t){return e.unmounting?t:t.error?(e.setState({route:"home",loading:!1,error:!0}),t):(e.props.setAttributes({feedData:t}),e.setState({route:"fetched",loading:!1}),t)})).fail((function(t){return e.setState({route:"home",loading:!1,error:!0}),t}))}}},{key:"loadCategories",value:function(){var e=this;ee({path:"/wp/v2/feedzy_categories?per_page=100"}).then((function(t){if(e.unmounting)return t;var r=0,a=[];t.forEach((function(e){a[r]=e.slug,r+=1}));var n=e;n.props.setAttributes({categories:a}),jQuery(".feedzy-source input").autocomplete({classes:{"ui-autocomplete":"feedzy-ui-autocomplete"},source:a,minLength:0,select:function(e,t){n.props.setAttributes({feeds:t.item.label})}})})).fail((function(e){return e}))}},{key:"metaExists",value:function(e){return 0<=this.props.attributes.metafields.replace(/\s/g,"").split(",").indexOf(e)||""===this.props.attributes.metafields}},{key:"multipleMetaExists",value:function(e){return 0<=this.props.attributes.multiple_meta.replace(/\s/g,"").split(",").indexOf(e)||""===this.props.attributes.multiple_meta}},{key:"getImageURL",value:function(e,t){var r=e.thumbnail?e.thumbnail:this.props.attributes.default?this.props.attributes.default.url:feedzyjs.imagepath+"feedzy.svg";switch(this.props.attributes.http){case"default":-1===r.indexOf("https")&&0===r.indexOf("http")&&(r=this.props.attributes.default?this.props.attributes.default.url:feedzyjs.imagepath+"feedzy.svg");break;case"https":r=r.replace(/http:/g,"https:")}return t&&(r="url("+r+")"),r}},{key:"onChangeFeed",value:function(e){this.props.setAttributes({feeds:e})}},{key:"onChangeMax",value:function(e){this.props.setAttributes({max:e?Number(e):5})}},{key:"onChangeOffset",value:function(e){this.props.setAttributes({offset:Number(e)})}},{key:"onToggleFeedTitle",value:function(e){this.props.setAttributes({feed_title:!this.props.attributes.feed_title})}},{key:"onRefresh",value:function(e){this.props.setAttributes({refresh:e})}},{key:"onSort",value:function(e){this.props.setAttributes({sort:e})}},{key:"onTarget",value:function(e){this.props.setAttributes({target:e})}},{key:"onTitle",value:function(e){""!==e&&(e=Number(e))<0&&(e=0),this.props.setAttributes({title:e})}},{key:"onChangeMeta",value:function(e){this.props.setAttributes({metafields:e})}},{key:"onChangeMultipleMeta",value:function(e){this.props.setAttributes({multiple_meta:e})}},{key:"onToggleSummary",value:function(e){this.props.setAttributes({summary:!this.props.attributes.summary})}},{key:"onToggleLazy",value:function(e){this.props.setAttributes({lazy:!this.props.attributes.lazy})}},{key:"onSummaryLength",value:function(e){this.props.setAttributes({summarylength:Number(e)})}},{key:"onKeywordsTitle",value:function(e){this.props.setAttributes({keywords_title:e})}},{key:"onKeywordsBan",value:function(e){this.props.setAttributes({keywords_ban:e})}},{key:"onThumb",value:function(e){this.props.setAttributes({thumb:e})}},{key:"onDefault",value:function(e){this.props.setAttributes({default:e}),this.setState({route:"reload"})}},{key:"onSize",value:function(e){this.props.setAttributes({size:e?Number(e):150})}},{key:"onHTTP",value:function(e){this.props.setAttributes({http:e}),this.setState({route:"reload"})}},{key:"onReferralURL",value:function(e){this.props.setAttributes({referral_url:e})}},{key:"onColumns",value:function(e){this.props.setAttributes({columns:e})}},{key:"onTemplate",value:function(e){this.props.setAttributes({template:e})}},{key:"onTogglePrice",value:function(e){this.props.setAttributes({price:!this.props.attributes.price})}},{key:"onKeywordsIncludeOn",value:function(e){this.props.setAttributes({keywords_inc_on:e})}},{key:"onKeywordsExcludeOn",value:function(e){this.props.setAttributes({keywords_exc_on:e})}},{key:"onFromDateTime",value:function(e){this.props.setAttributes({from_datetime:e})}},{key:"onToDateTime",value:function(e){this.props.setAttributes({to_datetime:e})}},{key:"feedzyCategoriesList",value:function(e){jQuery(".feedzy-source input").autocomplete("search","")}},{key:"getValidateURL",value:function(){var e="https://validator.w3.org/feed/";return this.props.attributes.feeds&&(e+="check.cgi?url="+this.props.attributes.feeds),e}},{key:"onToggleItemTitle",value:function(e){this.props.setAttributes({itemTitle:!this.props.attributes.itemTitle})}},{key:"render",value:function(){var e,t,r,a,n,o,s,i,l,p,u=this;return["fetched"===this.state.route&&wp.element.createElement(I,K({edit:this,state:this.state},this.props)),"home"===this.state.route&&wp.element.createElement("div",{className:this.props.className},wp.element.createElement(oe,{key:"placeholder",icon:"rss",label:G("Feedzy RSS Feeds")},this.state.loading?wp.element.createElement("div",{key:"loading",className:"wp-block-embed is-loading"},wp.element.createElement(le,null),wp.element.createElement("p",null,G("Fetching..."))):[wp.element.createElement("div",{className:"feedzy-source-wrap"},wp.element.createElement(se,{type:"url",className:"feedzy-source",placeholder:G("Enter URL or category of your feed here..."),onChange:this.onChangeFeed,value:this.props.attributes.feeds}),wp.element.createElement("span",{className:"dashicons dashicons-arrow-down-alt2",onClick:this.feedzyCategoriesList})),wp.element.createElement(ie,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.loadFeed},G("Load Feed")),wp.element.createElement(ne,{href:this.getValidateURL(),title:G("Validate Feed ")},G("Validate ")),this.state.error&&wp.element.createElement("div",null,G("Feed URL is invalid. Invalid feeds will NOT display items.")),wp.element.createElement("p",null,G("Enter the full URL of the feed source you wish to display here, or the name of a category you've created. Also you can add multiple URLs just separate them with a comma. You can manage your categories feed from")," ",wp.element.createElement("a",{href:"edit.php?post_type=feedzy_categories",title:G("feedzy categories "),target:"_blank"},G("here ")))])),!("fetched"!==this.state.route||void 0===this.props.attributes.feedData)&&wp.element.createElement("div",{className:"feedzy-rss"},this.props.attributes.feed_title&&null!==this.props.attributes.feedData.channel&&wp.element.createElement("div",{className:"rss_header"},wp.element.createElement("h2",null,wp.element.createElement("a",{className:"rss_title"},U(this.props.attributes.feedData.channel.title)),wp.element.createElement("span",{className:"rss_description"}," "+U(this.props.attributes.feedData.channel.description)))),wp.element.createElement("ul",{className:"feedzy-".concat(this.props.attributes.template)},(e=this.props.attributes.feedData.items,t=this.props.attributes.sort,r=M(this.props.attributes.keywords_title),a=M(this.props.attributes.keywords_ban),n=this.props.attributes.max,o=this.props.attributes.offset,s=this.props.attributes.keywords_inc_on,i=this.props.attributes.keywords_exc_on,l=this.props.attributes.from_datetime,p=this.props.attributes.to_datetime,s="author"===s?"creator":s,i="author"===i?"creator":i,l=""!==l&&void 0!==l&&moment(l).format("X"),p=""!==p&&void 0!==p&&moment(p).format("X"),e=Array.from(e).sort((function(e,r){var a,n;return"date_desc"===t||"date_asc"===t?(a=e.pubDate,n=r.pubDate):"title_desc"!==t&&"title_asc"!==t||(a=e.title.toUpperCase(),n=r.title.toUpperCase()),a<n?"date_desc"===t||"title_desc"===t?1:-1:a>n?"date_desc"===t||"title_desc"===t?-1:1:0})).filter((function(e){return!r||r.test(e[s])})).filter((function(e){return!a||!a.test(e[i])})).filter((function(e){var t=e.date+" "+e.time;return t=moment(new Date(t)).format("X"),!l||!p||l<=t&&t<=p})).slice(o,n+o)).map((function(e,t){var r=(e.date||"")+" "+(e.time||"")+" UTC +0000",a=U(e.date)||"",n=U(e.time)||"",o=U(e.categories)||"";if(u.metaExists("tz=local")){var s=new Date(r);s=s.toUTCString(),a=moment.utc(s).format("MMMM D, YYYY"),n=moment.utc(s).format("h:mm A")}var i=e.creator&&u.metaExists("author")?e.creator:"";""!==u.props.attributes.multiple_meta&&"no"!==u.props.attributes.multiple_meta&&((u.multipleMetaExists("source")||u.multipleMetaExists("yes"))&&""!==i&&""!==e.source?i=i+" ("+e.source+")":(u.multipleMetaExists("source")||u.multipleMetaExists("yes"))&&""!==e.source&&(i=e.source)),""===e.thumbnail&&"auto"===u.props.attributes.thumb&&(e.thumbnail=e.default_img);var l=new Object;return l.author=G("by")+" "+i,l.date=G("on")+" "+U(a),l.time=G("at")+" "+U(n),l.categories=G("in")+" "+U(o),wp.element.createElement("li",{key:t,style:{padding:"15px 0 25px"},className:"rss_item feedzy-rss-col-".concat(u.props.attributes.columns)},(e.thumbnail&&"auto"===u.props.attributes.thumb||"yes"===u.props.attributes.thumb)&&wp.element.createElement("div",{className:"rss_image",style:{width:u.props.attributes.size+"px",height:u.props.attributes.size+"px"}},wp.element.createElement("a",{title:U(e.title),style:{width:u.props.attributes.size+"px",height:u.props.attributes.size+"px"}},wp.element.createElement("span",{className:"fetched",style:{width:u.props.attributes.size+"px",height:u.props.attributes.size+"px",backgroundImage:u.getImageURL(e,!0)},title:U(e.title)}))),wp.element.createElement("div",{className:"rss_content_wrap"},u.props.attributes.itemTitle&&0!==u.props.attributes.title?wp.element.createElement("span",{className:"title"},wp.element.createElement("a",null,u.props.attributes.title&&U(e.title).length>u.props.attributes.title?U(e.title).substring(0,u.props.attributes.title)+"...":U(e.title))):"",wp.element.createElement("div",{className:"rss_content"},"no"!==u.props.attributes.metafields&&wp.element.createElement("small",{className:"meta"},function(e,t){var r="";""===t&&(t="author, date, time");for(var a=t.replace(/\s/g,"").split(","),n=0;n<a.length;n++)void 0!==e[a[n]]&&(r=r+" "+e[a[n]]);return r}(l,u.props.attributes.metafields)),u.props.attributes.summary&&wp.element.createElement("p",{className:"description"},u.props.attributes.summarylength&&U(e.description).length>u.props.attributes.summarylength?U(e.description).substring(0,u.props.attributes.summarylength)+" [...]":U(e.description)),feedzyjs.isPro&&e.media&&e.media.src&&wp.element.createElement("audio",{controls:!0,controlsList:"nodownload"},wp.element.createElement("source",{src:e.media.src,type:e.media.type}),G("Your browser does not support the audio element. But you can check this for the original link: "),wp.element.createElement("a",{href:e.media.src},e.media.src)),feedzyjs.isPro&&u.props.attributes.price&&e.price&&"default"!==u.props.attributes.template&&wp.element.createElement("div",{className:"price-wrap"},wp.element.createElement("a",null,wp.element.createElement("button",{className:"price"},e.price))))))}))))]}}])&&V(t.prototype,r),a&&V(t,a),l}(re)),ue=wp.i18n.__,ce=wp.blocks.registerBlockType;t.default=ce("feedzy-rss-feeds/feedzy-block",{title:ue("Feedzy RSS Feeds"),category:"common",icon:"rss",keywords:[ue("Feedzy RSS Feeds"),ue("RSS"),ue("Feeds")],supports:{html:!1},attributes:a,edit:pe,save:function(){return null}})}});
|
3 |
Copyright (c) 2018 Jed Watson.
|
4 |
Licensed under the MIT License (MIT), see
|
5 |
http://jedwatson.github.io/classnames
|
6 |
+
*/!function(){"use strict";var r={}.hasOwnProperty;function n(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var o=typeof a;if("string"===o||"number"===o)e.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&e.push(s)}}else if("object"===o)if(a.toString===Object.prototype.toString)for(var i in a)r.call(a,i)&&a[i]&&e.push(i);else e.push(a.toString())}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):void 0===(a=function(){return n}.apply(t,[]))||(e.exports=a)}()},228:function(e,t,r){"use strict";r.r(t);var a={feeds:{type:"string"},max:{type:"number",default:5},offset:{type:"number",default:0},feed_title:{type:"boolean",default:!0},refresh:{type:"string",default:"12_hours"},sort:{type:"string",default:"default"},target:{type:"string",default:"_blank"},title:{type:"number"},meta:{type:"boolean",default:!0},lazy:{type:"boolean",default:!1},metafields:{type:"string",default:""},multiple_meta:{type:"string",default:""},summary:{type:"boolean",default:!0},summarylength:{type:"number"},keywords_title:{type:"string"},keywords_inc_on:{type:"string",default:"title"},keywords_ban:{type:"string"},keywords_exc_on:{type:"string",default:"title"},thumb:{type:"string",default:"auto"},default:{type:"object"},size:{type:"number",default:150},http:{type:"string"},referral_url:{type:"string"},columns:{type:"number",default:1},template:{type:"string",default:"default"},price:{type:"boolean",default:!0},route:{type:"string",default:"home"},feedData:{type:"object"},categories:{type:"object"},from_datetime:{type:"string"},to_datetime:{type:"string"},itemTitle:{type:"boolean",default:!0}},n=r(105),o=r.n(n),s=lodash.isEmpty,i=wp.components.BaseControl;var l=(0,wp.compose.withInstanceId)((function(e){var t=e.label,r=e.selected,a=e.help,n=e.instanceId,o=e.onChange,l=e.disabled,p=e.options,u=void 0===p?[]:p,c="inspector-radio-image-control-".concat(n),m=function(e){return o(e.target.value)};return!s(u)&&wp.element.createElement(i,{label:t,id:c,help:a,className:"components-radio-image-control feedzy-template"},wp.element.createElement("div",{className:"components-radio-image-control__container"},u.map((function(e,t){return wp.element.createElement("div",{key:"".concat(c,"-").concat(t),className:"components-radio-image-control__option"},wp.element.createElement("input",{id:"".concat(c,"-").concat(t),className:"components-radio-image-control__input",type:"radio",name:c,value:e.value,onChange:m,checked:e.value===r,"aria-describedby":a?"".concat(c,"__help"):void 0,disabled:l}),wp.element.createElement("label",{htmlFor:"".concat(c,"-").concat(t),title:e.label},wp.element.createElement("img",{src:e.src}),wp.element.createElement("span",{class:"image-clickable"})),wp.element.createElement("span",null,e.label))}))))})),p=r(20),u=r.n(p);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=b(e);if(t){var n=b(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return y(this,r)}}function y(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=wp.i18n.__,w=wp.hooks.applyFilters,v=wp.blockEditor||wp.editor,E=v.InspectorControls,k=v.MediaUpload,z=wp.element,T=z.Component,C=z.Fragment,x=wp.components,N=x.BaseControl,O=x.ExternalLink,S=x.PanelBody,j=x.RangeControl,F=x.TextControl,R=x.Button,P=x.ToggleControl,A=x.SelectControl,L=x.ResponsiveWrapper,D=x.Dashicon,I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(o,e);var t,r,a,n=h(o);function o(){var e;return m(this,o),(e=n.apply(this,arguments)).state={tab:"content"},e}return t=o,(r=[{key:"render",value:function(){var e=this,t="",r=w("feedzy_widget_refresh_feed",[{label:g("1 Hour"),value:"1_hours"},{label:g("2 Hours"),value:"3_hours"},{label:g("12 Hours"),value:"12_hours"},{label:g("1 Day"),value:"1_days"},{label:g("3 Days"),value:"3_days"},{label:g("15 Days"),value:"15_days"}]);return"https"===this.props.attributes.http&&(t+=g("Please verify that the images exist on HTTPS.")),wp.element.createElement(C,null,wp.element.createElement(E,{key:"inspector"},wp.element.createElement(S,{className:"fz-section-header-panel"},wp.element.createElement(R,{className:u()("header-tab",{"is-selected":"content"===this.state.tab}),onClick:function(){return e.setState({tab:"content"})}},wp.element.createElement("span",null,wp.element.createElement(D,{icon:"editor-table"}),g("Content"))),wp.element.createElement(R,{className:u()("header-tab",{"is-selected":"style"===this.state.tab}),onClick:function(){return e.setState({tab:"style"})}},wp.element.createElement("span",null,wp.element.createElement(D,{icon:"admin-customizer"}),g("Style"))),wp.element.createElement(R,{className:u()("header-tab",{"is-selected":"advanced"===this.state.tab}),onClick:function(){return e.setState({tab:"advanced"})}},wp.element.createElement("span",null,wp.element.createElement(D,{icon:"admin-generic"}),g("Advanced")))),"content"===this.state.tab&&wp.element.createElement(C,null,wp.element.createElement(S,{title:g("Feed Source"),initialOpen:!0},0!==this.props.attributes.status&&[wp.element.createElement(F,{label:g("Feed Source"),className:"feedzy-source",value:this.props.attributes.feeds,onChange:this.props.edit.onChangeFeed}),wp.element.createElement(R,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.props.edit.loadFeed,className:"loadFeed"},g("Load Feed"))],"fetched"===this.props.state.route&&[wp.element.createElement(j,{label:g("Number of Items"),value:Number(this.props.attributes.max)||5,onChange:this.props.edit.onChangeMax,min:1,max:this.props.attributes.feedData.items.length||10,beforeIcon:"sort",className:"feedzy-max"}),wp.element.createElement(A,{label:g("Sorting Order"),value:this.props.attributes.sort,options:[{label:g("Default"),value:"default"},{label:g("Date Descending"),value:"date_desc"},{label:g("Date Ascending"),value:"date_asc"},{label:g("Title Descending"),value:"title_desc"},{label:g("Title Ascending"),value:"title_asc"}],onChange:this.props.edit.onSort,className:"feedzy-sort"}),wp.element.createElement(A,{label:g("Feed Caching Time"),value:this.props.attributes.refresh,options:r,onChange:this.props.edit.onRefresh,className:"feedzy-refresh"})]),wp.element.createElement(S,{title:g("Item Options"),initialOpen:!1,className:"feedzy-item-options"},wp.element.createElement(A,{label:g("Open Links In"),value:this.props.attributes.target,options:[{label:g("New Tab"),value:"_blank"},{label:g("Same Tab"),value:"_self"}],onChange:this.props.edit.onTarget}),wp.element.createElement(P,{label:g("Display item Title"),checked:!!this.props.attributes.itemTitle,onChange:this.props.edit.onToggleItemTitle,className:"feedzy-summary"}),this.props.attributes.itemTitle&&wp.element.createElement(F,{label:g("Title Character Limit"),help:g("Leave empty to show full title. A value of 0 will remove the title."),type:"number",value:this.props.attributes.title,onChange:this.props.edit.onTitle,className:"feedzy-title-length"}),wp.element.createElement(P,{label:g("Display post description?"),checked:!!this.props.attributes.summary,onChange:this.props.edit.onToggleSummary,className:"feedzy-summary"}),this.props.attributes.summary&&wp.element.createElement(F,{label:g("Description Character Limit"),help:g("Leave empty to show full description."),type:"number",value:this.props.attributes.summarylength,onChange:this.props.edit.onSummaryLength,className:"feedzy-summary-length",min:0})),wp.element.createElement(S,{title:[g("Filter items"),!feedzyjs.isPro&&wp.element.createElement("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,className:feedzyjs.isPro?"feedzy-item-filter":"feedzy-item-filter fz-locked"},!feedzyjs.isPro&&wp.element.createElement("div",{className:"fz-upsell-notice"},g("Unlock this feature and more advanced options with")," ",wp.element.createElement(O,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=blockeditor&utm_campaign=keywordsfilter&utm_content=feedzy-rss-feeds"},g("Feedzy Pro"))),wp.element.createElement(F,{label:g("Only display if selected field contains:"),help:g("Use comma(,) and plus(+) keyword"),value:this.props.attributes.keywords_title,onChange:this.props.edit.onKeywordsTitle,className:"feedzy-include"}),wp.element.createElement(A,{label:g("Select a field if you want to inc keyword."),value:this.props.attributes.keywords_inc_on,options:[{label:g("Title"),value:"title"},{label:g("Author"),value:"author"},{label:g("Description"),value:"description"}],onChange:this.props.edit.onKeywordsIncludeOn}),wp.element.createElement(F,{label:g("Exclude if selected field contains:"),help:g("Use comma(,) and plus(+) keyword"),value:this.props.attributes.keywords_ban,onChange:this.props.edit.onKeywordsBan,className:"feedzy-ban"}),wp.element.createElement(A,{label:g("Select a field if you want to exc keyword."),value:this.props.attributes.keywords_exc_on,options:[{label:g("Title"),value:"title"},{label:g("Author"),value:"author"},{label:g("Description"),value:"description"}],onChange:this.props.edit.onKeywordsExcludeOn}),wp.element.createElement("p",{className:"fz-main-label"},g("Filter feed item by date range.")),wp.element.createElement(F,{type:"datetime-local",label:g("From:"),value:this.props.attributes.from_datetime,onChange:this.props.edit.onFromDateTime}),wp.element.createElement(F,{type:"datetime-local",label:g("To:"),value:this.props.attributes.to_datetime,onChange:this.props.edit.onToDateTime}))),"fetched"===this.props.state.route&&"style"===this.state.tab&&[wp.element.createElement(C,null,wp.element.createElement(S,{title:g("Item Image Options"),initialOpen:!1,className:"feedzy-image-options"},wp.element.createElement(A,{label:g("Display first image if available?"),value:this.props.attributes.thumb,options:[{label:g("Yes (without a fallback image)"),value:"auto"},{label:g("Yes (with a fallback image)"),value:"yes"},{label:g("No"),value:"no"}],onChange:this.props.edit.onThumb,className:"feedzy-thumb"}),"no"!==this.props.attributes.thumb&&["auto"!==this.props.attributes.thumb&&wp.element.createElement("div",{className:"feedzy-blocks-base-control"},wp.element.createElement("label",{className:"blocks-base-control__label",for:"inspector-media-upload"},g("Fallback image if no image is found.")),wp.element.createElement(k,{type:"image",id:"inspector-media-upload",value:this.props.attributes.default,onSelect:this.props.edit.onDefault,render:function(t){var r=t.open;return[void 0!==e.props.attributes.default&&[wp.element.createElement(L,{naturalWidth:e.props.attributes.default.width,naturalHeight:e.props.attributes.default.height},wp.element.createElement("img",{src:e.props.attributes.default.url,alt:g("Featured image")})),wp.element.createElement(R,{isLarge:!0,isSecondary:!0,onClick:function(){return e.props.setAttributes({default:void 0})},style:{marginTop:"10px"}},g("Remove Image"))],wp.element.createElement(R,{isLarge:!0,isPrimary:!0,onClick:r,style:{marginTop:"10px"},className:void 0===e.props.attributes.default&&"feedzy_image_upload"},g("Upload Image"))]}})),wp.element.createElement(F,{label:g("Thumbnails dimension."),type:"number",value:this.props.attributes.size,onChange:this.props.edit.onSize}),wp.element.createElement(A,{label:g("How should we treat HTTP images?"),value:this.props.attributes.http,options:[{label:g("Show with HTTP link"),value:"auto"},{label:g("Force HTTPS"),value:"https"},{label:g("Ignore and show the default image instead"),value:"default"}],onChange:this.props.edit.onHTTP,className:"feedzy-http",help:t})]),wp.element.createElement(S,{title:[g("Feed Layout"),!feedzyjs.isPro&&wp.element.createElement("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,className:feedzyjs.isPro?"feedzy-layout":"feedzy-layout fz-locked"},!feedzyjs.isPro&&wp.element.createElement("div",{className:"fz-upsell-notice"},g("Unlock this feature and more advanced options with")," ",wp.element.createElement(O,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=blockeditor&utm_campaign=layouts&utm_content=feedzy-rss-feeds"},g("Feedzy Pro"))),wp.element.createElement(j,{label:g("Columns"),help:g("How many columns we should use to display the feed items?"),value:this.props.attributes.columns||1,onChange:this.props.edit.onColumns,min:1,max:6,beforeIcon:"sort",allowReset:!0}),wp.element.createElement(l,{label:g("Template"),selected:this.props.attributes.template,options:[{label:g("Default"),src:feedzyjs.imagepath+"feedzy-default-template.png",value:"default"},{label:g("Round"),src:feedzyjs.imagepath+"feedzy-style1-template.png",value:"style1"},{label:g("Cards"),src:feedzyjs.imagepath+"feedzy-style2-template.png",value:"style2"}],onChange:this.props.edit.onTemplate})))],"fetched"===this.props.state.route&&"advanced"===this.state.tab&&[wp.element.createElement(C,null,wp.element.createElement(S,{title:g("Feed Items Custom Options"),className:"feedzy-advanced-options",initialOpen:!1},wp.element.createElement(N,null,wp.element.createElement(F,{label:feedzyjs.isPro?g("Should we display additional meta fields out of author, date, time or categories? (comma-separated list, in order of display)."):g("Should we display additional meta fields out of author, date or time? (comma-separated list, in order of display)."),help:g('Leave empty to display all and "no" to display nothing.'),placeholder:feedzyjs.isPro?g("(eg: author, date, time, tz=local, categories)"):g("(eg: author, date, time, tz=local)"),value:this.props.attributes.metafields,onChange:this.props.edit.onChangeMeta,className:"feedzy-meta"}),wp.element.createElement(F,{label:g("When using multiple sources, should we display additional meta fields? - source (comma-separated list)."),placeholder:g("(eg: source)"),value:this.props.attributes.multiple_meta,onChange:this.props.edit.onChangeMultipleMeta,className:"feedzy-multiple-meta"}),wp.element.createElement(O,{href:"https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed"},g("You can find more info about available meta field values here."))),wp.element.createElement(P,{label:g("Display price if available?"),help:this.props.attributes.price&&"default"===this.props.attributes.template?g("Choose a different template for this to work."):null,checked:!!this.props.attributes.price,onChange:this.props.edit.onTogglePrice,className:feedzyjs.isPro?"feedzy-pro-price":"feedzy-pro-price fz-locked"}),null!==this.props.attributes.feedData.channel&&wp.element.createElement(P,{label:g("Display feed title?"),checked:!!this.props.attributes.feed_title,onChange:this.props.edit.onToggleFeedTitle,className:"feedzy-title"}),wp.element.createElement(j,{label:g("Ignore first N items"),value:Number(this.props.attributes.offset)||0,onChange:this.props.edit.onChangeOffset,min:0,max:this.props.attributes.feedData.items.length,beforeIcon:"sort",className:"feedzy-offset"}),wp.element.createElement(P,{label:g("Lazy load feed?"),checked:!!this.props.attributes.lazy,onChange:this.props.edit.onToggleLazy,className:"feedzy-lazy",help:g("Only on the front end.")})),wp.element.createElement(S,{title:[g("Referral URL"),!feedzyjs.isPro&&wp.element.createElement("span",{className:"fz-pro-label"},"Pro")],initialOpen:!1,className:feedzyjs.isPro?"feedzy-pro-options":"feedzy-pro-options fz-locked"},!feedzyjs.isPro&&wp.element.createElement("div",{className:"fz-upsell-notice"},g("Unlock this feature and more advanced options with")," ",wp.element.createElement(O,{href:"https://themeisle.com/plugins/feedzy-rss-feeds/upgrade/?utm_source=wpadmin&utm_medium=blockeditor&utm_campaign=refferal&utm_content=feedzy-rss-feeds"},g("Feedzy Pro"))),wp.element.createElement(F,{label:g("Referral URL parameters."),help:g('Without ("?")'),placeholder:_("(eg. promo_code=feedzy_is_awesome)"),value:this.props.attributes.referral_url,onChange:this.props.edit.onReferralURL})))]))}}])&&d(t.prototype,r),a&&d(t,a),o}(T),U=function(e){var t=document.createElement("div");return t.innerHTML=e,void 0!==t.innerText?t.innerText:t.textContent},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t="",r=[];return""!==e&&e.replace(/[^a-zA-Z]/g,"").length<=500&&(e.split(",").forEach((function(e){""!==(e=e.trim())&&(e=e.split("+").map((function(e){return"(?=.*"+(e=e.trim())+")"})),r.push(e.join("")))})),t="^"+(t=r.join("|"))+".*$",t=new RegExp(t,"i")),t};function B(e){return(B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(){return(K=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function H(e,t,r,a,n,o,s){try{var i=e[o](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(a,n)}function $(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var o=e.apply(t,r);function s(e){H(o,a,n,s,i,"next",e)}function i(e){H(o,a,n,s,i,"throw",e)}s(void 0)}))}}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function W(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,a=Z(e);if(t){var n=Z(this).constructor;r=Reflect.construct(a,arguments,n)}else r=a.apply(this,arguments);return X(this,r)}}function X(e,t){return!t||"object"!==B(t)&&"function"!=typeof t?Q(e):t}function Q(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G=wp.i18n.__,J=wp,ee=(J.apiFetch,J.apiRequest),te=wp.element,re=te.Component,ae=(te.Fragment,wp.components),ne=ae.ExternalLink,oe=ae.Placeholder,se=ae.TextControl,ie=ae.Button,le=ae.Spinner,pe=(wp.date.date,function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&q(e,t)}(l,e);var t,r,a,n,s,i=W(l);function l(){var e;return Y(this,l),(e=i.apply(this,arguments)).loadFeed=e.loadFeed.bind(Q(e)),e.loadCategories=e.loadCategories.bind(Q(e)),e.metaExists=e.metaExists.bind(Q(e)),e.multipleMetaExists=e.multipleMetaExists.bind(Q(e)),e.getImageURL=e.getImageURL.bind(Q(e)),e.getValidateURL=e.getValidateURL.bind(Q(e)),e.onChangeFeed=e.onChangeFeed.bind(Q(e)),e.onChangeMax=e.onChangeMax.bind(Q(e)),e.onChangeOffset=e.onChangeOffset.bind(Q(e)),e.onToggleFeedTitle=e.onToggleFeedTitle.bind(Q(e)),e.onRefresh=e.onRefresh.bind(Q(e)),e.onSort=e.onSort.bind(Q(e)),e.onTarget=e.onTarget.bind(Q(e)),e.onTitle=e.onTitle.bind(Q(e)),e.onChangeMeta=e.onChangeMeta.bind(Q(e)),e.onChangeMultipleMeta=e.onChangeMultipleMeta.bind(Q(e)),e.onToggleSummary=e.onToggleSummary.bind(Q(e)),e.onToggleLazy=e.onToggleLazy.bind(Q(e)),e.onSummaryLength=e.onSummaryLength.bind(Q(e)),e.onKeywordsTitle=e.onKeywordsTitle.bind(Q(e)),e.onKeywordsBan=e.onKeywordsBan.bind(Q(e)),e.onThumb=e.onThumb.bind(Q(e)),e.onDefault=e.onDefault.bind(Q(e)),e.onSize=e.onSize.bind(Q(e)),e.onHTTP=e.onHTTP.bind(Q(e)),e.onReferralURL=e.onReferralURL.bind(Q(e)),e.onColumns=e.onColumns.bind(Q(e)),e.onTemplate=e.onTemplate.bind(Q(e)),e.onTogglePrice=e.onTogglePrice.bind(Q(e)),e.onKeywordsIncludeOn=e.onKeywordsIncludeOn.bind(Q(e)),e.onKeywordsExcludeOn=e.onKeywordsExcludeOn.bind(Q(e)),e.onFromDateTime=e.onFromDateTime.bind(Q(e)),e.onToDateTime=e.onToDateTime.bind(Q(e)),e.feedzyCategoriesList=e.feedzyCategoriesList.bind(Q(e)),e.onToggleItemTitle=e.onToggleItemTitle.bind(Q(e)),e.state={route:e.props.attributes.route,loading:!1,error:!1},e}return t=l,(r=[{key:"componentDidMount",value:(s=$(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.loadFeed(),void 0===this.props.attributes.categories&&(this.props.attributes.meta||this.props.setAttributes({meta:!0,metafields:"no"}),setTimeout((function(){t.loadCategories()})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"componentDidUpdate",value:(n=$(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"reload"===this.state.route&&this.loadFeed();case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"loadFeed",value:function(){var e=this,t=this.props.attributes.feeds;if(void 0!==t){if(function(e,t){if(void 0===t)return!1;for(var r=!1,a=0;a<t.length;a++)if(t[a]===e){r=!0;break}return r}(t,this.props.attributes.categories)){var r=t;t=o.a.stringify({category:r},{arrayFormat:"bracket"})}else t=t.replace(/\s/g,"").split(",").filter((function(e){return""!==e})),t=o.a.stringify({url:t},{arrayFormat:"bracket"});this.setState({route:"home",loading:!0}),ee({path:"/feedzy/v1/feed?".concat(t),method:"POST",data:this.props.attributes}).then((function(t){return e.unmounting?t:t.error?(e.setState({route:"home",loading:!1,error:!0}),t):(e.props.setAttributes({feedData:t}),e.setState({route:"fetched",loading:!1}),t)})).fail((function(t){return e.setState({route:"home",loading:!1,error:!0}),t}))}}},{key:"loadCategories",value:function(){var e=this;ee({path:"/wp/v2/feedzy_categories?per_page=100"}).then((function(t){if(e.unmounting)return t;var r=0,a=[];t.forEach((function(e){a[r]=e.slug,r+=1}));var n=e;n.props.setAttributes({categories:a}),jQuery(".feedzy-source input").autocomplete({classes:{"ui-autocomplete":"feedzy-ui-autocomplete"},source:a,minLength:0,select:function(e,t){n.props.setAttributes({feeds:t.item.label})}})})).fail((function(e){return e}))}},{key:"metaExists",value:function(e){return 0<=this.props.attributes.metafields.replace(/\s/g,"").split(",").indexOf(e)||""===this.props.attributes.metafields}},{key:"multipleMetaExists",value:function(e){return 0<=this.props.attributes.multiple_meta.replace(/\s/g,"").split(",").indexOf(e)||""===this.props.attributes.multiple_meta}},{key:"getImageURL",value:function(e,t){var r=e.thumbnail?e.thumbnail:this.props.attributes.default?this.props.attributes.default.url:feedzyjs.imagepath+"feedzy.svg";switch(this.props.attributes.http){case"default":-1===r.indexOf("https")&&0===r.indexOf("http")&&(r=this.props.attributes.default?this.props.attributes.default.url:feedzyjs.imagepath+"feedzy.svg");break;case"https":r=r.replace(/http:/g,"https:")}return t&&(r="url("+r+")"),r}},{key:"onChangeFeed",value:function(e){this.props.setAttributes({feeds:e})}},{key:"onChangeMax",value:function(e){this.props.setAttributes({max:e?Number(e):5})}},{key:"onChangeOffset",value:function(e){this.props.setAttributes({offset:Number(e)})}},{key:"onToggleFeedTitle",value:function(e){this.props.setAttributes({feed_title:!this.props.attributes.feed_title})}},{key:"onRefresh",value:function(e){this.props.setAttributes({refresh:e})}},{key:"onSort",value:function(e){this.props.setAttributes({sort:e})}},{key:"onTarget",value:function(e){this.props.setAttributes({target:e})}},{key:"onTitle",value:function(e){""!==e&&(e=Number(e))<0&&(e=0),this.props.setAttributes({title:e})}},{key:"onChangeMeta",value:function(e){this.props.setAttributes({metafields:e})}},{key:"onChangeMultipleMeta",value:function(e){this.props.setAttributes({multiple_meta:e})}},{key:"onToggleSummary",value:function(e){this.props.setAttributes({summary:!this.props.attributes.summary})}},{key:"onToggleLazy",value:function(e){this.props.setAttributes({lazy:!this.props.attributes.lazy})}},{key:"onSummaryLength",value:function(e){this.props.setAttributes({summarylength:Number(e)})}},{key:"onKeywordsTitle",value:function(e){this.props.setAttributes({keywords_title:e})}},{key:"onKeywordsBan",value:function(e){this.props.setAttributes({keywords_ban:e})}},{key:"onThumb",value:function(e){this.props.setAttributes({thumb:e})}},{key:"onDefault",value:function(e){this.props.setAttributes({default:e}),this.setState({route:"reload"})}},{key:"onSize",value:function(e){this.props.setAttributes({size:e?Number(e):150})}},{key:"onHTTP",value:function(e){this.props.setAttributes({http:e}),this.setState({route:"reload"})}},{key:"onReferralURL",value:function(e){this.props.setAttributes({referral_url:e})}},{key:"onColumns",value:function(e){this.props.setAttributes({columns:e})}},{key:"onTemplate",value:function(e){this.props.setAttributes({template:e})}},{key:"onTogglePrice",value:function(e){this.props.setAttributes({price:!this.props.attributes.price})}},{key:"onKeywordsIncludeOn",value:function(e){this.props.setAttributes({keywords_inc_on:e})}},{key:"onKeywordsExcludeOn",value:function(e){this.props.setAttributes({keywords_exc_on:e})}},{key:"onFromDateTime",value:function(e){this.props.setAttributes({from_datetime:e})}},{key:"onToDateTime",value:function(e){this.props.setAttributes({to_datetime:e})}},{key:"feedzyCategoriesList",value:function(e){jQuery(".feedzy-source input").autocomplete("search","")}},{key:"getValidateURL",value:function(){var e="https://validator.w3.org/feed/";return this.props.attributes.feeds&&(e+="check.cgi?url="+this.props.attributes.feeds),e}},{key:"onToggleItemTitle",value:function(e){this.props.setAttributes({itemTitle:!this.props.attributes.itemTitle})}},{key:"render",value:function(){var e,t,r,a,n,o,s,i,l,p,u=this;return["fetched"===this.state.route&&wp.element.createElement(I,K({edit:this,state:this.state},this.props)),"home"===this.state.route&&wp.element.createElement("div",{className:this.props.className},wp.element.createElement(oe,{key:"placeholder",icon:"rss",label:G("Feedzy RSS Feeds")},this.state.loading?wp.element.createElement("div",{key:"loading",className:"wp-block-embed is-loading"},wp.element.createElement(le,null),wp.element.createElement("p",null,G("Fetching..."))):[wp.element.createElement("div",{className:"feedzy-source-wrap"},wp.element.createElement(se,{type:"url",className:"feedzy-source",placeholder:G("Enter URL or category of your feed here..."),onChange:this.onChangeFeed,value:this.props.attributes.feeds}),wp.element.createElement("span",{className:"dashicons dashicons-arrow-down-alt2",onClick:this.feedzyCategoriesList})),wp.element.createElement(ie,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.loadFeed},G("Load Feed")),wp.element.createElement(ne,{href:this.getValidateURL(),title:G("Validate Feed ")},G("Validate ")),this.state.error&&wp.element.createElement("div",null,G("Feed URL is invalid. Invalid feeds will NOT display items.")),wp.element.createElement("p",null,G("Enter the full URL of the feed source you wish to display here, or the name of a category you've created. Also you can add multiple URLs just separate them with a comma. You can manage your categories feed from")," ",wp.element.createElement("a",{href:"edit.php?post_type=feedzy_categories",title:G("feedzy categories "),target:"_blank"},G("here ")))])),!("fetched"!==this.state.route||void 0===this.props.attributes.feedData)&&wp.element.createElement("div",{className:"feedzy-rss"},this.props.attributes.feed_title&&null!==this.props.attributes.feedData.channel&&wp.element.createElement("div",{className:"rss_header"},wp.element.createElement("h2",null,wp.element.createElement("a",{className:"rss_title"},U(this.props.attributes.feedData.channel.title)),wp.element.createElement("span",{className:"rss_description"}," "+U(this.props.attributes.feedData.channel.description)))),wp.element.createElement("ul",{className:"feedzy-".concat(this.props.attributes.template)},(e=this.props.attributes.feedData.items,t=this.props.attributes.sort,r=M(this.props.attributes.keywords_title),a=M(this.props.attributes.keywords_ban),n=this.props.attributes.max,o=this.props.attributes.offset,s=this.props.attributes.keywords_inc_on,i=this.props.attributes.keywords_exc_on,l=this.props.attributes.from_datetime,p=this.props.attributes.to_datetime,s="author"===s?"creator":s,i="author"===i?"creator":i,l=""!==l&&void 0!==l&&moment(l).format("X"),p=""!==p&&void 0!==p&&moment(p).format("X"),e=Array.from(e).sort((function(e,r){var a,n;return"date_desc"===t||"date_asc"===t?(a=e.pubDate,n=r.pubDate):"title_desc"!==t&&"title_asc"!==t||(a=e.title.toUpperCase(),n=r.title.toUpperCase()),a<n?"date_desc"===t||"title_desc"===t?1:-1:a>n?"date_desc"===t||"title_desc"===t?-1:1:0})).filter((function(e){return!r||r.test(e[s])})).filter((function(e){return!a||!a.test(e[i])})).filter((function(e){var t=e.date+" "+e.time;return t=moment(new Date(t)).format("X"),!l||!p||l<=t&&t<=p})).slice(o,n+o)).map((function(e,t){var r=(e.date||"")+" "+(e.time||"")+" UTC +0000",a=U(e.date)||"",n=U(e.time)||"",o=U(e.categories)||"";if(u.metaExists("tz=local")){var s=new Date(r);s=s.toUTCString(),a=moment.utc(s).format("MMMM D, YYYY"),n=moment.utc(s).format("h:mm A")}var i=e.creator&&u.metaExists("author")?e.creator:"";""!==u.props.attributes.multiple_meta&&"no"!==u.props.attributes.multiple_meta&&((u.multipleMetaExists("source")||u.multipleMetaExists("yes"))&&""!==i&&""!==e.source?i=i+" ("+e.source+")":(u.multipleMetaExists("source")||u.multipleMetaExists("yes"))&&""!==e.source&&(i=e.source)),""===e.thumbnail&&"auto"===u.props.attributes.thumb&&(e.thumbnail=e.default_img);var l=new Object;return l.author=G("by")+" "+i,l.date=G("on")+" "+U(a),l.time=G("at")+" "+U(n),l.categories=G("in")+" "+U(o),wp.element.createElement("li",{key:t,style:{padding:"15px 0 25px"},className:"rss_item feedzy-rss-col-".concat(u.props.attributes.columns)},(e.thumbnail&&"auto"===u.props.attributes.thumb||"yes"===u.props.attributes.thumb)&&wp.element.createElement("div",{className:"rss_image",style:{width:u.props.attributes.size+"px",height:u.props.attributes.size+"px"}},wp.element.createElement("a",{title:U(e.title),style:{width:u.props.attributes.size+"px",height:u.props.attributes.size+"px"}},wp.element.createElement("span",{className:"fetched",style:{width:u.props.attributes.size+"px",height:u.props.attributes.size+"px",backgroundImage:u.getImageURL(e,!0)},title:U(e.title)}))),wp.element.createElement("div",{className:"rss_content_wrap"},u.props.attributes.itemTitle&&0!==u.props.attributes.title?wp.element.createElement("span",{className:"title"},wp.element.createElement("a",null,u.props.attributes.title&&U(e.title).length>u.props.attributes.title?U(e.title).substring(0,u.props.attributes.title)+"...":U(e.title))):"",wp.element.createElement("div",{className:"rss_content"},"no"!==u.props.attributes.metafields&&wp.element.createElement("small",{className:"meta"},function(e,t){var r="";""===t&&(t="author, date, time");for(var a=t.replace(/\s/g,"").split(","),n=0;n<a.length;n++)void 0!==e[a[n]]&&(r=r+" "+e[a[n]]);return r}(l,u.props.attributes.metafields)),u.props.attributes.summary&&wp.element.createElement("p",{className:"description"},u.props.attributes.summarylength&&U(e.description).length>u.props.attributes.summarylength?U(e.description).substring(0,u.props.attributes.summarylength)+" [...]":U(e.description)),feedzyjs.isPro&&e.media&&e.media.src&&wp.element.createElement("audio",{controls:!0,controlsList:"nodownload"},wp.element.createElement("source",{src:e.media.src,type:e.media.type}),G("Your browser does not support the audio element. But you can check this for the original link: "),wp.element.createElement("a",{href:e.media.src},e.media.src)),feedzyjs.isPro&&u.props.attributes.price&&e.price&&"default"!==u.props.attributes.template&&wp.element.createElement("div",{className:"price-wrap"},wp.element.createElement("a",null,wp.element.createElement("button",{className:"price"},e.price))))))}))))]}}])&&V(t.prototype,r),a&&V(t,a),l}(re)),ue=wp.i18n.__,ce=wp.blocks.registerBlockType;t.default=ce("feedzy-rss-feeds/feedzy-block",{title:ue("Feedzy RSS Feeds"),category:"common",icon:"rss",keywords:[ue("Feedzy RSS Feeds"),ue("RSS"),ue("Feeds")],supports:{html:!1},attributes:a,edit:pe,save:function(){return null}})}});
|
includes/layouts/feedzy-pro.php
CHANGED
@@ -144,7 +144,7 @@
|
|
144 |
</div>
|
145 |
|
146 |
<div class="cta">
|
147 |
-
<a href="<?php echo
|
148 |
all Premium features</a>
|
149 |
</div>
|
150 |
</div>
|
144 |
</div>
|
145 |
|
146 |
<div class="cta">
|
147 |
+
<a href="<?php echo tsdk_utmify(FEEDZY_UPSELL_LINK,'viewall','freevspro') ; ?>" class="btn btn-block btn-primary btn-lg" target="_blank">View
|
148 |
all Premium features</a>
|
149 |
</div>
|
150 |
</div>
|
includes/layouts/feedzy-support.php
CHANGED
@@ -93,7 +93,7 @@
|
|
93 |
<div class="feedzy-accordion-item__content">
|
94 |
<h3 class="h3"><?php esc_html_e( 'Need help with Feedzy?', 'feedzy-rss-feeds' ); ?></h3>
|
95 |
<?php if ( ! defined( 'FEEDZY_PRO_VERSION' ) ) : ?>
|
96 |
-
<p><?php echo wp_kses_post( wp_sprintf( __( 'If you didn\'t found an answer in our Knowledge Base, you can always ask for help from our community based forum or <a href="%s" target="_blank">get dedicated support with our premium plans.</a>', 'feedzy-rss-feeds' ),
|
97 |
<a href="https://wordpress.org/support/plugin/feedzy-rss-feeds/" class="btn btn-outline-primary" target="_blank"><?php esc_html_e( 'Community Forum', 'feedzy-rss-feeds' ); ?></a>
|
98 |
<?php else : ?>
|
99 |
<p><?php echo wp_kses_post( wp_sprintf( __( 'If you didn\'t found an answer in our Knowledge Base, our dedicated support team standby to help you.', 'feedzy-rss-feeds' ) ) ); ?></p>
|
93 |
<div class="feedzy-accordion-item__content">
|
94 |
<h3 class="h3"><?php esc_html_e( 'Need help with Feedzy?', 'feedzy-rss-feeds' ); ?></h3>
|
95 |
<?php if ( ! defined( 'FEEDZY_PRO_VERSION' ) ) : ?>
|
96 |
+
<p><?php echo wp_kses_post( wp_sprintf( __( 'If you didn\'t found an answer in our Knowledge Base, you can always ask for help from our community based forum or <a href="%s" target="_blank">get dedicated support with our premium plans.</a>', 'feedzy-rss-feeds' ), tsdk_utmify( FEEDZY_UPSELL_LINK, 'dedicatedsupport' ) ) ); ?></p>
|
97 |
<a href="https://wordpress.org/support/plugin/feedzy-rss-feeds/" class="btn btn-outline-primary" target="_blank"><?php esc_html_e( 'Community Forum', 'feedzy-rss-feeds' ); ?></a>
|
98 |
<?php else : ?>
|
99 |
<p><?php echo wp_kses_post( wp_sprintf( __( 'If you didn\'t found an answer in our Knowledge Base, our dedicated support team standby to help you.', 'feedzy-rss-feeds' ) ) ); ?></p>
|
includes/layouts/feedzy-tutorial.php
CHANGED
@@ -82,7 +82,7 @@ $is_pro = feedzy_is_pro();
|
|
82 |
<h3 class="h3">Full text
|
83 |
import<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
84 |
<p>Get full content of posts/articles from your RSS feeds.</p>
|
85 |
-
<a href="https://docs.themeisle.com/article/
|
86 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
87 |
</div>
|
88 |
</li>
|
@@ -91,16 +91,15 @@ $is_pro = feedzy_is_pro();
|
|
91 |
<h3 class="h3">Paraphrase & Translate
|
92 |
Content<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
93 |
<p>Automatically paraphrase or translate content on import.</p>
|
94 |
-
<a href="https://docs.themeisle.com/article/
|
95 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
96 |
</div>
|
97 |
</li>
|
98 |
<li>
|
99 |
<div class="support-box">
|
100 |
-
<h3 class="h3">
|
101 |
-
<p>
|
102 |
-
|
103 |
-
<a href="https://docs.themeisle.com/article/715-feedzy-how-to-add-affiliate-referrals-to-feed-urls"
|
104 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
105 |
</div>
|
106 |
</li>
|
@@ -109,7 +108,7 @@ $is_pro = feedzy_is_pro();
|
|
109 |
<h3 class="h3">Enhanced Elementor
|
110 |
support<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
111 |
<p>Advanced Elementor template builder integration to build content areas directly from feeds.</p>
|
112 |
-
<a href="https://docs.themeisle.com/article/
|
113 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
114 |
</div>
|
115 |
</li>
|
@@ -126,7 +125,7 @@ $is_pro = feedzy_is_pro();
|
|
126 |
</ul>
|
127 |
<?php if ( ! $is_pro ) : ?>
|
128 |
<div class="cta">
|
129 |
-
<a href="<?php echo
|
130 |
features</a>
|
131 |
</div>
|
132 |
<?php endif; ?>
|
82 |
<h3 class="h3">Full text
|
83 |
import<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
84 |
<p>Get full content of posts/articles from your RSS feeds.</p>
|
85 |
+
<a href="https://docs.themeisle.com/article/1389-whats-the-difference-between-feedzy-content-and-full-post-content#full-content"
|
86 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
87 |
</div>
|
88 |
</li>
|
91 |
<h3 class="h3">Paraphrase & Translate
|
92 |
Content<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
93 |
<p>Automatically paraphrase or translate content on import.</p>
|
94 |
+
<a href="https://docs.themeisle.com/article/1691-how-to-use-the-rephrasing-service-in-feedzy"
|
95 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
96 |
</div>
|
97 |
</li>
|
98 |
<li>
|
99 |
<div class="support-box">
|
100 |
+
<h3 class="h3">Spintax Text<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
101 |
+
<p>The Spintax service is very useful for blogs, as it is easily configurable and a time saver.</p>
|
102 |
+
<a href="https://docs.themeisle.com/article/1689-how-to-use-the-spintax-service-in-feedzy"
|
|
|
103 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
104 |
</div>
|
105 |
</li>
|
108 |
<h3 class="h3">Enhanced Elementor
|
109 |
support<?php echo ! $is_pro ? ' <span class="pro-label">PRO</span>' : ''; ?></h3>
|
110 |
<p>Advanced Elementor template builder integration to build content areas directly from feeds.</p>
|
111 |
+
<a href="https://docs.themeisle.com/article/1396-elementor-compatibility-in-feedzy"
|
112 |
class="btn btn-outline-primary" target="blank">Learn more</a>
|
113 |
</div>
|
114 |
</li>
|
125 |
</ul>
|
126 |
<?php if ( ! $is_pro ) : ?>
|
127 |
<div class="cta">
|
128 |
+
<a href="<?php echo tsdk_utmify( FEEDZY_UPSELL_LINK, 'viewall', 'tutorial' ); ?> " class="btn btn-ghost" target="blank">View all Feedzy
|
129 |
features</a>
|
130 |
</div>
|
131 |
<?php endif; ?>
|
includes/views/import-metabox-edit.php
CHANGED
@@ -58,7 +58,7 @@ global $post;
|
|
58 |
</div>
|
59 |
<div class="fz-input-group-right">
|
60 |
<div class="dropdown">
|
61 |
-
<button type="button" class="btn btn-outline-primary dropdown-toggle"
|
62 |
aria-expanded="false">
|
63 |
<?php esc_html_e( 'Use Feed Category', 'feedzy-rss-feeds' ); ?> <span
|
64 |
class="dashicons dashicons-arrow-down-alt2"></span>
|
@@ -250,7 +250,7 @@ global $post;
|
|
250 |
esc_html_e( 'Using magic tags, specify what part(s) of the source should form part of the imported post.', 'feedzy-rss-feeds' );
|
251 |
?>
|
252 |
<?php if ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { ?>
|
253 |
-
<?php echo wp_kses_post( sprintf( __( 'The magic tags that are greyed out and disabled, are unavailable for your current license. Unlock all features, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' .
|
254 |
<?php } ?>
|
255 |
</p>
|
256 |
</div>
|
@@ -367,7 +367,7 @@ global $post;
|
|
367 |
</div>
|
368 |
<div class="fz-input-group-right">
|
369 |
<div class="dropdown">
|
370 |
-
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle"
|
371 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
372 |
</button>
|
373 |
<div class="dropdown-menu dropdown-menu-right">
|
@@ -402,7 +402,7 @@ global $post;
|
|
402 |
</div>
|
403 |
<div class="fz-input-group-right">
|
404 |
<div class="dropdown">
|
405 |
-
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle"
|
406 |
aria-expanded="false">
|
407 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
408 |
</button>
|
@@ -454,7 +454,7 @@ global $post;
|
|
454 |
</div>
|
455 |
<div class="fz-input-group-right">
|
456 |
<div class="dropdown">
|
457 |
-
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle"
|
458 |
aria-expanded="false">
|
459 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
460 |
</button>
|
@@ -468,7 +468,7 @@ global $post;
|
|
468 |
<?php if ( ! feedzy_is_pro() ) : ?>
|
469 |
<div class="upgrade-alert">
|
470 |
<?php
|
471 |
-
echo wp_kses_post( sprintf( __( 'Add more advanced tags, like item price, rating and many more, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank">', '</a><button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>' ) );
|
472 |
?>
|
473 |
</div>
|
474 |
<?php endif; ?>
|
@@ -497,7 +497,7 @@ global $post;
|
|
497 |
</div>
|
498 |
<div class="fz-input-group-right">
|
499 |
<div class="dropdown">
|
500 |
-
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle"
|
501 |
aria-expanded="false">
|
502 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
503 |
</button>
|
@@ -591,7 +591,7 @@ global $post;
|
|
591 |
</div>
|
592 |
<div class="fz-input-group-right">
|
593 |
<div class="dropdown">
|
594 |
-
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle"
|
595 |
aria-expanded="false">
|
596 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
597 |
</button>
|
@@ -605,7 +605,7 @@ global $post;
|
|
605 |
<?php if ( ! feedzy_is_pro() ) : ?>
|
606 |
<div class="upgrade-alert">
|
607 |
<?php
|
608 |
-
echo wp_kses_post( sprintf( __( 'Add more advanced tags, like item price, rating and many more, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . FEEDZY_UPSELL_LINK . '" target="_blank">', '</a><button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>' ) );
|
609 |
?>
|
610 |
</div>
|
611 |
<?php endif; ?>
|
58 |
</div>
|
59 |
<div class="fz-input-group-right">
|
60 |
<div class="dropdown">
|
61 |
+
<button type="button" class="btn btn-outline-primary dropdown-toggle" aria-haspopup="true"
|
62 |
aria-expanded="false">
|
63 |
<?php esc_html_e( 'Use Feed Category', 'feedzy-rss-feeds' ); ?> <span
|
64 |
class="dashicons dashicons-arrow-down-alt2"></span>
|
250 |
esc_html_e( 'Using magic tags, specify what part(s) of the source should form part of the imported post.', 'feedzy-rss-feeds' );
|
251 |
?>
|
252 |
<?php if ( false === apply_filters( 'feedzy_is_license_of_type', false, 'agency' ) ) { ?>
|
253 |
+
<?php echo wp_kses_post( sprintf( __( 'The magic tags that are greyed out and disabled, are unavailable for your current license. Unlock all features, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'magictags' ) . '" target="_blank" title="' . __( 'upgrading to Feedzy Pro', 'feedzy-rss-feeds' ) . '">', '</a>' ) ); ?>
|
254 |
<?php } ?>
|
255 |
</p>
|
256 |
</div>
|
367 |
</div>
|
368 |
<div class="fz-input-group-right">
|
369 |
<div class="dropdown">
|
370 |
+
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle" aria-haspopup="true" aria-expanded="false">
|
371 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
372 |
</button>
|
373 |
<div class="dropdown-menu dropdown-menu-right">
|
402 |
</div>
|
403 |
<div class="fz-input-group-right">
|
404 |
<div class="dropdown">
|
405 |
+
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle" aria-haspopup="true"
|
406 |
aria-expanded="false">
|
407 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
408 |
</button>
|
454 |
</div>
|
455 |
<div class="fz-input-group-right">
|
456 |
<div class="dropdown">
|
457 |
+
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle" aria-haspopup="true"
|
458 |
aria-expanded="false">
|
459 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
460 |
</button>
|
468 |
<?php if ( ! feedzy_is_pro() ) : ?>
|
469 |
<div class="upgrade-alert">
|
470 |
<?php
|
471 |
+
echo wp_kses_post( sprintf( __( 'Add more advanced tags, like item price, rating and many more, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'moreadvanced' ) . '" target="_blank">', '</a><button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>' ) );
|
472 |
?>
|
473 |
</div>
|
474 |
<?php endif; ?>
|
497 |
</div>
|
498 |
<div class="fz-input-group-right">
|
499 |
<div class="dropdown">
|
500 |
+
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle" aria-haspopup="true"
|
501 |
aria-expanded="false">
|
502 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
503 |
</button>
|
591 |
</div>
|
592 |
<div class="fz-input-group-right">
|
593 |
<div class="dropdown">
|
594 |
+
<button type="button" class="btn btn-outline-primary btn-add-fields dropdown-toggle" aria-haspopup="true"
|
595 |
aria-expanded="false">
|
596 |
<?php esc_html_e( 'Insert Tag', 'feedzy-rss-feeds' ); ?> <span class="dashicons dashicons-plus-alt2"></span>
|
597 |
</button>
|
605 |
<?php if ( ! feedzy_is_pro() ) : ?>
|
606 |
<div class="upgrade-alert">
|
607 |
<?php
|
608 |
+
echo wp_kses_post( sprintf( __( 'Add more advanced tags, like item price, rating and many more, by %1$supgrading to Feedzy Pro%2$s', 'feedzy-rss-feeds' ), '<a href="' . tsdk_utmify( FEEDZY_UPSELL_LINK, 'upgradealert' ) . '" target="_blank">', '</a><button type="button" class="remove-alert"><span class="dashicons dashicons-no-alt"></span></button>' ) );
|
609 |
?>
|
610 |
</div>
|
611 |
<?php endif; ?>
|
includes/views/js/import-metabox-edit.js
CHANGED
@@ -538,6 +538,9 @@
|
|
538 |
_action: "run_now",
|
539 |
},
|
540 |
success: function (data) {
|
|
|
|
|
|
|
541 |
numberRow.find("td:first").html(data.data.msg);
|
542 |
},
|
543 |
complete: function () {
|
538 |
_action: "run_now",
|
539 |
},
|
540 |
success: function (data) {
|
541 |
+
if ( data.data.import_success ) {
|
542 |
+
numberRow.find("td:first").addClass('import_success');
|
543 |
+
}
|
544 |
numberRow.find("td:first").html(data.data.msg);
|
545 |
},
|
546 |
complete: function () {
|
includes/views/spinnerchief-view.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<div class="form-block">
|
3 |
<div class="upgrade-alert mb-24">
|
4 |
<?php
|
5 |
-
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), FEEDZY_UPSELL_LINK ) );
|
6 |
?>
|
7 |
</div>
|
8 |
<div class="locked-form-block">
|
2 |
<div class="form-block">
|
3 |
<div class="upgrade-alert mb-24">
|
4 |
<?php
|
5 |
+
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), tsdk_utmify( FEEDZY_UPSELL_LINK, 'spinnerchief' ) ) );
|
6 |
?>
|
7 |
</div>
|
8 |
<div class="locked-form-block">
|
includes/views/wordai-view.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<div class="form-block">
|
3 |
<div class="upgrade-alert mb-24">
|
4 |
<?php
|
5 |
-
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), FEEDZY_UPSELL_LINK ) );
|
6 |
?>
|
7 |
</div>
|
8 |
<div class="locked-form-block">
|
2 |
<div class="form-block">
|
3 |
<div class="upgrade-alert mb-24">
|
4 |
<?php
|
5 |
+
echo wp_kses_post( wp_sprintf( __( 'You\'re using Feedzy Lite. Unlock more powerful features, by <a href="%s" target="_blank">upgrading to Feedzy Pro</a>', 'feedzy-rss-feeds' ), tsdk_utmify( FEEDZY_UPSELL_LINK, 'wordai' ) ) );
|
6 |
?>
|
7 |
</div>
|
8 |
<div class="locked-form-block">
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: themeisle,codeinwp,hardeepasrani,rozroz
|
|
3 |
Tags: rss aggregator, news aggregator, autoblogging, feed to post, rss import
|
4 |
Requires at least: 3.7
|
5 |
Requires PHP: 5.6
|
6 |
-
Tested up to:
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
@@ -464,6 +464,18 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
464 |
|
465 |
== Changelog ==
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
##### [Version 4.0.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v4.0.0...v4.0.1) (2022-07-19)
|
468 |
|
469 |
#### Fixes:
|
3 |
Tags: rss aggregator, news aggregator, autoblogging, feed to post, rss import
|
4 |
Requires at least: 3.7
|
5 |
Requires PHP: 5.6
|
6 |
+
Tested up to: 6.0
|
7 |
Stable tag: trunk
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
464 |
|
465 |
== Changelog ==
|
466 |
|
467 |
+
##### [Version 4.0.2](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v4.0.1...v4.0.2) (2022-09-09)
|
468 |
+
|
469 |
+
#### Fixes
|
470 |
+
- Fix compatibility issues with Jnews-essential
|
471 |
+
- Fix duplicate upsell card
|
472 |
+
- Fix Feedzy icon not visible in the classic editor
|
473 |
+
- Change red color after import
|
474 |
+
- Update dependencies
|
475 |
+
|
476 |
+
|
477 |
+
|
478 |
+
|
479 |
##### [Version 4.0.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v4.0.0...v4.0.1) (2022-07-19)
|
480 |
|
481 |
#### Fixes:
|
vendor/autoload.php
CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
|
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
-
return
|
9 |
|
10 |
require_once __DIR__ . '/composer/autoload_real.php';
|
11 |
|
12 |
+
return ComposerAutoloaderInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7::getLoader();
|
vendor/codeinwp/themeisle-sdk/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 3.2.26](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.25...v3.2.26) (2022-05-12)
|
2 |
|
3 |
- [Fix] Solve rollback sometimes not available
|
1 |
+
##### [Version 3.2.29](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.28...v3.2.29) (2022-09-08)
|
2 |
+
|
3 |
+
* Adds compatibility mechanism
|
4 |
+
* Adds content utms
|
5 |
+
* Adds usage time on uninstall feedback
|
6 |
+
|
7 |
+
##### [Version 3.2.28](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.27...v3.2.28) (2022-08-30)
|
8 |
+
|
9 |
+
* Adds utm handler
|
10 |
+
* Improve promotions
|
11 |
+
|
12 |
+
##### [Version 3.2.27](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.26...v3.2.27) (2022-08-23)
|
13 |
+
|
14 |
+
- Add Promotion Module
|
15 |
+
Add the Promotion module for free plugins
|
16 |
+
|
17 |
##### [Version 3.2.26](https://github.com/Codeinwp/themeisle-sdk/compare/v3.2.25...v3.2.26) (2022-05-12)
|
18 |
|
19 |
- [Fix] Solve rollback sometimes not available
|
vendor/codeinwp/themeisle-sdk/assets/images/animation.jpg
ADDED
Binary file
|
vendor/codeinwp/themeisle-sdk/assets/images/conditions.jpg
ADDED
Binary file
|
vendor/codeinwp/themeisle-sdk/assets/images/css.jpg
ADDED
Binary file
|
vendor/codeinwp/themeisle-sdk/assets/js/build/index.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-api', 'wp-block-editor', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n'), 'version' => '73443c6739f6cbdbb5fd');
|
vendor/codeinwp/themeisle-sdk/assets/js/build/index.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.element,o=window.wp.i18n,n=window.wp.blockEditor,s=window.wp.components,i=window.wp.compose,r=window.wp.data,l=window.wp.hooks,a=window.wp.api;var c=e.n(a);const d={button:{display:"flex",justifyContent:"center",width:"100%"},image:{padding:"20px 0"},skip:{container:{display:"flex",flexDirection:"column",alignItems:"center"},button:{fontSize:"9px"},poweredby:{fontSize:"9px",textTransform:"uppercase"}}},m={"blocks-css":{title:(0,o.__)("Custom CSS","textdomain"),description:(0,o.__)("Enable Otter Blocks to add Custom CSS for this block."),image:"css.jpg"},"blocks-animation":{title:(0,o.__)("Animations","textdomain"),description:(0,o.__)("Enable Otter Blocks to add Animations for this block."),image:"animation.jpg"},"blocks-conditions":{title:(0,o.__)("Visibility Conditions","textdomain"),description:(0,o.__)("Enable Otter Blocks to add Visibility Conditions for this block."),image:"conditions.jpg"}},w=e=>{let{onClick:n}=e;return(0,t.createElement)("div",{style:d.skip.container},(0,t.createElement)(s.Button,{style:d.skip.button,variant:"tertiary",onClick:n},(0,o.__)("Skip for now")),(0,t.createElement)("span",{style:d.skip.poweredby},(0,o.__)("Recommended by ")+window.themeisleSDKPromotions.product))},p=(0,i.createHigherOrderComponent)((e=>i=>{if(i.isSelected&&Boolean(window.themeisleSDKPromotions.showPromotion)){const[l,a]=(0,t.useState)(!1),[p,u]=(0,t.useState)("default"),[_,k]=(0,t.useState)(!1),[h,b,g]=(()=>{const{createNotice:e}=(0,r.dispatch)("core/notices"),[n,s]=(0,t.useState)({}),[i,l]=(0,t.useState)("loading"),a=()=>{c().loadPromise.then((async()=>{try{const e=new(c().models.Settings),t=await e.fetch();s(t)}catch(e){l("error")}finally{l("loaded")}}))};return(0,t.useEffect)((()=>{a()}),[]),[e=>null==n?void 0:n[e],function(t,n){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,o.__)("Settings saved.","textdomain");l("saving");const i=new(c().models.Settings)({[t]:n}).save();i.success(((t,n)=>{"success"===n&&(l("loaded"),e("success",s,{isDismissible:!0,type:"snackbar"})),"error"===n&&(l("error"),e("error",(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})),a()})),i.error((t=>{l("error"),e("error",t.responseJSON.message?t.responseJSON.message:(0,o.__)("An unknown error occurred.","textdomain"),{isDismissible:!0,type:"snackbar"})}))},i]})(),y=async()=>{var e;a(!0),await("otter-blocks",new Promise((e=>{wp.updates.ajax("install-plugin",{slug:"otter-blocks",success:()=>{e({success:!0})},error:t=>{e({success:!1,code:t.errorCode})}})}))),b("themeisle_sdk_promotions_otter_installed",!Boolean(h("themeisle_sdk_promotions_otter_installed"))),await(e=window.themeisleSDKPromotions.activationUrl,new Promise((t=>{jQuery.get(e).done((()=>{t({success:!0})})).fail((()=>{t({success:!1})}))}))),a(!1),u("installed")},S=()=>"installed"===p?(0,t.createElement)("p",null,(0,t.createElement)("strong",null,(0,o.__)("Awesome! Refresh the page to see Otter Blocks in action."))):(0,t.createElement)(s.Button,{variant:"secondary",onClick:y,isBusy:l,style:d.button},(0,o.__)("Install & Activate Otter Blocks")),f=()=>{const e=JSON.parse(window.themeisleSDKPromotions.promotions_otter);e[window.themeisleSDKPromotions.showPromotion]=(new Date).getTime()/1e3|0,b("themeisle_sdk_promotions_otter",JSON.stringify(e)),window.themeisleSDKPromotions.showPromotion=!1};return(0,t.useEffect)((()=>{_&&f()}),[_]),_?(0,t.createElement)(e,i):(0,t.createElement)(t.Fragment,null,(0,t.createElement)(e,i),(0,t.createElement)(n.InspectorControls,null,Object.keys(m).map((e=>{if(e===window.themeisleSDKPromotions.showPromotion){const o=m[e];return(0,t.createElement)(s.PanelBody,{title:o.title,initialOpen:!1},(0,t.createElement)("p",null,o.description),(0,t.createElement)(S,null),(0,t.createElement)("img",{style:d.image,src:window.themeisleSDKPromotions.assets+o.image}),(0,t.createElement)(w,{onClick:()=>k(!0)}))}}))))}return(0,t.createElement)(e,i)}),"withInspectorControl");(0,r.select)("core/edit-site")||(0,l.addFilter)("editor.BlockEdit","themeisle-sdk/with-inspector-controls",p)})();
|
vendor/codeinwp/themeisle-sdk/load.php
CHANGED
@@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
-
$themeisle_sdk_version = '3.2.
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
@@ -71,3 +71,105 @@ if ( ! function_exists( 'themeisle_sdk_load_latest' ) ) :
|
|
71 |
}
|
72 |
endif;
|
73 |
add_action( 'init', 'themeisle_sdk_load_latest' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
return;
|
15 |
}
|
16 |
// Current SDK version and path.
|
17 |
+
$themeisle_sdk_version = '3.2.29';
|
18 |
$themeisle_sdk_path = dirname( __FILE__ );
|
19 |
|
20 |
global $themeisle_sdk_max_version;
|
71 |
}
|
72 |
endif;
|
73 |
add_action( 'init', 'themeisle_sdk_load_latest' );
|
74 |
+
|
75 |
+
if ( ! function_exists( 'tsdk_utmify' ) ) {
|
76 |
+
/**
|
77 |
+
* Utmify a link.
|
78 |
+
*
|
79 |
+
* @param string $url URL to add utms.
|
80 |
+
* @param string $area Area in page where this is used ( CTA, image, section name).
|
81 |
+
* @param string $location Location, such as customizer, about page.
|
82 |
+
*
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
+
function tsdk_utmify( $url, $area, $location = null ) {
|
86 |
+
static $current_page = null;
|
87 |
+
if ( $location === null && $current_page === null ) {
|
88 |
+
global $pagenow;
|
89 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : $pagenow;
|
90 |
+
$current_page = isset( $screen->id ) ? $screen->id : ( ( $screen === null ) ? 'non-admin' : $screen );
|
91 |
+
$current_page = sanitize_key( str_replace( '.php', '', $current_page ) );
|
92 |
+
}
|
93 |
+
$location = $location === null ? $current_page : $location;
|
94 |
+
$content = sanitize_key(
|
95 |
+
trim(
|
96 |
+
str_replace(
|
97 |
+
[
|
98 |
+
'https://',
|
99 |
+
'themeisle.com',
|
100 |
+
'/themes/',
|
101 |
+
'/plugins/',
|
102 |
+
'/upgrade',
|
103 |
+
],
|
104 |
+
'',
|
105 |
+
$url
|
106 |
+
),
|
107 |
+
'/'
|
108 |
+
)
|
109 |
+
);
|
110 |
+
return esc_url_raw(
|
111 |
+
add_query_arg(
|
112 |
+
[
|
113 |
+
'utm_source' => 'wpadmin',
|
114 |
+
'utm_medium' => $location,
|
115 |
+
'utm_campaign' => $area,
|
116 |
+
'utm_content' => $content,
|
117 |
+
],
|
118 |
+
$url
|
119 |
+
)
|
120 |
+
);
|
121 |
+
}
|
122 |
+
|
123 |
+
add_filter( 'tsdk_utmify', 'tsdk_utmify', 10, 3 );
|
124 |
+
}
|
125 |
+
|
126 |
+
|
127 |
+
if ( ! function_exists( 'tsdk_lstatus' ) ) {
|
128 |
+
/**
|
129 |
+
* Check license status.
|
130 |
+
*
|
131 |
+
* @param string $file Product basefile.
|
132 |
+
*
|
133 |
+
* @return string Status.
|
134 |
+
*/
|
135 |
+
function tsdk_lstatus( $file ) {
|
136 |
+
return \ThemeisleSDK\Modules\Licenser::status( $file );
|
137 |
+
}
|
138 |
+
}
|
139 |
+
if ( ! function_exists( 'tsdk_lis_valid' ) ) {
|
140 |
+
/**
|
141 |
+
* Check if license is valid.
|
142 |
+
*
|
143 |
+
* @param string $file Product basefile.
|
144 |
+
*
|
145 |
+
* @return bool Validness.
|
146 |
+
*/
|
147 |
+
function tsdk_lis_valid( $file ) {
|
148 |
+
return \ThemeisleSDK\Modules\Licenser::is_valid( $file );
|
149 |
+
}
|
150 |
+
}
|
151 |
+
if ( ! function_exists( 'tsdk_lplan' ) ) {
|
152 |
+
/**
|
153 |
+
* Get license plan.
|
154 |
+
*
|
155 |
+
* @param string $file Product basefile.
|
156 |
+
*
|
157 |
+
* @return string Plan.
|
158 |
+
*/
|
159 |
+
function tsdk_lplan( $file ) {
|
160 |
+
return \ThemeisleSDK\Modules\Licenser::plan( $file );
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( ! function_exists( 'tsdk_lkey' ) ) {
|
165 |
+
/**
|
166 |
+
* Get license key.
|
167 |
+
*
|
168 |
+
* @param string $file Product basefile.
|
169 |
+
*
|
170 |
+
* @return string Key.
|
171 |
+
*/
|
172 |
+
function tsdk_lkey( $file ) {
|
173 |
+
return \ThemeisleSDK\Modules\Licenser::key( $file );
|
174 |
+
}
|
175 |
+
}
|
vendor/codeinwp/themeisle-sdk/src/Loader.php
CHANGED
@@ -55,7 +55,8 @@ final class Loader {
|
|
55 |
'review',
|
56 |
'recommendation',
|
57 |
'notification',
|
58 |
-
|
|
|
59 |
];
|
60 |
|
61 |
/**
|
55 |
'review',
|
56 |
'recommendation',
|
57 |
'notification',
|
58 |
+
'promotions',
|
59 |
+
'compatibilities',
|
60 |
];
|
61 |
|
62 |
/**
|
vendor/codeinwp/themeisle-sdk/src/Modules/Compatibilities.php
ADDED
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The compatibilities model class for ThemeIsle SDK
|
4 |
+
*
|
5 |
+
* @package ThemeIsleSDK
|
6 |
+
* @subpackage Modules
|
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 |
+
|
12 |
+
namespace ThemeisleSDK\Modules;
|
13 |
+
|
14 |
+
use ThemeisleSDK\Common\Abstract_Module;
|
15 |
+
use ThemeisleSDK\Product;
|
16 |
+
|
17 |
+
// Exit if accessed directly.
|
18 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Promotions module for ThemeIsle SDK.
|
24 |
+
*/
|
25 |
+
class Compatibilities extends Abstract_Module {
|
26 |
+
const REQUIRED = 'required';
|
27 |
+
const TESTED_UP = 'tested_up';
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Should we load this module.
|
31 |
+
*
|
32 |
+
* @param Product $product Product object.
|
33 |
+
*
|
34 |
+
* @return bool
|
35 |
+
*/
|
36 |
+
public function can_load( $product ) {
|
37 |
+
if ( $this->is_from_partner( $product ) ) {
|
38 |
+
return false;
|
39 |
+
}
|
40 |
+
if ( $product->is_theme() && ! current_user_can( 'switch_themes' ) ) {
|
41 |
+
return false;
|
42 |
+
}
|
43 |
+
|
44 |
+
if ( $product->is_plugin() && ! current_user_can( 'install_plugins' ) ) {
|
45 |
+
return false;
|
46 |
+
}
|
47 |
+
|
48 |
+
return true;
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Registers the hooks.
|
53 |
+
*
|
54 |
+
* @param Product $product Product to load.
|
55 |
+
*
|
56 |
+
* @throws \Exception If the configuration is invalid.
|
57 |
+
*
|
58 |
+
* @return Compatibilities Module instance.
|
59 |
+
*/
|
60 |
+
public function load( $product ) {
|
61 |
+
|
62 |
+
|
63 |
+
$this->product = $product;
|
64 |
+
|
65 |
+
$compatibilities = apply_filters( 'themeisle_sdk_compatibilities/' . $this->product->get_slug(), [] );
|
66 |
+
if ( empty( $compatibilities ) ) {
|
67 |
+
return $this;
|
68 |
+
}
|
69 |
+
$requirement = null;
|
70 |
+
$check_type = null;
|
71 |
+
foreach ( $compatibilities as $compatibility ) {
|
72 |
+
|
73 |
+
if ( empty( $compatibility['basefile'] ) ) {
|
74 |
+
return $this;
|
75 |
+
}
|
76 |
+
$requirement = new Product( $compatibility['basefile'] );
|
77 |
+
$tested_up = isset( $compatibility[ self::TESTED_UP ] ) ? $compatibility[ self::TESTED_UP ] : '999';
|
78 |
+
$required = $compatibility[ self::REQUIRED ];
|
79 |
+
if ( ! version_compare( $required, $tested_up, '<' ) ) {
|
80 |
+
throw new \Exception( sprintf( 'Invalid required/tested_up configuration. Required version %s should be lower than tested_up %s.', $required, $tested_up ) );
|
81 |
+
}
|
82 |
+
$check_type = self::REQUIRED;
|
83 |
+
if ( ! version_compare( $requirement->get_version(), $required, '<' ) ) {
|
84 |
+
$check_type = self::TESTED_UP;
|
85 |
+
if ( version_compare( $requirement->get_version(), $tested_up . '.9999', '<' ) ) {
|
86 |
+
return $this;
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
if ( empty( $requirement ) ) {
|
93 |
+
return $this;
|
94 |
+
}
|
95 |
+
if ( $check_type === self::REQUIRED ) {
|
96 |
+
$this->mark_required( $product, $requirement );
|
97 |
+
}
|
98 |
+
if ( $check_type === self::TESTED_UP ) {
|
99 |
+
$this->mark_testedup( $product, $requirement );
|
100 |
+
}
|
101 |
+
|
102 |
+
return $this;
|
103 |
+
}
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Mark the product tested up.
|
107 |
+
*
|
108 |
+
* @param Product $product Product object.
|
109 |
+
* @param Product $requirement Requirement object.
|
110 |
+
*
|
111 |
+
* @return void
|
112 |
+
*/
|
113 |
+
public function mark_testedup( $product, $requirement ) {
|
114 |
+
add_action(
|
115 |
+
'admin_head',
|
116 |
+
function () use ( $product, $requirement ) {
|
117 |
+
$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : '';
|
118 |
+
|
119 |
+
if ( empty( $screen ) || ! isset( $screen->id ) ) {
|
120 |
+
return;
|
121 |
+
}
|
122 |
+
if ( $requirement->is_theme() && $screen->id === 'themes' ) {
|
123 |
+
?>
|
124 |
+
<script type="text/javascript">
|
125 |
+
jQuery(document).ready(function ($) {
|
126 |
+
setInterval(checkTheme, 500);
|
127 |
+
function checkTheme() {
|
128 |
+
var theme = jQuery( '.theme.active[data-slug="<?php echo esc_attr( $requirement->get_slug() ); ?>"]' );
|
129 |
+
var notice_id = 'testedup<?php echo esc_attr( $requirement->get_slug() . $product->get_slug() ); ?>';
|
130 |
+
var product_name = '<?php echo esc_attr( $product->get_friendly_name() ); ?>';
|
131 |
+
if (theme.length > 0 && jQuery('#' + notice_id).length === 0) {
|
132 |
+
theme.find('.theme-id-container').prepend('<div style="bottom:100%;top:auto;" id="'+notice_id+'" class="notice notice-warning"><strong>Warning:</strong> This theme has not been tested with your current version of <strong>' + product_name +'</strong>. Please update '+product_name+' plugin.</div>');
|
133 |
+
}
|
134 |
+
if (theme.length > 0 && jQuery('#' + notice_id + 'overlay').length === 0) {
|
135 |
+
jQuery('.theme-overlay.active .theme-author').after('<div style="bottom:100%;top:auto;" id="'+notice_id+'overlay" class="notice notice-warning"><p><strong>Warning:</strong> This theme has not been tested with your current version of <strong>' + product_name +'</strong>. Please update '+product_name+' plugin.</p></div>');
|
136 |
+
}
|
137 |
+
}
|
138 |
+
})
|
139 |
+
|
140 |
+
</script>
|
141 |
+
<?php
|
142 |
+
}
|
143 |
+
if ( $requirement->is_plugin() && $screen->id === 'plugins' ) {
|
144 |
+
?>
|
145 |
+
<script type="text/javascript">
|
146 |
+
jQuery(document).ready(function ($) {
|
147 |
+
setInterval(checkPlugin, 500);
|
148 |
+
function checkPlugin() {
|
149 |
+
var plugin = jQuery( '.plugins .active[data-slug="<?php echo esc_attr( $requirement->get_slug() ); ?>"]' );
|
150 |
+
var notice_id = 'testedup<?php echo esc_attr( $requirement->get_slug() . $product->get_slug() ); ?>';
|
151 |
+
var product_name = '<?php echo esc_attr( $product->get_friendly_name() ); ?>';
|
152 |
+
var product_type = '<?php echo ( $product->is_plugin() ? 'plugin' : 'theme' ); ?>';
|
153 |
+
if (plugin.length > 0 && jQuery('#' + notice_id).length === 0) {
|
154 |
+
plugin.find('.column-description').append('<div style="bottom:100%;top:auto;" id="'+notice_id+'" class="notice notice-warning notice-alt notice-inline"><strong>Warning:</strong> This plugin has not been tested with your current version of <strong>' + product_name +'</strong>. Please update '+product_name+' '+product_type+'.</div>');
|
155 |
+
}
|
156 |
+
}
|
157 |
+
})
|
158 |
+
|
159 |
+
</script>
|
160 |
+
<?php
|
161 |
+
}
|
162 |
+
}
|
163 |
+
);
|
164 |
+
|
165 |
+
}
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Mark the product requirements.
|
169 |
+
*
|
170 |
+
* @param Product $product Product object.
|
171 |
+
* @param Product $requirement Requirement object.
|
172 |
+
*
|
173 |
+
* @return void
|
174 |
+
*/
|
175 |
+
public function mark_required( $product, $requirement ) {
|
176 |
+
add_filter(
|
177 |
+
'upgrader_pre_download',
|
178 |
+
function ( $return, $package, $upgrader ) use ( $product, $requirement ) {
|
179 |
+
/**
|
180 |
+
* Upgrader object.
|
181 |
+
*
|
182 |
+
* @var \WP_Upgrader $upgrader Upgrader object.
|
183 |
+
*/
|
184 |
+
$should_block = false;
|
185 |
+
if ( $product->is_theme()
|
186 |
+
&& property_exists( $upgrader, 'skin' )
|
187 |
+
&& property_exists( $upgrader->skin, 'theme_info' )
|
188 |
+
&& $upgrader->skin->theme_info->template === $product->get_slug() ) {
|
189 |
+
$should_block = true;
|
190 |
+
|
191 |
+
}
|
192 |
+
if ( ! $should_block && $product->is_plugin()
|
193 |
+
&& property_exists( $upgrader, 'skin' )
|
194 |
+
&& property_exists( $upgrader->skin, 'plugin_info' )
|
195 |
+
&& $upgrader->skin->plugin_info['Name'] === $product->get_name() ) {
|
196 |
+
$should_block = true;
|
197 |
+
}
|
198 |
+
if ( $should_block ) {
|
199 |
+
echo( sprintf(
|
200 |
+
'%s update requires a newer version of %s. Please %supdate%s %s %s.',
|
201 |
+
esc_attr( $product->get_friendly_name() ),
|
202 |
+
esc_attr( $requirement->get_friendly_name() ),
|
203 |
+
'<a href="' . esc_url( admin_url( $requirement->is_theme() ? 'themes.php' : 'plugins.php' ) ) . '">',
|
204 |
+
'</a>',
|
205 |
+
esc_attr( $requirement->get_friendly_name() ),
|
206 |
+
esc_attr( $requirement->is_theme() ? 'theme' : 'plugin' )
|
207 |
+
) );
|
208 |
+
$upgrader->maintenance_mode( false );
|
209 |
+
die();
|
210 |
+
}
|
211 |
+
|
212 |
+
return $return;
|
213 |
+
},
|
214 |
+
10,
|
215 |
+
3
|
216 |
+
);
|
217 |
+
|
218 |
+
add_action(
|
219 |
+
'admin_notices',
|
220 |
+
function () use ( $product, $requirement ) {
|
221 |
+
echo '<div class="notice notice-error "><p>';
|
222 |
+
echo( sprintf(
|
223 |
+
'%s requires a newer version of %s. Please %supdate%s %s %s to the latest version.',
|
224 |
+
'<strong>' . esc_attr( $product->get_friendly_name() ) . '</strong>',
|
225 |
+
'<strong>' . esc_attr( $requirement->get_friendly_name() ) . '</strong>',
|
226 |
+
'<a href="' . esc_url( admin_url( $requirement->is_theme() ? 'themes.php' : 'plugins.php' ) ) . '">',
|
227 |
+
'</a>',
|
228 |
+
'<strong>' . esc_attr( $requirement->get_friendly_name() ) . '</strong>',
|
229 |
+
esc_attr( $requirement->is_theme() ? 'theme' : 'plugin' )
|
230 |
+
) );
|
231 |
+
echo '</p></div>';
|
232 |
+
}
|
233 |
+
);
|
234 |
+
|
235 |
+
}
|
236 |
+
}
|
vendor/codeinwp/themeisle-sdk/src/Modules/Dashboard_widget.php
CHANGED
@@ -131,8 +131,9 @@ class Dashboard_Widget extends Abstract_Module {
|
|
131 |
#themeisle h2.hndle {
|
132 |
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABbCAMAAADncTNAAAAAtFBMVEVHcEyAgIB/f3+xsbGgoaGBgYGCgoKKioqAgIC1tbW5ubnFx8iAgIDU1taBgYGCgoKAgIC0tLXW19jW2NiAgIC3uLiBgYHLzMy4uLhycnLW19d/f3/T1NW0tLTX19mVlZWvr6+BgYHl5eWKiottbW5JSUnW2Nm5ubnh4eHT1NWVlZVjY2N4eHh9fX6pqqq+v79PT0/39/fu7u7Nzc7Z2ttYWFgBAQHDw8P////JysoZGRk0NTZqJc/sAAAAIXRSTlMA0FL7/oEnEPL6eibivm9gwJya76/enFq2CXI+2lFAyM8GATmPAAADj0lEQVR4Xu2YaW/iOhSGAwRCWDosnXa6znjJvm8svf//f12TuARyhiR2pfnUR6gSEnr0+uT4xK7yRb755pvhHePli5K7Bfpkuhoq8ozRJdMH+WWha6Z3sqYparCSLRJqspjImVbANJU03cNMMpofAwQZCGsmpQYyFvVM0Q00OQ9koMl5IPcCoro+RA1Dt2Ea9n9eZ0+YHJLkgIlkDywQx00wCTyaReiKH8LbNU9ybJOdkchV6QFxyCFLbVvdfaREqgUWg/tx2UbqIcK2Hex2TdGLwFTjIj3XP3YfCZFsb23KRZn/3263oymSFI0/a5S4PqUBjoBIJBDjeEhCN0wxQSRybIxtJ3K5SGzuE/vAwIQc8ZmMMJFAIM4oikZItfEFtorGgoE43FObwqHU68OtPCnOz8KZ2Jbl5LgkSW0Tc7YyIz/EFWmS4jMbiZU5mJOmKRaJpKGGyLZtDJh3iyaNUu/3+xyKnrtFL71EG+FTiMpENhQtxUQ8kSOXCIr2tnCNhg/gTX0SHYFp0t7TCwQZ7U841yoHrW6rtGroUwTWVnLMssxx+H4bgZcSOFf5MYx0Ae8FghomMDyC2EBNImBywPkNTDNqGLQpIg2TjUNU8tBy9DQMo0DAZF16rAi7vJAtFTIYFAHUc6hIRW6OuOhJgaCSwmDEAYK4oa7ro+qIEyJU/US7KTJKPNSFT9tFgVFBu0SF1y7yjX4masRA9Da7EFGj28R/BkQz6xGIOurkx38T/bKs9Uk8aIiMwm/Jw0VP1yLrJwt13xAxvABBgsK4KWLov35DkRF7ZaqgzuZ7MQ8MOntmVYyAqKTwaICKqvSUFnVccMN5sziEP/5+xGDTahbH5Q3ZB76zr8fI+nJtvUUU3t3ml5GKviK/npCg3CGodnuJ4JVkfRFJYGVDBZrqKnn9RLf+CzDTS5PaN5J38+auzX4ykU4Qoj0rdKfcYs5ijfo9OL/uRUgZyQr7NCWtWwiUSLc4arfJa7lpszTA1OJZAQ8w8dXFrR5YHzCWSnS3pZ18tOi4Ps4vl/c7i/6qomjRecN+UubrPyPGn/VEMU3T0UFHkaPzpgjxmJsnjmrtionlMDZiog0TsY/DPtn8SXtlBvbtxKtwopy7lqW3smQO+yoGE1Uu55GJ3pmI8ygoejZNnqj0vnIRCyTKfLstRdtStGQi09myUsvwvlkuzSUXbV+Xz5ryBebV33fln/A/moud69FZiEYAAAAASUVORK5CYII=');
|
133 |
background-repeat: no-repeat;
|
134 |
-
background-position:
|
135 |
background-size: 25px;
|
|
|
136 |
}
|
137 |
|
138 |
#themeisle .inside {
|
131 |
#themeisle h2.hndle {
|
132 |
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABbCAMAAADncTNAAAAAtFBMVEVHcEyAgIB/f3+xsbGgoaGBgYGCgoKKioqAgIC1tbW5ubnFx8iAgIDU1taBgYGCgoKAgIC0tLXW19jW2NiAgIC3uLiBgYHLzMy4uLhycnLW19d/f3/T1NW0tLTX19mVlZWvr6+BgYHl5eWKiottbW5JSUnW2Nm5ubnh4eHT1NWVlZVjY2N4eHh9fX6pqqq+v79PT0/39/fu7u7Nzc7Z2ttYWFgBAQHDw8P////JysoZGRk0NTZqJc/sAAAAIXRSTlMA0FL7/oEnEPL6eibivm9gwJya76/enFq2CXI+2lFAyM8GATmPAAADj0lEQVR4Xu2YaW/iOhSGAwRCWDosnXa6znjJvm8svf//f12TuARyhiR2pfnUR6gSEnr0+uT4xK7yRb755pvhHePli5K7Bfpkuhoq8ozRJdMH+WWha6Z3sqYparCSLRJqspjImVbANJU03cNMMpofAwQZCGsmpQYyFvVM0Q00OQ9koMl5IPcCoro+RA1Dt2Ea9n9eZ0+YHJLkgIlkDywQx00wCTyaReiKH8LbNU9ybJOdkchV6QFxyCFLbVvdfaREqgUWg/tx2UbqIcK2Hex2TdGLwFTjIj3XP3YfCZFsb23KRZn/3263oymSFI0/a5S4PqUBjoBIJBDjeEhCN0wxQSRybIxtJ3K5SGzuE/vAwIQc8ZmMMJFAIM4oikZItfEFtorGgoE43FObwqHU68OtPCnOz8KZ2Jbl5LgkSW0Tc7YyIz/EFWmS4jMbiZU5mJOmKRaJpKGGyLZtDJh3iyaNUu/3+xyKnrtFL71EG+FTiMpENhQtxUQ8kSOXCIr2tnCNhg/gTX0SHYFp0t7TCwQZ7U841yoHrW6rtGroUwTWVnLMssxx+H4bgZcSOFf5MYx0Ae8FghomMDyC2EBNImBywPkNTDNqGLQpIg2TjUNU8tBy9DQMo0DAZF16rAi7vJAtFTIYFAHUc6hIRW6OuOhJgaCSwmDEAYK4oa7ro+qIEyJU/US7KTJKPNSFT9tFgVFBu0SF1y7yjX4masRA9Da7EFGj28R/BkQz6xGIOurkx38T/bKs9Uk8aIiMwm/Jw0VP1yLrJwt13xAxvABBgsK4KWLov35DkRF7ZaqgzuZ7MQ8MOntmVYyAqKTwaICKqvSUFnVccMN5sziEP/5+xGDTahbH5Q3ZB76zr8fI+nJtvUUU3t3ml5GKviK/npCg3CGodnuJ4JVkfRFJYGVDBZrqKnn9RLf+CzDTS5PaN5J38+auzX4ykU4Qoj0rdKfcYs5ijfo9OL/uRUgZyQr7NCWtWwiUSLc4arfJa7lpszTA1OJZAQ8w8dXFrR5YHzCWSnS3pZ18tOi4Ps4vl/c7i/6qomjRecN+UubrPyPGn/VEMU3T0UFHkaPzpgjxmJsnjmrtionlMDZiog0TsY/DPtn8SXtlBvbtxKtwopy7lqW3smQO+yoGE1Uu55GJ3pmI8ygoejZNnqj0vnIRCyTKfLstRdtStGQi09myUsvwvlkuzSUXbV+Xz5ryBebV33fln/A/moud69FZiEYAAAAASUVORK5CYII=');
|
133 |
background-repeat: no-repeat;
|
134 |
+
background-position: 2% 50%;
|
135 |
background-size: 25px;
|
136 |
+
padding-left: 39px;
|
137 |
}
|
138 |
|
139 |
#themeisle .inside {
|
vendor/codeinwp/themeisle-sdk/src/Modules/Licenser.php
CHANGED
@@ -24,13 +24,30 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
24 |
* Licenser module for ThemeIsle SDK.
|
25 |
*/
|
26 |
class Licenser extends Abstract_Module {
|
27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28 |
/**
|
29 |
* Number of max failed checks before showing the license message.
|
30 |
*
|
31 |
* @var int $max_failed Maximum failed checks allowed before show the notice
|
32 |
*/
|
33 |
-
private static $max_failed =
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
/**
|
35 |
* License key string.
|
36 |
*
|
@@ -215,6 +232,76 @@ class Licenser extends Abstract_Module {
|
|
215 |
return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
|
216 |
}
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
/**
|
219 |
* Return the last error message.
|
220 |
*
|
@@ -256,12 +343,7 @@ class Licenser extends Abstract_Module {
|
|
256 |
* @return int License plan.
|
257 |
*/
|
258 |
public function get_plan() {
|
259 |
-
|
260 |
-
if ( ! isset( $license_data->price_id ) ) {
|
261 |
-
return - 1;
|
262 |
-
}
|
263 |
-
|
264 |
-
return (int) $license_data->price_id;
|
265 |
}
|
266 |
|
267 |
/**
|
@@ -379,7 +461,7 @@ class Licenser extends Abstract_Module {
|
|
379 |
return $this->get_api_url();
|
380 |
}
|
381 |
|
382 |
-
return $this->get_api_url() . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
|
383 |
}
|
384 |
|
385 |
/**
|
@@ -853,7 +935,13 @@ class Licenser extends Abstract_Module {
|
|
853 |
$this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
|
854 |
$this->register_license_hooks();
|
855 |
}
|
856 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
857 |
$namespace = apply_filters( 'themesle_sdk_namespace_' . md5( $product->get_basefile() ), false );
|
858 |
|
859 |
if ( false !== $namespace ) {
|
@@ -880,6 +968,20 @@ class Licenser extends Abstract_Module {
|
|
880 |
);
|
881 |
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
882 |
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
883 |
|
884 |
return $this;
|
885 |
}
|
24 |
* Licenser module for ThemeIsle SDK.
|
25 |
*/
|
26 |
class Licenser extends Abstract_Module {
|
27 |
+
/**
|
28 |
+
* License VALID status string.
|
29 |
+
*/
|
30 |
+
const STATUS_VALID = 'valid';
|
31 |
+
/**
|
32 |
+
* License NOT_ACTIVE status string.
|
33 |
+
*/
|
34 |
+
const STATUS_NOT_ACTIVE = 'not_active';
|
35 |
+
/**
|
36 |
+
* License active expired status string.
|
37 |
+
*/
|
38 |
+
const STATUS_ACTIVE_EXPIRED = 'active_expired';
|
39 |
/**
|
40 |
* Number of max failed checks before showing the license message.
|
41 |
*
|
42 |
* @var int $max_failed Maximum failed checks allowed before show the notice
|
43 |
*/
|
44 |
+
private static $max_failed = 1;
|
45 |
+
/**
|
46 |
+
* Flag to check if the global actions were loaded.
|
47 |
+
*
|
48 |
+
* @var bool If the globals actions were loaded.
|
49 |
+
*/
|
50 |
+
private static $globals_loaded = false;
|
51 |
/**
|
52 |
* License key string.
|
53 |
*
|
232 |
return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
|
233 |
}
|
234 |
|
235 |
+
/**
|
236 |
+
* Check status.
|
237 |
+
*
|
238 |
+
* @param string $product_file Product basefile.
|
239 |
+
*
|
240 |
+
* @return string Status license.
|
241 |
+
*/
|
242 |
+
public static function status( $product_file ) {
|
243 |
+
$product = Product::get( $product_file );
|
244 |
+
if ( ! $product->requires_license() ) {
|
245 |
+
return self::STATUS_VALID;
|
246 |
+
}
|
247 |
+
$license_data = self::get_license_data( $product->get_key() );
|
248 |
+
|
249 |
+
$status = isset( $license_data->license ) ? $license_data->license : self::STATUS_NOT_ACTIVE;
|
250 |
+
|
251 |
+
return ( 'valid' === $status && isset( $license_data->is_expired ) && 'yes' === $license_data->is_expired ) ? 'active_expired' : $status;
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* Product license data.
|
256 |
+
*
|
257 |
+
* @param string $key Product key.
|
258 |
+
*
|
259 |
+
* @return false|mixed|null
|
260 |
+
*/
|
261 |
+
private static function get_license_data( $key ) {
|
262 |
+
$license_data = get_option( $key . '_license_data', '' );
|
263 |
+
|
264 |
+
return isset( $license_data->license ) ? $license_data : false;
|
265 |
+
}
|
266 |
+
|
267 |
+
/**
|
268 |
+
* Check if license is valid.
|
269 |
+
*
|
270 |
+
* @param string $product_file Product basefile.
|
271 |
+
*
|
272 |
+
* @return bool Is valid?
|
273 |
+
*/
|
274 |
+
public static function is_valid( $product_file ) {
|
275 |
+
return self::status( $product_file ) === self::STATUS_VALID;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Get product plan.
|
280 |
+
*
|
281 |
+
* @param string $product_file Product file.
|
282 |
+
*
|
283 |
+
* @return int Plan id.
|
284 |
+
*/
|
285 |
+
public static function plan( $product_file ) {
|
286 |
+
$product = Product::get( $product_file );
|
287 |
+
$data = self::get_license_data( $product->get_key() );
|
288 |
+
|
289 |
+
return isset( $data->price_id ) ? (int) $data->price_id : - 1;
|
290 |
+
}
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Get product license key.
|
294 |
+
*
|
295 |
+
* @param string $product_file Product file.
|
296 |
+
*
|
297 |
+
* @return string
|
298 |
+
*/
|
299 |
+
public static function key( $product_file ) {
|
300 |
+
$product = Product::get( $product_file );
|
301 |
+
|
302 |
+
return $product->get_license();
|
303 |
+
}
|
304 |
+
|
305 |
/**
|
306 |
* Return the last error message.
|
307 |
*
|
343 |
* @return int License plan.
|
344 |
*/
|
345 |
public function get_plan() {
|
346 |
+
return self::plan( $this->product->get_basefile() );
|
|
|
|
|
|
|
|
|
|
|
347 |
}
|
348 |
|
349 |
/**
|
461 |
return $this->get_api_url();
|
462 |
}
|
463 |
|
464 |
+
return trim( $this->get_api_url(), '/' ) . '/checkout/?edd_license_key=' . $license_data->key . '&download_id=' . $license_data->download_id;
|
465 |
}
|
466 |
|
467 |
/**
|
935 |
$this->failed_checks = intval( get_option( $this->product->get_key() . '_failed_checks', 0 ) );
|
936 |
$this->register_license_hooks();
|
937 |
}
|
938 |
+
if ( ! self::$globals_loaded ) {
|
939 |
+
add_filter( 'themeisle_sdk_license/status', [ __CLASS__, 'status' ], 999, 1 );
|
940 |
+
add_filter( 'themeisle_sdk_license/is-valid', [ __CLASS__, 'is_valid' ], 999, 1 );
|
941 |
+
add_filter( 'themeisle_sdk_license/plan', [ __CLASS__, 'plan' ], 999, 1 );
|
942 |
+
add_filter( 'themeisle_sdk_license/key', [ __CLASS__, 'key' ], 999, 1 );
|
943 |
+
$globals_loaded = true;
|
944 |
+
}
|
945 |
$namespace = apply_filters( 'themesle_sdk_namespace_' . md5( $product->get_basefile() ), false );
|
946 |
|
947 |
if ( false !== $namespace ) {
|
968 |
);
|
969 |
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
970 |
add_filter( 'http_request_args', array( $this, 'http_request_args' ), 10, 2 ); //phpcs:ignore WordPressVIPMinimum.Hooks.RestrictedHooks.http_request_args
|
971 |
+
if ( ! self::is_valid( $product->get_basefile() ) ) {
|
972 |
+
add_filter(
|
973 |
+
'plugin_action_links_' . plugin_basename( $product->get_basefile() ),
|
974 |
+
function ( $actions ) {
|
975 |
+
if ( $this->get_license_status( true ) !== self::STATUS_ACTIVE_EXPIRED ) {
|
976 |
+
return $actions;
|
977 |
+
}
|
978 |
+
$new_actions['deactivate'] = $actions['deactivate'];
|
979 |
+
$new_actions['renew_link'] = '<a style="color:#d63638" href="' . esc_url( $this->renew_url() ) . '" target="_blank" rel="external noopener noreferrer">Renew license to update</a>';
|
980 |
+
|
981 |
+
return $new_actions;
|
982 |
+
}
|
983 |
+
);
|
984 |
+
}
|
985 |
|
986 |
return $this;
|
987 |
}
|
vendor/codeinwp/themeisle-sdk/src/Modules/Promotions.php
ADDED
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* The promotions model class for ThemeIsle SDK
|
4 |
+
*
|
5 |
+
* Here's how to hook it in your plugin: add_filter( 'menu_icons_load_promotions', function() { return array( 'otter' ); } );
|
6 |
+
*
|
7 |
+
* @package ThemeIsleSDK
|
8 |
+
* @subpackage Modules
|
9 |
+
* @copyright Copyright (c) 2017, Marius Cristea
|
10 |
+
* @license http://opensource.org/licenses/gpl-3.0.php GNU Public License
|
11 |
+
* @since 1.0.0
|
12 |
+
*/
|
13 |
+
|
14 |
+
namespace ThemeisleSDK\Modules;
|
15 |
+
|
16 |
+
use ThemeisleSDK\Common\Abstract_Module;
|
17 |
+
use ThemeisleSDK\Product;
|
18 |
+
|
19 |
+
// Exit if accessed directly.
|
20 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
21 |
+
exit;
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Promotions module for ThemeIsle SDK.
|
26 |
+
*/
|
27 |
+
class Promotions extends Abstract_Module {
|
28 |
+
/**
|
29 |
+
* Fetched feeds items.
|
30 |
+
*
|
31 |
+
* @var array Feed items.
|
32 |
+
*/
|
33 |
+
private $promotions_to_load = array();
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Should we load this module.
|
37 |
+
*
|
38 |
+
* @param Product $product Product object.
|
39 |
+
*
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
public function can_load( $product ) {
|
43 |
+
if ( $this->is_from_partner( $product ) ) {
|
44 |
+
return false;
|
45 |
+
}
|
46 |
+
|
47 |
+
$this->promotions_to_load = apply_filters( $product->get_key() . '_load_promotions', array() );
|
48 |
+
|
49 |
+
if ( 0 === count( $this->promotions_to_load ) ) {
|
50 |
+
return false;
|
51 |
+
}
|
52 |
+
|
53 |
+
return true;
|
54 |
+
}
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Registers the hooks.
|
58 |
+
*
|
59 |
+
* @param Product $product Product to load.
|
60 |
+
*
|
61 |
+
* @return Promotions Module instance.
|
62 |
+
*/
|
63 |
+
public function load( $product ) {
|
64 |
+
if ( 0 === count( $this->promotions_to_load ) ) {
|
65 |
+
return;
|
66 |
+
}
|
67 |
+
|
68 |
+
if ( ! $this->is_writeable() || ! current_user_can( 'install_plugins' ) ) {
|
69 |
+
return;
|
70 |
+
}
|
71 |
+
|
72 |
+
$this->product = $product;
|
73 |
+
|
74 |
+
add_action( 'init', array( $this, 'register_settings' ), 99 );
|
75 |
+
add_action( 'admin_init', array( $this, 'register_reference' ), 99 );
|
76 |
+
|
77 |
+
if ( in_array( 'otter', $this->promotions_to_load )
|
78 |
+
&& false === apply_filters( 'themeisle_sdk_load_promotions_otter', false )
|
79 |
+
&& ! ( defined( 'OTTER_BLOCKS_VERSION' )
|
80 |
+
|| $this->is_plugin_installed( 'otter-blocks' ) )
|
81 |
+
&& version_compare( get_bloginfo( 'version' ), '5.8', '>=' ) ) {
|
82 |
+
add_filter( 'themeisle_sdk_load_promotions_otter', '__return_true' );
|
83 |
+
|
84 |
+
if ( false !== $this->show_otter_promotion() ) {
|
85 |
+
add_action( 'enqueue_block_editor_assets', array( $this, 'enqueue_editor_assets' ) );
|
86 |
+
}
|
87 |
+
}
|
88 |
+
|
89 |
+
return $this;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Register plugin reference.
|
94 |
+
*
|
95 |
+
* @return void
|
96 |
+
*/
|
97 |
+
public function register_reference() {
|
98 |
+
|
99 |
+
$reference_key = ! isset( $_GET['reference_key'] ) ? '' : sanitize_key( $_GET['reference_key'] );
|
100 |
+
if ( empty( $reference_key ) ) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
if ( get_option( 'otter_reference_key', false ) !== false ) {
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
update_option( 'otter_reference_key', $reference_key );
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Register Settings
|
111 |
+
*
|
112 |
+
* @since 1.2.0
|
113 |
+
* @access public
|
114 |
+
*/
|
115 |
+
public function register_settings() {
|
116 |
+
register_setting(
|
117 |
+
'themeisle_sdk_settings',
|
118 |
+
'themeisle_sdk_promotions_otter',
|
119 |
+
array(
|
120 |
+
'type' => 'string',
|
121 |
+
'sanitize_callback' => 'sanitize_text_field',
|
122 |
+
'show_in_rest' => true,
|
123 |
+
'default' => '{}',
|
124 |
+
)
|
125 |
+
);
|
126 |
+
|
127 |
+
register_setting(
|
128 |
+
'themeisle_sdk_settings',
|
129 |
+
'themeisle_sdk_promotions_otter_installed',
|
130 |
+
array(
|
131 |
+
'type' => 'boolean',
|
132 |
+
'sanitize_callback' => 'rest_sanitize_boolean',
|
133 |
+
'show_in_rest' => true,
|
134 |
+
'default' => false,
|
135 |
+
)
|
136 |
+
);
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Get the Otter Blocks plugin status.
|
141 |
+
*
|
142 |
+
* @param string $plugin Plugin slug.
|
143 |
+
*
|
144 |
+
* @return string
|
145 |
+
*/
|
146 |
+
private function is_plugin_installed( $plugin ) {
|
147 |
+
static $allowed_keys = [ 'otter-blocks' => 'otter-blocks/otter-blocks.php' ];
|
148 |
+
if ( ! isset( $allowed_keys[ $plugin ] ) ) {
|
149 |
+
return false;
|
150 |
+
}
|
151 |
+
if ( file_exists( WP_CONTENT_DIR . '/plugins/' . $allowed_keys[ $plugin ] ) ) {
|
152 |
+
return true;
|
153 |
+
}
|
154 |
+
|
155 |
+
return false;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Get status of Otter promotion message.
|
160 |
+
*
|
161 |
+
* @return mixed
|
162 |
+
*/
|
163 |
+
public function show_otter_promotion() {
|
164 |
+
$promotions = array(
|
165 |
+
'blocks_css',
|
166 |
+
'blocks_animation',
|
167 |
+
'blocks_conditions',
|
168 |
+
);
|
169 |
+
|
170 |
+
$option = json_decode( get_option( 'themeisle_sdk_promotions_otter', '{}' ), true );
|
171 |
+
|
172 |
+
if ( 0 === count( $option ) ) {
|
173 |
+
return 'blocks-css';
|
174 |
+
}
|
175 |
+
|
176 |
+
if ( isset( $option['blocks-css'] ) && ! isset( $option['blocks-animation'] ) && $option['blocks-css'] < strtotime( '-7 days' ) ) {
|
177 |
+
return 'blocks-animation';
|
178 |
+
}
|
179 |
+
|
180 |
+
if ( isset( $option['blocks-animation'] ) && ! isset( $option['blocks-conditions'] ) && $option['blocks-animation'] < strtotime( '-7 days' ) ) {
|
181 |
+
return 'blocks-conditions';
|
182 |
+
}
|
183 |
+
|
184 |
+
return false;
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Check if the path is writable.
|
189 |
+
*
|
190 |
+
* @return boolean
|
191 |
+
* @access public
|
192 |
+
*/
|
193 |
+
public function is_writeable() {
|
194 |
+
global $wp_filesystem;
|
195 |
+
include_once ABSPATH . 'wp-admin/includes/file.php';
|
196 |
+
WP_Filesystem();
|
197 |
+
|
198 |
+
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
199 |
+
return false;
|
200 |
+
}
|
201 |
+
|
202 |
+
$writable = WP_Filesystem( false, ABSPATH . 'wp-content' );
|
203 |
+
|
204 |
+
return $writable && 'direct' === $wp_filesystem->method;
|
205 |
+
}
|
206 |
+
|
207 |
+
/**
|
208 |
+
* Load Gutenberg editor assets.
|
209 |
+
*
|
210 |
+
* @access public
|
211 |
+
*/
|
212 |
+
public function enqueue_editor_assets() {
|
213 |
+
global $themeisle_sdk_max_path;
|
214 |
+
|
215 |
+
$themeisle_sdk_path = dirname( $themeisle_sdk_max_path );
|
216 |
+
$themeisle_sdk_src = plugins_url( '/', $themeisle_sdk_max_path );
|
217 |
+
|
218 |
+
$asset_file = include $themeisle_sdk_path . '/themeisle-sdk/assets/js/build/index.asset.php';
|
219 |
+
|
220 |
+
wp_enqueue_script(
|
221 |
+
'themeisle-sdk-otter-promotions',
|
222 |
+
$themeisle_sdk_src . 'themeisle-sdk/assets/js/build/index.js',
|
223 |
+
array_merge( $asset_file['dependencies'], [ 'updates' ] ),
|
224 |
+
$asset_file['version'],
|
225 |
+
true
|
226 |
+
);
|
227 |
+
|
228 |
+
$option = get_option( 'themeisle_sdk_promotions_otter', '{}' );
|
229 |
+
|
230 |
+
wp_localize_script(
|
231 |
+
'themeisle-sdk-otter-promotions',
|
232 |
+
'themeisleSDKPromotions',
|
233 |
+
array(
|
234 |
+
'product' => $this->product->get_name(),
|
235 |
+
'assets' => $themeisle_sdk_src . 'themeisle-sdk/assets/images/',
|
236 |
+
'showPromotion' => $this->show_otter_promotion(),
|
237 |
+
'promotions_otter' => $option,
|
238 |
+
'activationUrl' => esc_url(
|
239 |
+
add_query_arg(
|
240 |
+
array(
|
241 |
+
'plugin_status' => 'all',
|
242 |
+
'paged' => '1',
|
243 |
+
'action' => 'activate',
|
244 |
+
'reference_key' => $this->product->get_key(),
|
245 |
+
'plugin' => rawurlencode( 'otter-blocks/otter-blocks.php' ),
|
246 |
+
'_wpnonce' => wp_create_nonce( 'activate-plugin_otter-blocks/otter-blocks.php' ),
|
247 |
+
),
|
248 |
+
admin_url( 'plugins.php' )
|
249 |
+
)
|
250 |
+
),
|
251 |
+
)
|
252 |
+
);
|
253 |
+
}
|
254 |
+
}
|
vendor/codeinwp/themeisle-sdk/src/Modules/Uninstall_feedback.php
CHANGED
@@ -701,10 +701,11 @@ class Uninstall_Feedback extends Abstract_Module {
|
|
701 |
$disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
|
702 |
$disclosure_labels = array_merge(
|
703 |
[
|
704 |
-
'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No
|
705 |
'items' => [
|
706 |
sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
|
707 |
sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
|
|
|
708 |
sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
|
709 |
],
|
710 |
],
|
@@ -785,11 +786,12 @@ class Uninstall_Feedback extends Abstract_Module {
|
|
785 |
* @return bool Is the request succesfull?
|
786 |
*/
|
787 |
protected function call_api( $attributes ) {
|
788 |
-
$slug
|
789 |
-
$version
|
790 |
-
$attributes['slug']
|
791 |
-
$attributes['version']
|
792 |
-
$attributes['url']
|
|
|
793 |
|
794 |
$response = wp_remote_post(
|
795 |
self::FEEDBACK_ENDPOINT,
|
701 |
$disclosure_new_labels = apply_filters( $this->product->get_slug() . '_themeisle_sdk_disclosure_content_labels', [], $this->product );
|
702 |
$disclosure_labels = array_merge(
|
703 |
[
|
704 |
+
'title' => 'Below is a detailed view of all data that ThemeIsle will receive if you fill in this survey. No email address or IP addresses are transmitted after you submit the survey.',
|
705 |
'items' => [
|
706 |
sprintf( '%s %s version %s %s %s %s', '<strong>', ucwords( $this->product->get_type() ), '</strong>', '<code>', $this->product->get_version(), '</code>' ),
|
707 |
sprintf( '%sCurrent website:%s %s %s %s', '<strong>', '</strong>', '<code>', get_site_url(), '</code>' ),
|
708 |
+
sprintf( '%sUsage time:%s %s %s%s', '<strong>', '</strong>', '<code>', ( time() - $this->product->get_install_time() ), 's</code>' ),
|
709 |
sprintf( '%s Uninstall reason %s %s Selected reason from the above survey %s ', '<strong>', '</strong>', '<i>', '</i>' ),
|
710 |
],
|
711 |
],
|
786 |
* @return bool Is the request succesfull?
|
787 |
*/
|
788 |
protected function call_api( $attributes ) {
|
789 |
+
$slug = $this->product->get_slug();
|
790 |
+
$version = $this->product->get_version();
|
791 |
+
$attributes['slug'] = $slug;
|
792 |
+
$attributes['version'] = $version;
|
793 |
+
$attributes['url'] = get_site_url();
|
794 |
+
$attributes['active_time'] = ( time() - $this->product->get_install_time() );
|
795 |
|
796 |
$response = wp_remote_post(
|
797 |
self::FEEDBACK_ENDPOINT,
|
vendor/codeinwp/themeisle-sdk/src/Product.php
CHANGED
@@ -106,10 +106,17 @@ class Product {
|
|
106 |
* @var string $version The product version.
|
107 |
*/
|
108 |
private $version;
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
/**
|
110 |
* Root api endpoint.
|
111 |
*/
|
112 |
const API_URL = 'https://api.themeisle.com/';
|
|
|
113 |
/**
|
114 |
* ThemeIsle_SDK_Product constructor.
|
115 |
*
|
@@ -128,8 +135,25 @@ class Product {
|
|
128 |
$install = time();
|
129 |
update_option( $this->get_key() . '_install', time() );
|
130 |
}
|
131 |
-
$this->install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
|
|
|
133 |
}
|
134 |
|
135 |
/**
|
106 |
* @var string $version The product version.
|
107 |
*/
|
108 |
private $version;
|
109 |
+
/**
|
110 |
+
* Holds a map of loaded products objects.
|
111 |
+
*
|
112 |
+
* @var array Array of loaded products.
|
113 |
+
*/
|
114 |
+
private static $cached_products = [];
|
115 |
/**
|
116 |
* Root api endpoint.
|
117 |
*/
|
118 |
const API_URL = 'https://api.themeisle.com/';
|
119 |
+
|
120 |
/**
|
121 |
* ThemeIsle_SDK_Product constructor.
|
122 |
*
|
135 |
$install = time();
|
136 |
update_option( $this->get_key() . '_install', time() );
|
137 |
}
|
138 |
+
$this->install = $install;
|
139 |
+
self::$cached_products[ crc32( $basefile ) ] = $this;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Return a product.
|
144 |
+
*
|
145 |
+
* @param string $basefile Product basefile.
|
146 |
+
*
|
147 |
+
* @return Product Product Object.
|
148 |
+
*/
|
149 |
+
public static function get( $basefile ) {
|
150 |
+
$key = crc32( $basefile );
|
151 |
+
if ( isset( self::$cached_products[ $key ] ) ) {
|
152 |
+
return self::$cached_products[ $key ];
|
153 |
+
}
|
154 |
+
self::$cached_products[ $key ] = new Product( $basefile );
|
155 |
|
156 |
+
return self::$cached_products[ $key ];
|
157 |
}
|
158 |
|
159 |
/**
|
vendor/codeinwp/themeisle-sdk/start.php
CHANGED
@@ -32,6 +32,8 @@ $files_to_load = [
|
|
32 |
$themeisle_library_path . '/src/Modules/Translate.php',
|
33 |
$themeisle_library_path . '/src/Modules/Review.php',
|
34 |
$themeisle_library_path . '/src/Modules/Recommendation.php',
|
|
|
|
|
35 |
];
|
36 |
|
37 |
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
|
@@ -41,7 +43,6 @@ foreach ( $files_to_load as $file ) {
|
|
41 |
require_once $file;
|
42 |
}
|
43 |
}
|
44 |
-
|
45 |
Loader::init();
|
46 |
|
47 |
foreach ( $products as $product ) {
|
32 |
$themeisle_library_path . '/src/Modules/Translate.php',
|
33 |
$themeisle_library_path . '/src/Modules/Review.php',
|
34 |
$themeisle_library_path . '/src/Modules/Recommendation.php',
|
35 |
+
$themeisle_library_path . '/src/Modules/Promotions.php',
|
36 |
+
$themeisle_library_path . '/src/Modules/Compatibilities.php',
|
37 |
];
|
38 |
|
39 |
$files_to_load = array_merge( $files_to_load, apply_filters( 'themeisle_sdk_required_files', [] ) );
|
43 |
require_once $file;
|
44 |
}
|
45 |
}
|
|
|
46 |
Loader::init();
|
47 |
|
48 |
foreach ( $products as $product ) {
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -22,18 +22,18 @@ class ComposerAutoloaderInitc01566e44a7f56ad5f6f4245697c40b1
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
-
$includeFiles = \Composer\Autoload\
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
-
|
37 |
}
|
38 |
|
39 |
return $loader;
|
@@ -45,7 +45,7 @@ class ComposerAutoloaderInitc01566e44a7f56ad5f6f4245697c40b1
|
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
-
function
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7', 'loadClassLoader'));
|
28 |
|
29 |
require __DIR__ . '/autoload_static.php';
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7::getInitializer($loader));
|
31 |
|
32 |
$loader->register(true);
|
33 |
|
34 |
+
$includeFiles = \Composer\Autoload\ComposerStaticInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7::$files;
|
35 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
36 |
+
composerRequire8ce3ab2cb73a4e8e5bac7efa5e48e3b7($fileIdentifier, $file);
|
37 |
}
|
38 |
|
39 |
return $loader;
|
45 |
* @param string $file
|
46 |
* @return void
|
47 |
*/
|
48 |
+
function composerRequire8ce3ab2cb73a4e8e5bac7efa5e48e3b7($fileIdentifier, $file)
|
49 |
{
|
50 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
51 |
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'3df8ee254224091c21b9aebb792d2f8b' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
@@ -17,7 +17,7 @@ class ComposerStaticInitc01566e44a7f56ad5f6f4245697c40b1
|
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
-
$loader->classMap =
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7
|
8 |
{
|
9 |
public static $files = array (
|
10 |
'3df8ee254224091c21b9aebb792d2f8b' => __DIR__ . '/..' . '/codeinwp/themeisle-sdk/load.php',
|
17 |
public static function getInitializer(ClassLoader $loader)
|
18 |
{
|
19 |
return \Closure::bind(function () use ($loader) {
|
20 |
+
$loader->classMap = ComposerStaticInit8ce3ab2cb73a4e8e5bac7efa5e48e3b7::$classMap;
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
vendor/composer/installed.json
CHANGED
@@ -2,24 +2,23 @@
|
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "codeinwp/themeisle-sdk",
|
5 |
-
"version": "
|
6 |
-
"version_normalized": "
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
10 |
-
"reference": "
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
-
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/
|
15 |
-
"reference": "
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require-dev": {
|
19 |
"codeinwp/phpcs-ruleset": "dev-main"
|
20 |
},
|
21 |
-
"time": "2022-
|
22 |
-
"default-branch": true,
|
23 |
"type": "library",
|
24 |
"installation-source": "dist",
|
25 |
"notification-url": "https://packagist.org/downloads/",
|
@@ -40,7 +39,7 @@
|
|
40 |
],
|
41 |
"support": {
|
42 |
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
|
43 |
-
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/
|
44 |
},
|
45 |
"install-path": "../codeinwp/themeisle-sdk"
|
46 |
}
|
2 |
"packages": [
|
3 |
{
|
4 |
"name": "codeinwp/themeisle-sdk",
|
5 |
+
"version": "3.2.29",
|
6 |
+
"version_normalized": "3.2.29.0",
|
7 |
"source": {
|
8 |
"type": "git",
|
9 |
"url": "https://github.com/Codeinwp/themeisle-sdk.git",
|
10 |
+
"reference": "9456fb0944ec69c3975de04aaf56233ddc2f828c"
|
11 |
},
|
12 |
"dist": {
|
13 |
"type": "zip",
|
14 |
+
"url": "https://api.github.com/repos/Codeinwp/themeisle-sdk/zipball/9456fb0944ec69c3975de04aaf56233ddc2f828c",
|
15 |
+
"reference": "9456fb0944ec69c3975de04aaf56233ddc2f828c",
|
16 |
"shasum": ""
|
17 |
},
|
18 |
"require-dev": {
|
19 |
"codeinwp/phpcs-ruleset": "dev-main"
|
20 |
},
|
21 |
+
"time": "2022-09-08T15:34:21+00:00",
|
|
|
22 |
"type": "library",
|
23 |
"installation-source": "dist",
|
24 |
"notification-url": "https://packagist.org/downloads/",
|
39 |
],
|
40 |
"support": {
|
41 |
"issues": "https://github.com/Codeinwp/themeisle-sdk/issues",
|
42 |
+
"source": "https://github.com/Codeinwp/themeisle-sdk/tree/v3.2.29"
|
43 |
},
|
44 |
"install-path": "../codeinwp/themeisle-sdk"
|
45 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/feedzy-rss-feeds',
|
4 |
-
'pretty_version' => 'v4.0.
|
5 |
-
'version' => '4.0.
|
6 |
-
'reference' => '
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
@@ -11,23 +11,21 @@
|
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/feedzy-rss-feeds' => array(
|
14 |
-
'pretty_version' => 'v4.0.
|
15 |
-
'version' => '4.0.
|
16 |
-
'reference' => '
|
17 |
'type' => 'wordpress-plugin',
|
18 |
'install_path' => __DIR__ . '/../../',
|
19 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/themeisle-sdk' => array(
|
23 |
-
'pretty_version' => '
|
24 |
-
'version' => '
|
25 |
-
'reference' => '
|
26 |
'type' => 'library',
|
27 |
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
|
28 |
-
'aliases' => array(
|
29 |
-
0 => '9999999-dev',
|
30 |
-
),
|
31 |
'dev_requirement' => false,
|
32 |
),
|
33 |
),
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
'name' => 'codeinwp/feedzy-rss-feeds',
|
4 |
+
'pretty_version' => 'v4.0.2',
|
5 |
+
'version' => '4.0.2.0',
|
6 |
+
'reference' => 'ffa468a768239210aac516de44c0f2469175250a',
|
7 |
'type' => 'wordpress-plugin',
|
8 |
'install_path' => __DIR__ . '/../../',
|
9 |
'aliases' => array(),
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/feedzy-rss-feeds' => array(
|
14 |
+
'pretty_version' => 'v4.0.2',
|
15 |
+
'version' => '4.0.2.0',
|
16 |
+
'reference' => 'ffa468a768239210aac516de44c0f2469175250a',
|
17 |
'type' => 'wordpress-plugin',
|
18 |
'install_path' => __DIR__ . '/../../',
|
19 |
'aliases' => array(),
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/themeisle-sdk' => array(
|
23 |
+
'pretty_version' => '3.2.29',
|
24 |
+
'version' => '3.2.29.0',
|
25 |
+
'reference' => '9456fb0944ec69c3975de04aaf56233ddc2f828c',
|
26 |
'type' => 'library',
|
27 |
'install_path' => __DIR__ . '/../codeinwp/themeisle-sdk',
|
28 |
+
'aliases' => array(),
|
|
|
|
|
29 |
'dev_requirement' => false,
|
30 |
),
|
31 |
),
|