Version Description
Download this release
Release Info
Developer | themeisle |
Plugin | FEEDZY RSS Feeds Lite |
Version | 3.7.2 |
Comparing to | |
See all releases |
Code changes from version 3.7.1 to 3.7.2
- CHANGELOG.md +12 -0
- css/feedzy-rss-feeds.css +1 -1
- feedzy-rss-feed.php +1 -1
- img/spin_light.gif +0 -0
- includes/abstract/feedzy-rss-feeds-admin-abstract.php +1 -1
- includes/admin/feedzy-rss-feeds-import.php +59 -0
- includes/feedzy-rss-feeds-feed-tweaks.php +23 -3
- includes/feedzy-rss-feeds.php +1 -1
- includes/gutenberg/build/block.js +1 -1
- includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php +13 -1
- includes/views/css/import-metabox-edit.css +18 -1
- includes/views/js/import-metabox-edit.js +45 -0
- readme.txt +15 -0
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +2 -2
- vendor/composer/installed.php +6 -6
CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##### [Version 3.7.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v3.7.0...v3.7.1) (2021-07-07)
|
2 |
|
3 |
### Fixes
|
1 |
+
##### [Version 3.7.2](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v3.7.1...v3.7.2) (2021-08-04)
|
2 |
+
|
3 |
+
#### Features
|
4 |
+
- Add auto-populate dropdown for available meta fields for import wizzard
|
5 |
+
|
6 |
+
#### Fixes
|
7 |
+
|
8 |
+
- Fix broken icon issue in chosen dropdown
|
9 |
+
- Fix PHP notices on widget block area
|
10 |
+
- Add image dimensions support
|
11 |
+
- Fix PHP8 fatal error when use multiple feed in visual editor
|
12 |
+
|
13 |
##### [Version 3.7.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v3.7.0...v3.7.1) (2021-07-07)
|
14 |
|
15 |
### Fixes
|
css/feedzy-rss-feeds.css
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
* feedzy-rss-feeds.css
|
3 |
* Feedzy RSS Feed
|
4 |
* Copyright: (c) 2016 Themeisle, themeisle.com
|
5 |
-
* Version: 3.7.
|
6 |
* Plugin Name: FEEDZY RSS Feeds
|
7 |
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
|
8 |
* Author: Themeisle
|
2 |
* feedzy-rss-feeds.css
|
3 |
* Feedzy RSS Feed
|
4 |
* Copyright: (c) 2016 Themeisle, themeisle.com
|
5 |
+
* Version: 3.7.2
|
6 |
* Plugin Name: FEEDZY RSS Feeds
|
7 |
* Plugin URI: http://themeisle.com/plugins/feedzy-rss-feeds/
|
8 |
* Author: Themeisle
|
feedzy-rss-feed.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: Feedzy RSS Feeds Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
|
17 |
* Description: 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: 3.7.
|
19 |
* Author: Themeisle
|
20 |
* Author URI: http://themeisle.com
|
21 |
* License: GPL-2.0+
|
15 |
* Plugin Name: Feedzy RSS Feeds Lite
|
16 |
* Plugin URI: https://themeisle.com/plugins/feedzy-rss-feeds-lite/
|
17 |
* Description: 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: 3.7.2
|
19 |
* Author: Themeisle
|
20 |
* Author URI: http://themeisle.com
|
21 |
* License: GPL-2.0+
|
img/spin_light.gif
ADDED
Binary file
|
includes/abstract/feedzy-rss-feeds-admin-abstract.php
CHANGED
@@ -1130,7 +1130,7 @@ abstract class Feedzy_Rss_Feeds_Admin_Abstract {
|
|
1130 |
'rss_title' => html_entity_decode( $feed->get_title() ),
|
1131 |
'rss_description_class' => 'rss_description',
|
1132 |
'rss_description' => $feed->get_description(),
|
1133 |
-
'rss_classes' => array( $sc['className'], 'feedzy-' . md5( $feed_url ) ),
|
1134 |
);
|
1135 |
}
|
1136 |
|
1130 |
'rss_title' => html_entity_decode( $feed->get_title() ),
|
1131 |
'rss_description_class' => 'rss_description',
|
1132 |
'rss_description' => $feed->get_description(),
|
1133 |
+
'rss_classes' => array( $sc['className'], 'feedzy-' . md5( is_array( $feed_url ) ? implode( ', ', $feed_url ) : $feed_url ) ),
|
1134 |
);
|
1135 |
}
|
1136 |
|
includes/admin/feedzy-rss-feeds-import.php
CHANGED
@@ -912,6 +912,9 @@ class Feedzy_Rss_Feeds_Import {
|
|
912 |
case 'dry_run':
|
913 |
$this->dry_run();
|
914 |
break;
|
|
|
|
|
|
|
915 |
}
|
916 |
}
|
917 |
|
@@ -2150,4 +2153,60 @@ class Feedzy_Rss_Feeds_Import {
|
|
2150 |
do_action( 'wpml_set_element_language_details', $language_args );
|
2151 |
}
|
2152 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2153 |
}
|
912 |
case 'dry_run':
|
913 |
$this->dry_run();
|
914 |
break;
|
915 |
+
case 'fetch_custom_fields':
|
916 |
+
$this->fetch_custom_fields();
|
917 |
+
break;
|
918 |
}
|
919 |
}
|
920 |
|
2153 |
do_action( 'wpml_set_element_language_details', $language_args );
|
2154 |
}
|
2155 |
}
|
2156 |
+
|
2157 |
+
/**
|
2158 |
+
* Fetch custom field by selected post type.
|
2159 |
+
*/
|
2160 |
+
public function fetch_custom_fields() {
|
2161 |
+
global $wpdb;
|
2162 |
+
|
2163 |
+
// @codingStandardsIgnoreStart
|
2164 |
+
$post_type = isset( $_POST['post_type'] ) ? filter_input( INPUT_POST, 'post_type', FILTER_SANITIZE_STRING ) : '';
|
2165 |
+
$search_key = isset( $_POST['search_key'] ) ? filter_input( INPUT_POST, 'search_key', FILTER_SANITIZE_STRING ) : '';
|
2166 |
+
// @codingStandardsIgnoreEnd
|
2167 |
+
|
2168 |
+
$like = '';
|
2169 |
+
if ( ! empty( $search_key ) ) {
|
2170 |
+
$like = " AND $wpdb->postmeta.meta_key LIKE '%$search_key%'";
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
// phpcs:ignore
|
2174 |
+
$query_result = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT($wpdb->postmeta.meta_key) FROM $wpdb->posts LEFT JOIN $wpdb->postmeta ON $wpdb->posts.ID = $wpdb->postmeta.post_id WHERE $wpdb->posts.post_type = '%s' AND $wpdb->postmeta.meta_key != '' AND $wpdb->postmeta.meta_key NOT RegExp '(^[_0-9].+$)' AND $wpdb->postmeta.meta_key NOT RegExp '(^[_feedzy].+$)' AND $wpdb->postmeta.meta_key NOT RegExp '(^[0-9]+$)'$like LIMIT 0, 9999", $post_type ), ARRAY_A );
|
2175 |
+
|
2176 |
+
$acf_fields = array();
|
2177 |
+
if ( function_exists( 'acf_get_field_groups' ) ) {
|
2178 |
+
$groups = acf_get_field_groups( array( 'post_type' => $post_type ) );
|
2179 |
+
if ( ! empty( $groups ) ) {
|
2180 |
+
foreach ( $groups as $group ) {
|
2181 |
+
$fields = acf_get_fields( $group['key'] );
|
2182 |
+
if ( ! empty( $fields ) ) {
|
2183 |
+
foreach ( $fields as $field ) {
|
2184 |
+
if ( ! empty( $search_key ) ) {
|
2185 |
+
if ( stripos( $field['name'], $search_key ) !== false ) {
|
2186 |
+
$acf_fields[] = $field['name'];
|
2187 |
+
}
|
2188 |
+
} else {
|
2189 |
+
$acf_fields[] = $field['name'];
|
2190 |
+
}
|
2191 |
+
}
|
2192 |
+
}
|
2193 |
+
}
|
2194 |
+
}
|
2195 |
+
}
|
2196 |
+
$query_result = is_array( $query_result ) ? $query_result : array();
|
2197 |
+
$query_result = array_column( $query_result, 'meta_key' );
|
2198 |
+
$query_result = array_merge( $acf_fields, $query_result );
|
2199 |
+
$query_result = array_unique( $query_result );
|
2200 |
+
|
2201 |
+
if ( ! empty( $query_result ) ) {
|
2202 |
+
wp_send_json_success( $query_result );
|
2203 |
+
} else {
|
2204 |
+
wp_send_json_error(
|
2205 |
+
array(
|
2206 |
+
'not_found_msg' => __( 'No matches found', 'feedzy-rss-feeds' ),
|
2207 |
+
)
|
2208 |
+
);
|
2209 |
+
}
|
2210 |
+
wp_die();
|
2211 |
+
}
|
2212 |
}
|
includes/feedzy-rss-feeds-feed-tweaks.php
CHANGED
@@ -48,12 +48,32 @@ add_filter( 'the_content_feed', 'feedzy_insert_thumbnail' );
|
|
48 |
* @return string post thumbnail HTML.
|
49 |
*/
|
50 |
function display_external_post_image( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
$url = get_post_meta( $post_id, 'feedzy_item_external_url', true );
|
52 |
if ( ! empty( $url ) ) {
|
53 |
$alt = get_the_title( $post_id );
|
54 |
-
$attr =
|
55 |
-
'alt' => $alt,
|
56 |
-
);
|
57 |
$attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, '', '' );
|
58 |
$attr = array_map( 'esc_attr', $attr );
|
59 |
$html = sprintf( '<img src="%s"', esc_url( $url ) );
|
48 |
* @return string post thumbnail HTML.
|
49 |
*/
|
50 |
function display_external_post_image( $html, $post_id, $post_thumbnail_id, $size, $attr ) {
|
51 |
+
// If check post thumbnail exists OR not.
|
52 |
+
if ( $post_thumbnail_id ) {
|
53 |
+
return $html;
|
54 |
+
}
|
55 |
+
|
56 |
+
// Post thumbnail size.
|
57 |
+
$size = ! empty( $size ) ? $size : 'thumbnail';
|
58 |
+
|
59 |
+
// Attributes.
|
60 |
+
$attr = (array) $attr;
|
61 |
+
$attr['style'] = isset( $attr['style'] ) ? $attr['style'] : '';
|
62 |
+
|
63 |
+
// Get image dimensions.
|
64 |
+
if ( function_exists( 'wp_get_registered_image_subsizes' ) ) {
|
65 |
+
$_wp_additional_image_sizes = wp_get_registered_image_subsizes();
|
66 |
+
if ( isset( $_wp_additional_image_sizes[ $size ] ) ) {
|
67 |
+
$sizes = $_wp_additional_image_sizes[ $size ];
|
68 |
+
$dimensions = wp_sprintf( 'width:%dpx; height:%dpx;', $sizes['width'], $sizes['height'] );
|
69 |
+
$attr['style'] .= $dimensions;
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
$url = get_post_meta( $post_id, 'feedzy_item_external_url', true );
|
74 |
if ( ! empty( $url ) ) {
|
75 |
$alt = get_the_title( $post_id );
|
76 |
+
$attr['alt'] = $alt;
|
|
|
|
|
77 |
$attr = apply_filters( 'wp_get_attachment_image_attributes', $attr, '', '' );
|
78 |
$attr = array_map( 'esc_attr', $attr );
|
79 |
$html = sprintf( '<img src="%s"', esc_url( $url ) );
|
includes/feedzy-rss-feeds.php
CHANGED
@@ -104,7 +104,7 @@ class Feedzy_Rss_Feeds {
|
|
104 |
*/
|
105 |
public function init() {
|
106 |
self::$plugin_name = 'feedzy-rss-feeds';
|
107 |
-
self::$version = '3.7.
|
108 |
self::$instance->load_dependencies();
|
109 |
self::$instance->set_locale();
|
110 |
self::$instance->define_admin_hooks();
|
104 |
*/
|
105 |
public function init() {
|
106 |
self::$plugin_name = 'feedzy-rss-feeds';
|
107 |
+
self::$version = '3.7.2';
|
108 |
self::$instance->load_dependencies();
|
109 |
self::$instance->set_locale();
|
110 |
self::$instance->define_admin_hooks();
|
includes/gutenberg/build/block.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(()=>{"use strict";var e={20:e=>{var t="%[a-f0-9]{2}",r=new RegExp(t,"gi"),a=new RegExp("("+t+")+","gi");function n(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),a=e.slice(t);return Array.prototype.concat.call([],n(r),n(a))}function s(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(r),a=1;a<t.length;a++)t=(e=n(t,a).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=a.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=s(r[0]);n!==r[0]&&(t[r[0]]=n)}r=a.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),i=0;i<o.length;i++){var l=o[i];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},806:e=>{e.exports=function(e,t){for(var r={},a=Object.keys(e),n=Array.isArray(t),s=0;s<a.length;s++){var o=a[s],i=e[o];(n?-1!==t.indexOf(o):t(o,i,e))&&(r[o]=i)}return r}},563:(e,t,r)=>{const a=r(610),n=r(20),s=r(500),o=r(806);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?a(e):encodeURIComponent(e):e}function p(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function c(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function m(e){const t=(e=c(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,a)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===a[e]&&(a[e]={}),a[e][t[1]]=r):a[e]=r};case"bracket":return(e,r,a)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==a[e]?a[e]=[].concat(a[e],r):a[e]=[r]:a[e]=r};case"comma":case"separator":return(t,r,a)=>{const n="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!n&&p(r,e).includes(e.arrayFormatSeparator);r=s?p(r,e):r;const o=n||s?r.split(e.arrayFormatSeparator).map((t=>p(t,e))):null===r?r:p(r,e);a[t]=o};case"bracket-separator":return(t,r,a)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(a[t]=r?p(r,e):r);const s=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>p(t,e)));void 0!==a[t]?a[t]=[].concat(a[t],s):a[t]=s};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),a=Object.create(null);if("string"!=typeof e)return a;if(!(e=e.trim().replace(/^[?#&]/,"")))return a;for(const n of e.split("&")){if(""===n)continue;let[e,o]=s(t.decode?n.replace(/\+/g," "):n,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:p(o,t),r(p(e,t),o,a)}for(const e of Object.keys(a)){const r=a[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=d(r[e],t);else a[e]=d(r,t)}return!1===t.sort?a:(!0===t.sort?Object.keys(a).sort():Object.keys(a).sort(t.sort)).reduce(((e,t)=>{const r=a[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=u(r):e[t]=r,e}),Object.create(null))}t.extract=m,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],a=function(e){switch(e.arrayFormat){case"index":return t=>(r,a)=>{const n=r.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[l(t,e),"[",n,"]"].join("")]:[...r,[l(t,e),"[",l(n,e),"]=",l(a,e)].join("")]};case"bracket":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(a,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:(n=null===n?"":n,0===a.length?[[l(r,e),t,l(n,e)].join("")]:[[a,l(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,l(t,e)]:[...r,[l(t,e),"=",l(a,e)].join("")]}}(t),n={};for(const t of Object.keys(e))r(t)||(n[t]=e[t]);const s=Object.keys(n);return!1!==t.sort&&s.sort(t.sort),s.map((r=>{const n=e[r];return void 0===n?"":null===n?l(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":n.reduce(a(r),[]).join("&"):l(r,t)+"="+l(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,a]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(m(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:p(a,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const a=c(e.url).split("?")[0]||"",n=t.extract(e.url),s=t.parse(n,{sort:!1}),o=Object.assign(s,e.query);let i=t.stringify(o,r);i&&(i=`?${i}`);let p=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(p=`#${l(e.fragmentIdentifier,r)}`),`${a}${i}${p}`},t.pick=(e,r,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:n,query:s,fragmentIdentifier:i}=t.parseUrl(e,a);return t.stringifyUrl({url:n,query:o(s,r),fragmentIdentifier:i},a)},t.exclude=(e,r,a)=>{const n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,a)}},500:e=>{e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,r),s.exports}(()=>{var e=r(563),t=lodash.isEmpty,a=wp.components.BaseControl;const n=(0,wp.compose.withInstanceId)((function(e){var r=e.label,n=e.selected,s=e.help,o=e.instanceId,i=e.onChange,l=e.disabled,p=e.options,u=void 0===p?[]:p,c="inspector-radio-image-control-".concat(o),m=function(e){return i(e.target.value)};return!t(u)&&wp.element.createElement(a,{label:r,id:c,help:s,className:"components-radio-image-control"},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===n,"aria-describedby":s?"".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"})))}))))}));function s(e){return(s="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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!==s(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 u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=wp.i18n.__,m=wp.blockEditor||wp.editor,d=m.InspectorControls,f=m.MediaUpload,h=wp.element,y=h.Component,b=(h.Fragment,wp.components),g=b.BaseControl,v=b.ExternalLink,w=b.PanelBody,E=b.RangeControl,k=b.TextControl,C=b.Button,T=b.ToggleControl,x=b.SelectControl,z=b.ResponsiveWrapper;const N=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&&l(e,t)}(h,e);var t,r,a,s,m=(a=h,s=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}}(),function(){var e,t=u(a);if(s){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function h(){return o(this,h),m.apply(this,arguments)}return t=h,(r=[{key:"render",value:function(){var e=this,t="";return"https"===this.props.attributes.http&&(t+=c("Please verify that the images exist on HTTPS.")),wp.element.createElement(d,{key:"inspector"},0!==this.props.attributes.status&&wp.element.createElement(w,null,wp.element.createElement(k,{label:c("Feed Source"),className:"feedzy-source",value:this.props.attributes.feeds,onChange:this.props.edit.onChangeFeed}),wp.element.createElement(C,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.props.edit.loadFeed,className:"loadFeed"},c("Load Feed"))),"fetched"===this.props.state.route&&[wp.element.createElement(w,{title:c("Feed Settings"),initialOpen:!0,className:"feedzy-options"},wp.element.createElement(E,{label:c("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(E,{label:c("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"}),null!==this.props.attributes.feedData.channel&&wp.element.createElement(T,{label:c("Display feed title?"),checked:!!this.props.attributes.feed_title,onChange:this.props.edit.onToggleFeedTitle,className:"feedzy-title"}),wp.element.createElement(T,{label:c("Lazy load feed?"),checked:!!this.props.attributes.lazy,onChange:this.props.edit.onToggleLazy,className:"feedzy-lazy",help:c("Only on the front end.")}),wp.element.createElement(x,{label:c("Feed Caching Time"),value:this.props.attributes.refresh,options:[{label:c("1 Hour"),value:"1_hours"},{label:c("2 Hours"),value:"3_hours"},{label:c("12 Hours"),value:"12_hours"},{label:c("1 Day"),value:"1_days"},{label:c("3 Days"),value:"3_days"},{label:c("15 Days"),value:"15_days"}],onChange:this.props.edit.onRefresh,className:"feedzy-refresh"}),wp.element.createElement(x,{label:c("Sorting Order"),value:this.props.attributes.sort,options:[{label:c("Default"),value:"default"},{label:c("Date Descending"),value:"date_desc"},{label:c("Date Ascending"),value:"date_asc"},{label:c("Title Descending"),value:"title_desc"},{label:c("Title Ascending"),value:"title_asc"}],onChange:this.props.edit.onSort,className:"feedzy-sort"})),wp.element.createElement(w,{title:c("Item Options"),initialOpen:!1,className:"feedzy-item-options"},wp.element.createElement(x,{label:c("Open Links In"),value:this.props.attributes.target,options:[{label:c("New Tab"),value:"_blank"},{label:c("Same Tab"),value:"_self"}],onChange:this.props.edit.onTarget}),wp.element.createElement(k,{label:c("Title Character Limit"),help:c("Leave empty to show full title."),type:"number",value:this.props.attributes.title,onChange:this.props.edit.onTitle,className:"feedzy-title-length"}),wp.element.createElement(g,null,wp.element.createElement(k,{label:feedzyjs.isPro?c("Should we display additional meta fields out of author, date, time or categories? (comma-separated list, in order of display)."):c("Should we display additional meta fields out of author, date or time? (comma-separated list, in order of display)."),help:c('Leave empty to display all and "no" to display nothing.'),placeholder:feedzyjs.isPro?c("(eg: author, date, time, tz=local, categories)"):c("(eg: author, date, time, tz=local)"),value:this.props.attributes.metafields,onChange:this.props.edit.onChangeMeta,className:"feedzy-meta"}),wp.element.createElement(k,{label:c("When using multiple sources, should we display additional meta fields? - source (comma-separated list)."),placeholder:c("(eg: source)"),value:this.props.attributes.multiple_meta,onChange:this.props.edit.onChangeMultipleMeta,className:"feedzy-multiple-meta"}),wp.element.createElement(v,{href:"https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed"},c("You can find more info about available meta field values here."))),wp.element.createElement(T,{label:c("Display post description?"),checked:!!this.props.attributes.summary,onChange:this.props.edit.onToggleSummary,className:"feedzy-summary"}),this.props.attributes.summary&&wp.element.createElement(k,{label:c("Description Character Limit"),help:c("Leave empty to show full description."),type:"number",value:this.props.attributes.summarylength,onChange:this.props.edit.onSummaryLength,className:"feedzy-summary-length"}),feedzyjs.isPro&&[wp.element.createElement(k,{label:c("Only display if title contains:"),help:c("Comma-separated list/case sensitive."),value:this.props.attributes.keywords_title,onChange:this.props.edit.onKeywordsTitle,className:"feedzy-include"}),wp.element.createElement(k,{label:c("Exclude if title contains:"),help:c("Comma-separated list/case sensitive."),value:this.props.attributes.keywords_ban,onChange:this.props.edit.onKeywordsBan,className:"feedzy-ban"})]),wp.element.createElement(w,{title:c("Item Image Options"),initialOpen:!1,className:"feedzy-image-options"},wp.element.createElement(x,{label:c("Display first image if available?"),value:this.props.attributes.thumb,options:[{label:c("Yes (without a fallback image)"),value:"auto"},{label:c("Yes (with a fallback image)"),value:"yes"},{label:c("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"},c("Fallback image if no image is found.")),wp.element.createElement(f,{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(z,{naturalWidth:e.props.attributes.default.width,naturalHeight:e.props.attributes.default.height},wp.element.createElement("img",{src:e.props.attributes.default.url,alt:c("Featured image")})),wp.element.createElement(C,{isLarge:!0,isSecondary:!0,onClick:function(){return e.props.setAttributes({default:void 0})},style:{marginTop:"10px"}},c("Remove Image"))],wp.element.createElement(C,{isLarge:!0,isPrimary:!0,onClick:r,style:{marginTop:"10px"},className:void 0===e.props.attributes.default&&"feedzy_image_upload"},c("Upload Image"))]}})),wp.element.createElement(k,{label:c("Thumbnails dimension."),type:"number",value:this.props.attributes.size,onChange:this.props.edit.onSize}),wp.element.createElement(x,{label:c("How should we treat HTTP images?"),value:this.props.attributes.http,options:[{label:c("Show with HTTP link"),value:"auto"},{label:c("Force HTTPS"),value:"https"},{label:c("Ignore and show the default image instead"),value:"default"}],onChange:this.props.edit.onHTTP,className:"feedzy-http",help:t})]),feedzyjs.isPro&&wp.element.createElement(w,{title:c("Pro Features"),initialOpen:!1,className:"feedzy-pro-options"},wp.element.createElement(T,{label:c("Display price if available?"),help:this.props.attributes.price&&"default"===this.props.attributes.template?c("Choose a different template for this to work."):null,checked:!!this.props.attributes.price,onChange:this.props.edit.onTogglePrice,className:"feedzy-pro-price"}),wp.element.createElement(k,{label:c("Referral URL parameters."),help:c('Without ("?")'),placeholder:_("(eg. promo_code=feedzy_is_awesome)"),value:this.props.attributes.referral_url,onChange:this.props.edit.onReferralURL}),wp.element.createElement(E,{label:c("Columns"),help:c("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(n,{label:c("Feed Template"),selected:this.props.attributes.template,options:[{label:c("Default"),src:feedzyjs.imagepath+"feedzy-default-template.jpg",value:"default"},{label:c("Style 1"),src:feedzyjs.imagepath+"feedzy-style1-template.jpg",value:"style1"},{label:c("Style 2"),src:feedzyjs.imagepath+"feedzy-style2-template.jpg",value:"style2"}],onChange:this.props.edit.onTemplate,className:"feedzy-pro-template"}))])}}])&&i(t.prototype,r),h}(y);var S=function(e){var t=document.createElement("div");return t.innerHTML=e,void 0!==t.innerText?t.innerText:t.textContent};function F(e){return(F="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 O(){return(O=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 j(e,t,r,a,n,s,o){try{var i=e[s](o),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(a,n)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var s=e.apply(t,r);function o(e){j(s,a,n,o,i,"next",e)}function i(e){j(s,a,n,o,i,"throw",e)}o(void 0)}))}}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(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 P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==F(t)&&"function"!=typeof t?U(e):t}function U(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var M=wp.i18n.__,B=wp,H=(B.apiFetch,B.apiRequest),$=wp.element,K=$.Component,V=($.Fragment,wp.components),q=V.ExternalLink,W=V.Placeholder,Y=V.TextControl,Q=V.Button,G=V.Spinner,J=wp.date.date;const X=function(t){!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&&P(e,t)}(p,t);var r,a,n,s,o,i,l=(o=p,i=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}}(),function(){var e,t=D(o);if(i){var r=D(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return I(this,e)});function p(){var e;return A(this,p),(e=l.apply(this,arguments)).loadFeed=e.loadFeed.bind(U(e)),e.loadCategories=e.loadCategories.bind(U(e)),e.metaExists=e.metaExists.bind(U(e)),e.multipleMetaExists=e.multipleMetaExists.bind(U(e)),e.getImageURL=e.getImageURL.bind(U(e)),e.getValidateURL=e.getValidateURL.bind(U(e)),e.onChangeFeed=e.onChangeFeed.bind(U(e)),e.onChangeMax=e.onChangeMax.bind(U(e)),e.onChangeOffset=e.onChangeOffset.bind(U(e)),e.onToggleFeedTitle=e.onToggleFeedTitle.bind(U(e)),e.onRefresh=e.onRefresh.bind(U(e)),e.onSort=e.onSort.bind(U(e)),e.onTarget=e.onTarget.bind(U(e)),e.onTitle=e.onTitle.bind(U(e)),e.onChangeMeta=e.onChangeMeta.bind(U(e)),e.onChangeMultipleMeta=e.onChangeMultipleMeta.bind(U(e)),e.onToggleSummary=e.onToggleSummary.bind(U(e)),e.onToggleLazy=e.onToggleLazy.bind(U(e)),e.onSummaryLength=e.onSummaryLength.bind(U(e)),e.onKeywordsTitle=e.onKeywordsTitle.bind(U(e)),e.onKeywordsBan=e.onKeywordsBan.bind(U(e)),e.onThumb=e.onThumb.bind(U(e)),e.onDefault=e.onDefault.bind(U(e)),e.onSize=e.onSize.bind(U(e)),e.onHTTP=e.onHTTP.bind(U(e)),e.onReferralURL=e.onReferralURL.bind(U(e)),e.onColumns=e.onColumns.bind(U(e)),e.onTemplate=e.onTemplate.bind(U(e)),e.onTogglePrice=e.onTogglePrice.bind(U(e)),e.state={route:e.props.attributes.route,loading:!1,error:!1},e}return r=p,(a=[{key:"componentDidMount",value:(s=R(regeneratorRuntime.mark((function e(){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"}),this.loadCategories());case 2:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"componentDidUpdate",value:(n=R(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 t=this,r=this.props.attributes.feeds;if(void 0!==r){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}(r,this.props.attributes.categories)){var a=r;r=e.stringify({category:a},{arrayFormat:"bracket"})}else r=r.replace(/\s/g,"").split(",").filter((function(e){return""!==e})),r=e.stringify({url:r},{arrayFormat:"bracket"});this.setState({route:"home",loading:!0}),H({path:"/feedzy/v1/feed?".concat(r),method:"POST",data:this.props.attributes}).then((function(e){return t.unmounting?e:e.error?(t.setState({route:"home",loading:!1,error:!0}),e):(t.props.setAttributes({feedData:e}),t.setState({route:"fetched",loading:!1}),e)})).fail((function(e){return t.setState({route:"home",loading:!1,error:!0}),e}))}}},{key:"loadCategories",value:function(){var e=this;H({path:"/wp/v2/feedzy_categories"}).then((function(t){if(e.unmounting)return t;var r=0,a=[];t.forEach((function(e){a[r]=e.slug,r+=1})),e.props.setAttributes({categories:a}),jQuery(".feedzy-source input").autocomplete({source:a,select:function(e,t){this.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){this.props.setAttributes({title:Number(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:"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:"render",value:function(){var e,t,r,a,n,s,o=this;return["fetched"===this.state.route&&wp.element.createElement(N,O({edit:this,state:this.state},this.props)),"home"===this.state.route&&wp.element.createElement("div",{className:this.props.className},wp.element.createElement(W,{key:"placeholder",icon:"rss",label:M("Feedzy RSS Feeds")},this.state.loading?wp.element.createElement("div",{key:"loading",className:"wp-block-embed is-loading"},wp.element.createElement(G,null),wp.element.createElement("p",null,M("Fetching..."))):[wp.element.createElement(Y,{type:"url",className:"feedzy-source",placeholder:M("Enter URL or category of your feed here..."),onChange:this.onChangeFeed,value:this.props.attributes.feeds}),wp.element.createElement(Q,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.loadFeed},M("Load Feed")),wp.element.createElement(q,{href:this.getValidateURL(),title:M("Validate Feed ")},M("Validate ")),this.state.error&&wp.element.createElement("div",null,M("Feed URL is invalid. Invalid feeds will NOT display items."))])),!("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"},S(this.props.attributes.feedData.channel.title)),wp.element.createElement("span",{className:"rss_description"}," "+S(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=this.props.attributes.keywords_title,a=this.props.attributes.keywords_ban,n=this.props.attributes.max,s=this.props.attributes.offset,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.split(",").filter((function(e){return""!==e.replace(/\s/g,"")})).some((function(t){return e.title.includes(t.trim())}))})).filter((function(e){return!a||a.split(",").filter((function(e){return""!==e.replace(/\s/g,"")})).every((function(t){return!1===e.title.includes(t.trim())}))})).slice(s,n+s)).map((function(e,t){var r=(e.date||"")+" "+(e.time||"")+" UTC +0000",a=S(e.date)||"",n=S(e.time)||"",s=S(e.categories)||"";o.metaExists("tz=local")&&(a=J("F jS, o",r),n=J("h:i A",r));var i=e.creator&&o.metaExists("author")?e.creator:"";""!==o.props.attributes.multiple_meta&&"no"!==o.props.attributes.multiple_meta&&((o.multipleMetaExists("source")||o.multipleMetaExists("yes"))&&""!==i&&""!==e.source?i=i+" ("+e.source+")":(o.multipleMetaExists("source")||o.multipleMetaExists("yes"))&&""!==e.source&&(i=e.source));var l=new Object;return l.author=M("by")+" "+i,l.date=M("on")+" "+S(a),l.time=M("at")+" "+S(n),l.categories=M("in")+" "+S(s),wp.element.createElement("li",{key:t,style:{padding:"15px 0 25px"},className:"rss_item feedzy-rss-col-".concat(o.props.attributes.columns)},(e.thumbnail&&"auto"===o.props.attributes.thumb||"yes"===o.props.attributes.thumb)&&wp.element.createElement("div",{className:"rss_image",style:{width:o.props.attributes.size+"px",height:o.props.attributes.size+"px"}},wp.element.createElement("a",{title:S(e.title),style:{width:o.props.attributes.size+"px",height:o.props.attributes.size+"px"}},wp.element.createElement("span",{className:"fetched",style:{width:o.props.attributes.size+"px",height:o.props.attributes.size+"px",backgroundImage:o.getImageURL(e,!0)},title:S(e.title)}))),wp.element.createElement("div",{className:"rss_content_wrap"},wp.element.createElement("span",{className:"title"},wp.element.createElement("a",null,o.props.attributes.title&&S(e.title).length>o.props.attributes.title?S(e.title).substring(0,o.props.attributes.title)+"...":S(e.title))),wp.element.createElement("div",{className:"rss_content"},"no"!==o.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,o.props.attributes.metafields)),o.props.attributes.summary&&wp.element.createElement("p",{className:"description"},o.props.attributes.summarylength&&S(e.description).length>o.props.attributes.summarylength?S(e.description).substring(0,o.props.attributes.summarylength)+" [...]":S(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}),M("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&&o.props.attributes.price&&e.price&&"default"!==o.props.attributes.template&&wp.element.createElement("div",{className:"price-wrap"},wp.element.createElement("a",null,wp.element.createElement("button",{className:"price"},e.price))))))}))))]}}])&&L(r.prototype,a),p}(K);var Z=wp.i18n.__;(0,wp.blocks.registerBlockType)("feedzy-rss-feeds/feedzy-block",{title:Z("Feedzy RSS Feeds"),category:"common",icon:"rss",keywords:[Z("Feedzy RSS Feeds"),Z("RSS"),Z("Feeds")],supports:{html:!1},attributes:{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_ban:{type:"string"},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"}},edit:X,save:function(){return null}})})()})();
|
1 |
+
(()=>{"use strict";var e={20:e=>{var t="%[a-f0-9]{2}",r=new RegExp(t,"gi"),a=new RegExp("("+t+")+","gi");function n(e,t){try{return decodeURIComponent(e.join(""))}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),a=e.slice(t);return Array.prototype.concat.call([],n(r),n(a))}function s(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(r),a=1;a<t.length;a++)t=(e=n(t,a).join("")).match(r);return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=a.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var n=s(r[0]);n!==r[0]&&(t[r[0]]=n)}r=a.exec(e)}t["%C2"]="�";for(var o=Object.keys(t),i=0;i<o.length;i++){var l=o[i];e=e.replace(new RegExp(l,"g"),t[l])}return e}(e)}}},806:e=>{e.exports=function(e,t){for(var r={},a=Object.keys(e),n=Array.isArray(t),s=0;s<a.length;s++){var o=a[s],i=e[o];(n?-1!==t.indexOf(o):t(o,i,e))&&(r[o]=i)}return r}},563:(e,t,r)=>{const a=r(610),n=r(20),s=r(500),o=r(806);function i(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?a(e):encodeURIComponent(e):e}function p(e,t){return t.decode?n(e):e}function u(e){return Array.isArray(e)?e.sort():"object"==typeof e?u(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function c(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function m(e){const t=(e=c(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function d(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function f(e,t){i((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,a)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===a[e]&&(a[e]={}),a[e][t[1]]=r):a[e]=r};case"bracket":return(e,r,a)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==a[e]?a[e]=[].concat(a[e],r):a[e]=[r]:a[e]=r};case"comma":case"separator":return(t,r,a)=>{const n="string"==typeof r&&r.includes(e.arrayFormatSeparator),s="string"==typeof r&&!n&&p(r,e).includes(e.arrayFormatSeparator);r=s?p(r,e):r;const o=n||s?r.split(e.arrayFormatSeparator).map((t=>p(t,e))):null===r?r:p(r,e);a[t]=o};case"bracket-separator":return(t,r,a)=>{const n=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!n)return void(a[t]=r?p(r,e):r);const s=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>p(t,e)));void 0!==a[t]?a[t]=[].concat(a[t],s):a[t]=s};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),a=Object.create(null);if("string"!=typeof e)return a;if(!(e=e.trim().replace(/^[?#&]/,"")))return a;for(const n of e.split("&")){if(""===n)continue;let[e,o]=s(t.decode?n.replace(/\+/g," "):n,"=");o=void 0===o?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:p(o,t),r(p(e,t),o,a)}for(const e of Object.keys(a)){const r=a[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=d(r[e],t);else a[e]=d(r,t)}return!1===t.sort?a:(!0===t.sort?Object.keys(a).sort():Object.keys(a).sort(t.sort)).reduce(((e,t)=>{const r=a[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=u(r):e[t]=r,e}),Object.create(null))}t.extract=m,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";i((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],a=function(e){switch(e.arrayFormat){case"index":return t=>(r,a)=>{const n=r.length;return void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[l(t,e),"[",n,"]"].join("")]:[...r,[l(t,e),"[",l(n,e),"]=",l(a,e)].join("")]};case"bracket":return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(a,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(a,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?a:(n=null===n?"":n,0===a.length?[[l(r,e),t,l(n,e)].join("")]:[[a,l(n,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,a)=>void 0===a||e.skipNull&&null===a||e.skipEmptyString&&""===a?r:null===a?[...r,l(t,e)]:[...r,[l(t,e),"=",l(a,e)].join("")]}}(t),n={};for(const t of Object.keys(e))r(t)||(n[t]=e[t]);const s=Object.keys(n);return!1!==t.sort&&s.sort(t.sort),s.map((r=>{const n=e[r];return void 0===n?"":null===n?l(r,t):Array.isArray(n)?0===n.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":n.reduce(a(r),[]).join("&"):l(r,t)+"="+l(n,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,a]=s(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(m(e),t)},t&&t.parseFragmentIdentifier&&a?{fragmentIdentifier:p(a,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0},r);const a=c(e.url).split("?")[0]||"",n=t.extract(e.url),s=t.parse(n,{sort:!1}),o=Object.assign(s,e.query);let i=t.stringify(o,r);i&&(i=`?${i}`);let p=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(p=`#${l(e.fragmentIdentifier,r)}`),`${a}${i}${p}`},t.pick=(e,r,a)=>{a=Object.assign({parseFragmentIdentifier:!0},a);const{url:n,query:s,fragmentIdentifier:i}=t.parseUrl(e,a);return t.stringifyUrl({url:n,query:o(s,r),fragmentIdentifier:i},a)},t.exclude=(e,r,a)=>{const n=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,n,a)}},500:e=>{e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},610:e=>{e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))}},t={};function r(a){var n=t[a];if(void 0!==n)return n.exports;var s=t[a]={exports:{}};return e[a](s,s.exports,r),s.exports}(()=>{var e=r(563),t=lodash.isEmpty,a=wp.components.BaseControl;const n=(0,wp.compose.withInstanceId)((function(e){var r=e.label,n=e.selected,s=e.help,o=e.instanceId,i=e.onChange,l=e.disabled,p=e.options,u=void 0===p?[]:p,c="inspector-radio-image-control-".concat(o),m=function(e){return i(e.target.value)};return!t(u)&&wp.element.createElement(a,{label:r,id:c,help:s,className:"components-radio-image-control"},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===n,"aria-describedby":s?"".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"})))}))))}));function s(e){return(s="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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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 l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e,t){return!t||"object"!==s(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 u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=wp.i18n.__,m=wp.blockEditor||wp.editor,d=m.InspectorControls,f=m.MediaUpload,h=wp.element,y=h.Component,b=(h.Fragment,wp.components),g=b.BaseControl,v=b.ExternalLink,w=b.PanelBody,E=b.RangeControl,k=b.TextControl,C=b.Button,T=b.ToggleControl,x=b.SelectControl,z=b.ResponsiveWrapper;const N=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&&l(e,t)}(h,e);var t,r,a,s,m=(a=h,s=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}}(),function(){var e,t=u(a);if(s){var r=u(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return p(this,e)});function h(){return o(this,h),m.apply(this,arguments)}return t=h,(r=[{key:"render",value:function(){var e=this,t="";return"https"===this.props.attributes.http&&(t+=c("Please verify that the images exist on HTTPS.")),wp.element.createElement(d,{key:"inspector"},0!==this.props.attributes.status&&wp.element.createElement(w,null,wp.element.createElement(k,{label:c("Feed Source"),className:"feedzy-source",value:this.props.attributes.feeds,onChange:this.props.edit.onChangeFeed}),wp.element.createElement(C,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.props.edit.loadFeed,className:"loadFeed"},c("Load Feed"))),"fetched"===this.props.state.route&&[wp.element.createElement(w,{title:c("Feed Settings"),initialOpen:!0,className:"feedzy-options"},wp.element.createElement(E,{label:c("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(E,{label:c("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"}),null!==this.props.attributes.feedData.channel&&wp.element.createElement(T,{label:c("Display feed title?"),checked:!!this.props.attributes.feed_title,onChange:this.props.edit.onToggleFeedTitle,className:"feedzy-title"}),wp.element.createElement(T,{label:c("Lazy load feed?"),checked:!!this.props.attributes.lazy,onChange:this.props.edit.onToggleLazy,className:"feedzy-lazy",help:c("Only on the front end.")}),wp.element.createElement(x,{label:c("Feed Caching Time"),value:this.props.attributes.refresh,options:[{label:c("1 Hour"),value:"1_hours"},{label:c("2 Hours"),value:"3_hours"},{label:c("12 Hours"),value:"12_hours"},{label:c("1 Day"),value:"1_days"},{label:c("3 Days"),value:"3_days"},{label:c("15 Days"),value:"15_days"}],onChange:this.props.edit.onRefresh,className:"feedzy-refresh"}),wp.element.createElement(x,{label:c("Sorting Order"),value:this.props.attributes.sort,options:[{label:c("Default"),value:"default"},{label:c("Date Descending"),value:"date_desc"},{label:c("Date Ascending"),value:"date_asc"},{label:c("Title Descending"),value:"title_desc"},{label:c("Title Ascending"),value:"title_asc"}],onChange:this.props.edit.onSort,className:"feedzy-sort"})),wp.element.createElement(w,{title:c("Item Options"),initialOpen:!1,className:"feedzy-item-options"},wp.element.createElement(x,{label:c("Open Links In"),value:this.props.attributes.target,options:[{label:c("New Tab"),value:"_blank"},{label:c("Same Tab"),value:"_self"}],onChange:this.props.edit.onTarget}),wp.element.createElement(k,{label:c("Title Character Limit"),help:c("Leave empty to show full title."),type:"number",value:this.props.attributes.title,onChange:this.props.edit.onTitle,className:"feedzy-title-length"}),wp.element.createElement(g,null,wp.element.createElement(k,{label:feedzyjs.isPro?c("Should we display additional meta fields out of author, date, time or categories? (comma-separated list, in order of display)."):c("Should we display additional meta fields out of author, date or time? (comma-separated list, in order of display)."),help:c('Leave empty to display all and "no" to display nothing.'),placeholder:feedzyjs.isPro?c("(eg: author, date, time, tz=local, categories)"):c("(eg: author, date, time, tz=local)"),value:this.props.attributes.metafields,onChange:this.props.edit.onChangeMeta,className:"feedzy-meta"}),wp.element.createElement(k,{label:c("When using multiple sources, should we display additional meta fields? - source (comma-separated list)."),placeholder:c("(eg: source)"),value:this.props.attributes.multiple_meta,onChange:this.props.edit.onChangeMultipleMeta,className:"feedzy-multiple-meta"}),wp.element.createElement(v,{href:"https://docs.themeisle.com/article/1089-how-to-display-author-date-or-time-from-the-feed"},c("You can find more info about available meta field values here."))),wp.element.createElement(T,{label:c("Display post description?"),checked:!!this.props.attributes.summary,onChange:this.props.edit.onToggleSummary,className:"feedzy-summary"}),this.props.attributes.summary&&wp.element.createElement(k,{label:c("Description Character Limit"),help:c("Leave empty to show full description."),type:"number",value:this.props.attributes.summarylength,onChange:this.props.edit.onSummaryLength,className:"feedzy-summary-length"}),feedzyjs.isPro&&[wp.element.createElement(k,{label:c("Only display if title contains:"),help:c("Comma-separated list/case sensitive."),value:this.props.attributes.keywords_title,onChange:this.props.edit.onKeywordsTitle,className:"feedzy-include"}),wp.element.createElement(k,{label:c("Exclude if title contains:"),help:c("Comma-separated list/case sensitive."),value:this.props.attributes.keywords_ban,onChange:this.props.edit.onKeywordsBan,className:"feedzy-ban"})]),wp.element.createElement(w,{title:c("Item Image Options"),initialOpen:!1,className:"feedzy-image-options"},wp.element.createElement(x,{label:c("Display first image if available?"),value:this.props.attributes.thumb,options:[{label:c("Yes (without a fallback image)"),value:"auto"},{label:c("Yes (with a fallback image)"),value:"yes"},{label:c("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"},c("Fallback image if no image is found.")),wp.element.createElement(f,{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(z,{naturalWidth:e.props.attributes.default.width,naturalHeight:e.props.attributes.default.height},wp.element.createElement("img",{src:e.props.attributes.default.url,alt:c("Featured image")})),wp.element.createElement(C,{isLarge:!0,isSecondary:!0,onClick:function(){return e.props.setAttributes({default:void 0})},style:{marginTop:"10px"}},c("Remove Image"))],wp.element.createElement(C,{isLarge:!0,isPrimary:!0,onClick:r,style:{marginTop:"10px"},className:void 0===e.props.attributes.default&&"feedzy_image_upload"},c("Upload Image"))]}})),wp.element.createElement(k,{label:c("Thumbnails dimension."),type:"number",value:this.props.attributes.size,onChange:this.props.edit.onSize}),wp.element.createElement(x,{label:c("How should we treat HTTP images?"),value:this.props.attributes.http,options:[{label:c("Show with HTTP link"),value:"auto"},{label:c("Force HTTPS"),value:"https"},{label:c("Ignore and show the default image instead"),value:"default"}],onChange:this.props.edit.onHTTP,className:"feedzy-http",help:t})]),feedzyjs.isPro&&wp.element.createElement(w,{title:c("Pro Features"),initialOpen:!1,className:"feedzy-pro-options"},wp.element.createElement(T,{label:c("Display price if available?"),help:this.props.attributes.price&&"default"===this.props.attributes.template?c("Choose a different template for this to work."):null,checked:!!this.props.attributes.price,onChange:this.props.edit.onTogglePrice,className:"feedzy-pro-price"}),wp.element.createElement(k,{label:c("Referral URL parameters."),help:c('Without ("?")'),placeholder:_("(eg. promo_code=feedzy_is_awesome)"),value:this.props.attributes.referral_url,onChange:this.props.edit.onReferralURL}),wp.element.createElement(E,{label:c("Columns"),help:c("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(n,{label:c("Feed Template"),selected:this.props.attributes.template,options:[{label:c("Default"),src:feedzyjs.imagepath+"feedzy-default-template.jpg",value:"default"},{label:c("Style 1"),src:feedzyjs.imagepath+"feedzy-style1-template.jpg",value:"style1"},{label:c("Style 2"),src:feedzyjs.imagepath+"feedzy-style2-template.jpg",value:"style2"}],onChange:this.props.edit.onTemplate,className:"feedzy-pro-template"}))])}}])&&i(t.prototype,r),h}(y);var S=function(e){var t=document.createElement("div");return t.innerHTML=e,void 0!==t.innerText?t.innerText:t.textContent};function O(e){return(O="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 F(){return(F=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 j(e,t,r,a,n,s,o){try{var i=e[s](o),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(a,n)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(a,n){var s=e.apply(t,r);function o(e){j(s,a,n,o,i,"next",e)}function i(e){j(s,a,n,o,i,"throw",e)}o(void 0)}))}}function A(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L(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 P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?D(e):t}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var M=wp.i18n.__,B=wp,H=(B.apiFetch,B.apiRequest),$=wp.element,K=$.Component,Y=($.Fragment,wp.components),V=Y.ExternalLink,q=Y.Placeholder,W=Y.TextControl,Q=Y.Button,G=Y.Spinner;wp.date.date;const J=function(t){!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&&P(e,t)}(p,t);var r,a,n,s,o,i,l=(o=p,i=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}}(),function(){var e,t=U(o);if(i){var r=U(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return I(this,e)});function p(){var e;return A(this,p),(e=l.apply(this,arguments)).loadFeed=e.loadFeed.bind(D(e)),e.loadCategories=e.loadCategories.bind(D(e)),e.metaExists=e.metaExists.bind(D(e)),e.multipleMetaExists=e.multipleMetaExists.bind(D(e)),e.getImageURL=e.getImageURL.bind(D(e)),e.getValidateURL=e.getValidateURL.bind(D(e)),e.onChangeFeed=e.onChangeFeed.bind(D(e)),e.onChangeMax=e.onChangeMax.bind(D(e)),e.onChangeOffset=e.onChangeOffset.bind(D(e)),e.onToggleFeedTitle=e.onToggleFeedTitle.bind(D(e)),e.onRefresh=e.onRefresh.bind(D(e)),e.onSort=e.onSort.bind(D(e)),e.onTarget=e.onTarget.bind(D(e)),e.onTitle=e.onTitle.bind(D(e)),e.onChangeMeta=e.onChangeMeta.bind(D(e)),e.onChangeMultipleMeta=e.onChangeMultipleMeta.bind(D(e)),e.onToggleSummary=e.onToggleSummary.bind(D(e)),e.onToggleLazy=e.onToggleLazy.bind(D(e)),e.onSummaryLength=e.onSummaryLength.bind(D(e)),e.onKeywordsTitle=e.onKeywordsTitle.bind(D(e)),e.onKeywordsBan=e.onKeywordsBan.bind(D(e)),e.onThumb=e.onThumb.bind(D(e)),e.onDefault=e.onDefault.bind(D(e)),e.onSize=e.onSize.bind(D(e)),e.onHTTP=e.onHTTP.bind(D(e)),e.onReferralURL=e.onReferralURL.bind(D(e)),e.onColumns=e.onColumns.bind(D(e)),e.onTemplate=e.onTemplate.bind(D(e)),e.onTogglePrice=e.onTogglePrice.bind(D(e)),e.state={route:e.props.attributes.route,loading:!1,error:!1},e}return r=p,(a=[{key:"componentDidMount",value:(s=R(regeneratorRuntime.mark((function e(){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"}),this.loadCategories());case 2:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"componentDidUpdate",value:(n=R(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 t=this,r=this.props.attributes.feeds;if(void 0!==r){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}(r,this.props.attributes.categories)){var a=r;r=e.stringify({category:a},{arrayFormat:"bracket"})}else r=r.replace(/\s/g,"").split(",").filter((function(e){return""!==e})),r=e.stringify({url:r},{arrayFormat:"bracket"});this.setState({route:"home",loading:!0}),H({path:"/feedzy/v1/feed?".concat(r),method:"POST",data:this.props.attributes}).then((function(e){return t.unmounting?e:e.error?(t.setState({route:"home",loading:!1,error:!0}),e):(t.props.setAttributes({feedData:e}),t.setState({route:"fetched",loading:!1}),e)})).fail((function(e){return t.setState({route:"home",loading:!1,error:!0}),e}))}}},{key:"loadCategories",value:function(){var e=this;H({path:"/wp/v2/feedzy_categories"}).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({source:a,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){this.props.setAttributes({title:Number(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:"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:"render",value:function(){var e,t,r,a,n,s,o=this;return["fetched"===this.state.route&&wp.element.createElement(N,F({edit:this,state:this.state},this.props)),"home"===this.state.route&&wp.element.createElement("div",{className:this.props.className},wp.element.createElement(q,{key:"placeholder",icon:"rss",label:M("Feedzy RSS Feeds")},this.state.loading?wp.element.createElement("div",{key:"loading",className:"wp-block-embed is-loading"},wp.element.createElement(G,null),wp.element.createElement("p",null,M("Fetching..."))):[wp.element.createElement(W,{type:"url",className:"feedzy-source",placeholder:M("Enter URL or category of your feed here..."),onChange:this.onChangeFeed,value:this.props.attributes.feeds}),wp.element.createElement(Q,{isLarge:!0,isPrimary:!0,type:"submit",onClick:this.loadFeed},M("Load Feed")),wp.element.createElement(V,{href:this.getValidateURL(),title:M("Validate Feed ")},M("Validate ")),this.state.error&&wp.element.createElement("div",null,M("Feed URL is invalid. Invalid feeds will NOT display items."))])),!("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"},S(this.props.attributes.feedData.channel.title)),wp.element.createElement("span",{className:"rss_description"}," "+S(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=this.props.attributes.keywords_title,a=this.props.attributes.keywords_ban,n=this.props.attributes.max,s=this.props.attributes.offset,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.split(",").filter((function(e){return""!==e.replace(/\s/g,"")})).some((function(t){return e.title.includes(t.trim())}))})).filter((function(e){return!a||a.split(",").filter((function(e){return""!==e.replace(/\s/g,"")})).every((function(t){return!1===e.title.includes(t.trim())}))})).slice(s,n+s)).map((function(e,t){var r=(e.date||"")+" "+(e.time||"")+" UTC +0000",a=S(e.date)||"",n=S(e.time)||"",s=S(e.categories)||"";if(o.metaExists("tz=local")){var i=new Date(r);i=i.toUTCString(),a=moment.utc(i).format("MMMM D, YYYY"),n=moment.utc(i).format("h:mm A")}var l=e.creator&&o.metaExists("author")?e.creator:"";""!==o.props.attributes.multiple_meta&&"no"!==o.props.attributes.multiple_meta&&((o.multipleMetaExists("source")||o.multipleMetaExists("yes"))&&""!==l&&""!==e.source?l=l+" ("+e.source+")":(o.multipleMetaExists("source")||o.multipleMetaExists("yes"))&&""!==e.source&&(l=e.source));var p=new Object;return p.author=M("by")+" "+l,p.date=M("on")+" "+S(a),p.time=M("at")+" "+S(n),p.categories=M("in")+" "+S(s),wp.element.createElement("li",{key:t,style:{padding:"15px 0 25px"},className:"rss_item feedzy-rss-col-".concat(o.props.attributes.columns)},(e.thumbnail&&"auto"===o.props.attributes.thumb||"yes"===o.props.attributes.thumb)&&wp.element.createElement("div",{className:"rss_image",style:{width:o.props.attributes.size+"px",height:o.props.attributes.size+"px"}},wp.element.createElement("a",{title:S(e.title),style:{width:o.props.attributes.size+"px",height:o.props.attributes.size+"px"}},wp.element.createElement("span",{className:"fetched",style:{width:o.props.attributes.size+"px",height:o.props.attributes.size+"px",backgroundImage:o.getImageURL(e,!0)},title:S(e.title)}))),wp.element.createElement("div",{className:"rss_content_wrap"},wp.element.createElement("span",{className:"title"},wp.element.createElement("a",null,o.props.attributes.title&&S(e.title).length>o.props.attributes.title?S(e.title).substring(0,o.props.attributes.title)+"...":S(e.title))),wp.element.createElement("div",{className:"rss_content"},"no"!==o.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}(p,o.props.attributes.metafields)),o.props.attributes.summary&&wp.element.createElement("p",{className:"description"},o.props.attributes.summarylength&&S(e.description).length>o.props.attributes.summarylength?S(e.description).substring(0,o.props.attributes.summarylength)+" [...]":S(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}),M("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&&o.props.attributes.price&&e.price&&"default"!==o.props.attributes.template&&wp.element.createElement("div",{className:"price-wrap"},wp.element.createElement("a",null,wp.element.createElement("button",{className:"price"},e.price))))))}))))]}}])&&L(r.prototype,a),p}(K);var X=wp.i18n.__;(0,wp.blocks.registerBlockType)("feedzy-rss-feeds/feedzy-block",{title:X("Feedzy RSS Feeds"),category:"common",icon:"rss",keywords:[X("Feedzy RSS Feeds"),X("RSS"),X("Feeds")],supports:{html:!1},attributes:{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_ban:{type:"string"},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"}},edit:J,save:function(){return null}})})()})();
|
includes/gutenberg/feedzy-rss-feeds-gutenberg-block.php
CHANGED
@@ -56,8 +56,19 @@ class Feedzy_Rss_Feeds_Gutenberg_Block {
|
|
56 |
$version = $this->version;
|
57 |
}
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
// Enqueue the bundled block JS file
|
60 |
-
wp_enqueue_script( 'feedzy-gutenberg-block-js', FEEDZY_ABSURL . 'includes/gutenberg/build/block.js',
|
61 |
|
62 |
// Pass in REST URL
|
63 |
wp_localize_script(
|
@@ -295,6 +306,7 @@ class Feedzy_Rss_Feeds_Gutenberg_Block {
|
|
295 |
|
296 |
// manually delete the transient so that correct cache time can be used.
|
297 |
if ( ! defined( 'TI_CYPRESS_TESTING' ) ) {
|
|
|
298 |
delete_transient( 'feed_' . md5( $url ) );
|
299 |
}
|
300 |
|
56 |
$version = $this->version;
|
57 |
}
|
58 |
|
59 |
+
// Dependent WordPress core libraries.
|
60 |
+
$depends = array( 'wp-i18n', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-editor', 'wp-api', 'lodash' );
|
61 |
+
|
62 |
+
// Remove "wp-editor" script for widget block.
|
63 |
+
if ( wp_use_widgets_block_editor() && wp_script_is( 'wp-edit-widgets' ) ) {
|
64 |
+
$index = array_search( 'wp-editor', $depends, true );
|
65 |
+
if ( false !== $index ) {
|
66 |
+
unset( $depends[ $index ] );
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
// Enqueue the bundled block JS file
|
71 |
+
wp_enqueue_script( 'feedzy-gutenberg-block-js', FEEDZY_ABSURL . 'includes/gutenberg/build/block.js', $depends, $version, true );
|
72 |
|
73 |
// Pass in REST URL
|
74 |
wp_localize_script(
|
306 |
|
307 |
// manually delete the transient so that correct cache time can be used.
|
308 |
if ( ! defined( 'TI_CYPRESS_TESTING' ) ) {
|
309 |
+
$url = md5( is_array( $url ) ? implode( ', ', $url ) : $url );
|
310 |
delete_transient( 'feed_' . md5( $url ) );
|
311 |
}
|
312 |
|
includes/views/css/import-metabox-edit.css
CHANGED
@@ -1807,7 +1807,7 @@ a:focus.dropdown-item {
|
|
1807 |
border: 1px solid #ddd;
|
1808 |
border-radius: 4px;
|
1809 |
color: #888;
|
1810 |
-
background: #fff;
|
1811 |
box-shadow: none;
|
1812 |
font-family: "Roboto", sans-serif;
|
1813 |
font-size: 16px;
|
@@ -2214,4 +2214,21 @@ span.feedzy-spinner {
|
|
2214 |
|
2215 |
#TB_ajaxContent div.dry_run span i.fail {
|
2216 |
color: #ca4a1f;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2217 |
}
|
1807 |
border: 1px solid #ddd;
|
1808 |
border-radius: 4px;
|
1809 |
color: #888;
|
1810 |
+
background: #fff !important;
|
1811 |
box-shadow: none;
|
1812 |
font-family: "Roboto", sans-serif;
|
1813 |
font-size: 16px;
|
2214 |
|
2215 |
#TB_ajaxContent div.dry_run span i.fail {
|
2216 |
color: #ca4a1f;
|
2217 |
+
}
|
2218 |
+
|
2219 |
+
.custom_fields .ui-autocomplete-loading {
|
2220 |
+
background: url('../../../img/spin_light.gif') right center no-repeat !important;
|
2221 |
+
-webkit-transition: none !important;
|
2222 |
+
transition: none !important;
|
2223 |
+
}
|
2224 |
+
.ui-autocomplete {
|
2225 |
+
max-height: 150px;
|
2226 |
+
overflow-y: auto;
|
2227 |
+
overflow-x: hidden;
|
2228 |
+
border-radius: 0 0 4px 4px;
|
2229 |
+
background-clip: padding-box;
|
2230 |
+
border: 1px solid #ddd;
|
2231 |
+
border-top: 0;
|
2232 |
+
background: #fff;
|
2233 |
+
box-shadow: 0 4px 5px rgb(0 0 0 / 15%);
|
2234 |
}
|
includes/views/js/import-metabox-edit.js
CHANGED
@@ -58,6 +58,7 @@
|
|
58 |
html_row = $( '#new_field_tpl' ).html();
|
59 |
$( '.custom_fields' ).append( html_row );
|
60 |
$( '.btn.btn-remove-fields' ).on( 'click', remove_row );
|
|
|
61 |
return false;
|
62 |
}
|
63 |
|
@@ -159,6 +160,7 @@
|
|
159 |
$( document ).ready(function() {
|
160 |
initImportScreen();
|
161 |
initSummary();
|
|
|
162 |
});
|
163 |
|
164 |
function initImportScreen() {
|
@@ -361,6 +363,49 @@
|
|
361 |
});
|
362 |
}
|
363 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
364 |
function showSpinner(el){
|
365 |
el.parent().find('.feedzy-spinner').addClass('is-active');
|
366 |
}
|
58 |
html_row = $( '#new_field_tpl' ).html();
|
59 |
$( '.custom_fields' ).append( html_row );
|
60 |
$( '.btn.btn-remove-fields' ).on( 'click', remove_row );
|
61 |
+
initCustomFieldAutoComplete();
|
62 |
return false;
|
63 |
}
|
64 |
|
160 |
$( document ).ready(function() {
|
161 |
initImportScreen();
|
162 |
initSummary();
|
163 |
+
initCustomFieldAutoComplete();
|
164 |
});
|
165 |
|
166 |
function initImportScreen() {
|
363 |
});
|
364 |
}
|
365 |
|
366 |
+
function initCustomFieldAutoComplete() {
|
367 |
+
$('input[name="custom_vars_key[]"]').autocomplete( {
|
368 |
+
minLength: 0,
|
369 |
+
source: function (request, response) {
|
370 |
+
jQuery.post(ajaxurl, {
|
371 |
+
security: feedzy.ajax.security,
|
372 |
+
'action': 'feedzy',
|
373 |
+
'_action': 'fetch_custom_fields',
|
374 |
+
post_type: $('#feedzy_post_type').val(),
|
375 |
+
search_key: request.term
|
376 |
+
}, function (res) {
|
377 |
+
if (res.success) {
|
378 |
+
response(res.data);
|
379 |
+
} else {
|
380 |
+
response(
|
381 |
+
[
|
382 |
+
{
|
383 |
+
label: res.data.not_found_msg,
|
384 |
+
value: 'not_found_msg'
|
385 |
+
}
|
386 |
+
]
|
387 |
+
);
|
388 |
+
}
|
389 |
+
});
|
390 |
+
},
|
391 |
+
select: function (event, ui) {
|
392 |
+
if ( 'not_found_msg' === ui.item.value ) {
|
393 |
+
setTimeout( function() {
|
394 |
+
$(event.target).val('')
|
395 |
+
} );
|
396 |
+
}
|
397 |
+
},
|
398 |
+
focus: function() {
|
399 |
+
if ($(this).autocomplete('widget').is(':visible')) {
|
400 |
+
return;
|
401 |
+
}
|
402 |
+
$(this).autocomplete('search', $(this).val());
|
403 |
+
}
|
404 |
+
} ).on( 'click', function() {
|
405 |
+
$( this ).keydown();
|
406 |
+
} );
|
407 |
+
}
|
408 |
+
|
409 |
function showSpinner(el){
|
410 |
el.parent().find('.feedzy-spinner').addClass('is-active');
|
411 |
}
|
readme.txt
CHANGED
@@ -462,6 +462,21 @@ You have to check first if your feed is valid. Please test it here: https://vali
|
|
462 |
|
463 |
== Changelog ==
|
464 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
##### [Version 3.7.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v3.7.0...v3.7.1) (2021-07-07)
|
466 |
|
467 |
### Fixes
|
462 |
|
463 |
== Changelog ==
|
464 |
|
465 |
+
##### [Version 3.7.2](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v3.7.1...v3.7.2) (2021-08-04)
|
466 |
+
|
467 |
+
#### Features
|
468 |
+
- Add auto-populate dropdown for available meta fields for import wizzard
|
469 |
+
|
470 |
+
#### Fixes
|
471 |
+
|
472 |
+
- Fix broken icon issue in chosen dropdown
|
473 |
+
- Fix PHP notices on widget block area
|
474 |
+
- Add image dimensions support
|
475 |
+
- Fix PHP8 fatal error when use multiple feed in visual editor
|
476 |
+
|
477 |
+
|
478 |
+
|
479 |
+
|
480 |
##### [Version 3.7.1](https://github.com/Codeinwp/feedzy-rss-feeds/compare/v3.7.0...v3.7.1) (2021-07-07)
|
481 |
|
482 |
### Fixes
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInit3bc68f15086e1834a6e0a921a8469ebe::getLoader();
|
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,15 +22,15 @@ class ComposerAutoloaderInit199b618daa374bf13d1ae645672cdf7c
|
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
-
spl_autoload_register(array('
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
-
spl_autoload_unregister(array('
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
-
call_user_func(\Composer\Autoload\
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
@@ -51,19 +51,19 @@ class ComposerAutoloaderInit199b618daa374bf13d1ae645672cdf7c
|
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
-
$includeFiles = Composer\Autoload\
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
-
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
-
function
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInit3bc68f15086e1834a6e0a921a8469ebe
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
22 |
return self::$loader;
|
23 |
}
|
24 |
|
25 |
+
spl_autoload_register(array('ComposerAutoloaderInit3bc68f15086e1834a6e0a921a8469ebe', 'loadClassLoader'), true, true);
|
26 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
27 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit3bc68f15086e1834a6e0a921a8469ebe', 'loadClassLoader'));
|
28 |
|
29 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
30 |
if ($useStaticLoader) {
|
31 |
require __DIR__ . '/autoload_static.php';
|
32 |
|
33 |
+
call_user_func(\Composer\Autoload\ComposerStaticInit3bc68f15086e1834a6e0a921a8469ebe::getInitializer($loader));
|
34 |
} else {
|
35 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
36 |
foreach ($map as $namespace => $path) {
|
51 |
$loader->register(true);
|
52 |
|
53 |
if ($useStaticLoader) {
|
54 |
+
$includeFiles = Composer\Autoload\ComposerStaticInit3bc68f15086e1834a6e0a921a8469ebe::$files;
|
55 |
} else {
|
56 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
57 |
}
|
58 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
59 |
+
composerRequire3bc68f15086e1834a6e0a921a8469ebe($fileIdentifier, $file);
|
60 |
}
|
61 |
|
62 |
return $loader;
|
63 |
}
|
64 |
}
|
65 |
|
66 |
+
function composerRequire3bc68f15086e1834a6e0a921a8469ebe($fileIdentifier, $file)
|
67 |
{
|
68 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
69 |
require $file;
|
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 ComposerStaticInit199b618daa374bf13d1ae645672cdf7c
|
|
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 ComposerStaticInit3bc68f15086e1834a6e0a921a8469ebe
|
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 = ComposerStaticInit3bc68f15086e1834a6e0a921a8469ebe::$classMap;
|
21 |
|
22 |
}, null, ClassLoader::class);
|
23 |
}
|
vendor/composer/installed.php
CHANGED
@@ -1,22 +1,22 @@
|
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
-
'pretty_version' => 'v3.7.
|
4 |
-
'version' => '3.7.
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
-
'reference' => '
|
9 |
'name' => 'codeinwp/feedzy-rss-feeds',
|
10 |
'dev' => false,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/feedzy-rss-feeds' => array(
|
14 |
-
'pretty_version' => 'v3.7.
|
15 |
-
'version' => '3.7.
|
16 |
'type' => 'wordpress-plugin',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
-
'reference' => '
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/themeisle-sdk' => array(
|
1 |
<?php return array(
|
2 |
'root' => array(
|
3 |
+
'pretty_version' => 'v3.7.2',
|
4 |
+
'version' => '3.7.2.0',
|
5 |
'type' => 'wordpress-plugin',
|
6 |
'install_path' => __DIR__ . '/../../',
|
7 |
'aliases' => array(),
|
8 |
+
'reference' => '92aa8d2642396a8f0d55be66eb68fa3327fad795',
|
9 |
'name' => 'codeinwp/feedzy-rss-feeds',
|
10 |
'dev' => false,
|
11 |
),
|
12 |
'versions' => array(
|
13 |
'codeinwp/feedzy-rss-feeds' => array(
|
14 |
+
'pretty_version' => 'v3.7.2',
|
15 |
+
'version' => '3.7.2.0',
|
16 |
'type' => 'wordpress-plugin',
|
17 |
'install_path' => __DIR__ . '/../../',
|
18 |
'aliases' => array(),
|
19 |
+
'reference' => '92aa8d2642396a8f0d55be66eb68fa3327fad795',
|
20 |
'dev_requirement' => false,
|
21 |
),
|
22 |
'codeinwp/themeisle-sdk' => array(
|