From 33bd490b43358ff0b0d1ddf1e4a2b07d9d885a7c Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Tue, 11 Oct 2022 17:12:36 +0530 Subject: [PATCH 1/4] Remove unnecessary filter option Codeinwp/feedzy-rss-feeds-pro#493 --- includes/elementor/widgets/register-widget.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/includes/elementor/widgets/register-widget.php b/includes/elementor/widgets/register-widget.php index 5d6bb8aa..8f637368 100644 --- a/includes/elementor/widgets/register-widget.php +++ b/includes/elementor/widgets/register-widget.php @@ -156,10 +156,9 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl 'type' => Controls_Manager::SELECT, 'default' => 'title', 'options' => array( - 'title' => __( 'Title', 'feedzy-rss-feeds' ), - 'description' => __( 'Description', 'feedzy-rss-feeds' ), - 'author' => __( 'Author', 'feedzy-rss-feeds' ), - 'full-content' => __( 'Full Content', 'feedzy-rss-feeds' ), + 'title' => __( 'Title', 'feedzy-rss-feeds' ), + 'description' => __( 'Description', 'feedzy-rss-feeds' ), + 'author' => __( 'Author', 'feedzy-rss-feeds' ), ), 'classes' => $this->upsell_class(), ) @@ -181,10 +180,9 @@ protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDecl 'type' => Controls_Manager::SELECT, 'default' => 'title', 'options' => array( - 'title' => __( 'Title', 'feedzy-rss-feeds' ), - 'description' => __( 'Description', 'feedzy-rss-feeds' ), - 'author' => __( 'Author', 'feedzy-rss-feeds' ), - 'full-content' => __( 'Full Content', 'feedzy-rss-feeds' ), + 'title' => __( 'Title', 'feedzy-rss-feeds' ), + 'description' => __( 'Description', 'feedzy-rss-feeds' ), + 'author' => __( 'Author', 'feedzy-rss-feeds' ), ), 'separator' => 'before', 'classes' => $this->upsell_class(), From d17d176aa3de088f8e5a072d9a27181c2c920bd7 Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 20 Oct 2022 15:12:14 +0530 Subject: [PATCH 2/4] Fix keyword excluding issue Codeinwp/feedzy-rss-feeds-pro#494 --- includes/abstract/feedzy-rss-feeds-admin-abstract.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/abstract/feedzy-rss-feeds-admin-abstract.php b/includes/abstract/feedzy-rss-feeds-admin-abstract.php index 66e82fb4..f8685ad4 100644 --- a/includes/abstract/feedzy-rss-feeds-admin-abstract.php +++ b/includes/abstract/feedzy-rss-feeds-admin-abstract.php @@ -303,8 +303,8 @@ public function feedzy_feed_item_keywords_title( $continue, $sc, $item, $feed_ur return true; } - $inc_on = ! empty( $sc['keywords_inc_on'] ) ? $sc['keywords_inc_on'] : ''; - $exc_on = ! empty( $sc['keywords_exc_on'] ) ? $sc['keywords_exc_on'] : ''; + $inc_on = ! empty( $sc['keywords_inc_on'] ) ? $sc['keywords_inc_on'] : 'title'; + $exc_on = ! empty( $sc['keywords_exc_on'] ) ? $sc['keywords_exc_on'] : 'title'; if ( isset( $sc['keywords_inc'] ) && ! empty( $sc['keywords_inc'] ) ) { $keywords = $sc['keywords_inc']; From 98b99bb6bba813fc12f06f6557e4d72af566222e Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Thu, 20 Oct 2022 18:20:34 +0530 Subject: [PATCH 3/4] Fix remove all tag issue Codeinwp/feedzy-rss-feeds-pro#494 --- includes/views/js/import-metabox-edit.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/views/js/import-metabox-edit.js b/includes/views/js/import-metabox-edit.js index 229f13e3..d567acf6 100644 --- a/includes/views/js/import-metabox-edit.js +++ b/includes/views/js/import-metabox-edit.js @@ -463,7 +463,8 @@ } ) .on( 'removeTag', function( e, tagData ) { var target = $( e.target ); - if ( tagData.index <= 0 ) { + var emptyTags = target.parents( '.tag-list' ).find( '.tagify--empty' ).length; + if ( emptyTags ) { target.parents( '.tag-list' ).addClass( 'hidden' ); } } ); From e7bec2c329b26ea03f70e99518db6bf797510b2e Mon Sep 17 00:00:00 2001 From: girishpanchal30 Date: Fri, 21 Oct 2022 13:11:38 +0530 Subject: [PATCH 4/4] If the filter has already been added from the theme, avoid add_filter #687 --- .../feedzy-rss-feeds-admin-abstract.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/includes/abstract/feedzy-rss-feeds-admin-abstract.php b/includes/abstract/feedzy-rss-feeds-admin-abstract.php index 66e82fb4..6381da64 100644 --- a/includes/abstract/feedzy-rss-feeds-admin-abstract.php +++ b/includes/abstract/feedzy-rss-feeds-admin-abstract.php @@ -777,15 +777,17 @@ private function init_feed( $feed_url, $cache, $sc, $allow_https = FEEDZY_ALLOW_ if ( false === apply_filters( 'feedzy_disable_db_cache', false, $feed_url ) ) { SimplePie_Cache::register( 'wp_transient', 'WP_Feed_Cache_Transient' ); $feed->set_cache_location( 'wp_transient' ); + if ( ! has_filter( 'wp_feed_cache_transient_lifetime' ) ) { + add_filter( + 'wp_feed_cache_transient_lifetime', + function( $time ) use ( $cache_time ) { + return $cache_time; + }, + 10, + 1 + ); + } $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', $cache_time, $feed_url ) ); - add_filter( - 'wp_feed_cache_transient_lifetime', - function( $time ) use ( $cache_time ) { - return $cache_time; - }, - 10, - 1 - ); } else { require_once ABSPATH . 'wp-admin/includes/file.php'; WP_Filesystem();