Skip to content

Conversation

@girishpanchal30
Copy link
Contributor

Summary

Add the option for a fallback image and exclude the posts based on the keywords.

Will affect the visual aspect of the product

YES

Screenshots

image

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/feedzy-rss-feeds-pro/issues/906

@girishpanchal30 girishpanchal30 added the pr-checklist-skip Allow this Pull Request to skip checklist. label Aug 15, 2025
@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Aug 15, 2025
@pirate-bot
Copy link
Contributor

pirate-bot commented Aug 15, 2025

Plugin build for 6e9d107 is ready 🛎️!

Note

You can preview the changes in the Playground

@poonam279
Copy link

@girishpanchal30, The preview of the import currently shows all posts, without reflecting the filters applied (title keyword). This can be confusing for users, as they may assume the filters are not working.

To avoid this confusion, I suggest updating the notice in the preview modal to:
“Note: Preview does not display filtered results. Filters will be applied when posts are imported.”

At the moment, the preview modal displays this message:
“Please note that if some of these items have already been imported in previous runs with the same filters, they may be shown here but will not be imported again.”

Since this message is more relevant to repeated imports and not onboarding, I recommend replacing it with the updated text above to make the experience clearer.

Annotation on 2025-08-18 at 11-10-10

@Soare-Robert-Daniel
Copy link
Contributor

@girishpanchal30, for this, you can temporarily enable, in dry_run, the exc_key functionality if you want to make that filter work.

Here is how I did it.

diff --git a/includes/admin/feedzy-rss-feeds-import.php b/includes/admin/feedzy-rss-feeds-import.php
index 1a15d210..f05d6802 100644
--- a/includes/admin/feedzy-rss-feeds-import.php
+++ b/includes/admin/feedzy-rss-feeds-import.php
@@ -1389,6 +1389,7 @@ class Feedzy_Rss_Feeds_Import {
 
 		$fields = urldecode( isset( $_POST['fields'] ) ? sanitize_url( $_POST['fields'] ) : '' );
 		parse_str( $fields, $data );
+		$environment = isset( $data['environment'] ) ? sanitize_text_field( $data['environment'] ) : 'default';
 
 		$feedzy_meta_data = $data['feedzy_meta_data'];
 
@@ -1467,8 +1468,8 @@ class Feedzy_Rss_Feeds_Import {
 			$feedzy_meta_data['import_feed_limit'],
 			'', // should be empty.
 			$feedzy_meta_data['inc_key'],
-			feedzy_is_pro() ? 'keywords_exc' : '',
-			feedzy_is_pro() ? $feedzy_meta_data['exc_key'] : '',
+			feedzy_is_pro() || 'wizard' === $environment ? 'keywords_exc' : '',
+			feedzy_is_pro() || 'wizard' === $environment ? $feedzy_meta_data['exc_key'] : '',
 			feedzy_is_pro() ? 'keywords_ban' : '',
 			feedzy_is_pro() ? $feedzy_meta_data['exc_key'] : '',
 			implode( ',', $tags )
diff --git a/includes/layouts/setup-wizard.php b/includes/layouts/setup-wizard.php
index f493602d..852957fd 100644
--- a/includes/layouts/setup-wizard.php
+++ b/includes/layouts/setup-wizard.php
@@ -223,7 +223,7 @@ add_thickbox();
 													<?php esc_html_e( 'Exclude posts with title not containing', 'feedzy-rss-feeds' ); ?>
 												</label>
 												<div class="fz-form-group">
-													<input type="text" id="feedzy_exclude_title" name="feedzy_meta_data[exclude_post_title]" class="form-control" value="" />
+													<input type="text" id="feedzy_exclude_title" name="feedzy_meta_data[exc_key]" class="form-control" value="" />
 													<div class="help-text pt-8">
 														<?php esc_html_e( 'Posts will not be imported if their title includes these keywords.', 'feedzy-rss-feeds' ); ?>
 													</div>
diff --git a/js/feedzy-setup-wizard.js b/js/feedzy-setup-wizard.js
index 603308c2..48a40e60 100644
--- a/js/feedzy-setup-wizard.js
+++ b/js/feedzy-setup-wizard.js
@@ -212,7 +212,7 @@ jQuery(function ($) {
 					'select[name="feedzy_meta_data[import_post_status]"]'
 				).val(),
 				fallback_image: $('input[name="feedzy_meta_data[default_thumbnail_id]"]').val(),
-				excluded_post_title: $('input[name="feedzy_meta_data[exclude_post_title]"]').val(),
+				excluded_post_title: $('input[name="feedzy_meta_data[exc_key]"]').val(),
 				action: 'feedzy',
 				_action: 'wizard_import_feed',
 			},
@@ -466,6 +466,7 @@ jQuery(function ($) {
 				fields: $.param($fields),
 				action: 'feedzy',
 				_action: 'dry_run',
+				environment: 'wizard',
 			},
 			function(data) {
 				$('#TB_ajaxContent').addClass('loaded');

@ineagu, @poonam279, what do you think about having the Preview at Step 2 with the feed URL input? This way we do not have to worry about the settings, and the user can see what he expects to process with that feed.

CleanShot 2025-08-18 at 11 40 53@2x

@ineagu
Copy link
Contributor

ineagu commented Aug 18, 2025 via email

@girishpanchal30
Copy link
Contributor Author

I have moved the preview button to step 2 with the latest commit.
image

image

@poonam279
Copy link

@girishpanchal30, If the preview is displayed before applying any filters, then adding a notice might not be necessary.
@Soare-Robert-Daniel What do you think?

Currently, you can select multiple images for the fallback image:

Screenshot 2025-08-18 at 5 31 36 PM

The title filter we added during onboarding isn’t working in the import process and the filter option is locked.

Screenshot 2025-08-18 at 5 35 14 PM

@Soare-Robert-Daniel
Copy link
Contributor

@girishpanchal30, If the preview is displayed before applying any filters, then adding a notice might not be necessary. @Soare-Robert-Daniel What do you think?

I agree. No need for the notice, we just show what the feed contains.

The title filter we added during onboarding isn’t working in the import process and the filter option is locked.

@poonam279, this will work after we merge #1143

@girishpanchal30
Copy link
Contributor Author

I have removed the notice.

@poonam279
Copy link

Currently, you can select multiple images for the fallback image:

@girishpanchal30, will it remain like this?

@girishpanchal30
Copy link
Contributor Author

@poonam279, While creating a new import, we allow adding multiple fallback images, and the same logic applies here. However, if we want to restrict it to only one fallback image, we can do that as well.

@Soare-Robert-Daniel, what are your thoughts on this?

@Soare-Robert-Daniel
Copy link
Contributor

@Soare-Robert-Daniel, what are your thoughts on this?

I think we can keep it to one, since it is an onboarding, I do not expect the user to want many fallback images from the begging.

@girishpanchal30
Copy link
Contributor Author

I have fixed it with the latest commit.

@Soare-Robert-Daniel
Copy link
Contributor

I sent it to fix for a merge issue when the custom image fallback was not pulled, since it was behind an old pro check

CleanShot 2025-08-19 at 11 41 31@2x

Remove the old suggestion for filter since preview is now before the filter
@Soare-Robert-Daniel
Copy link
Contributor

I will merge this. Any issue will be reported and fixed on the Release PR

@Soare-Robert-Daniel Soare-Robert-Daniel merged commit 2ce8ba0 into development Aug 19, 2025
9 checks passed
@Soare-Robert-Daniel Soare-Robert-Daniel deleted the feat/pro/906 branch August 19, 2025 08:57
@poonam279
Copy link

@girishpanchal30 @Soare-Robert-Daniel, everything is working fine here. However, I noticed a change in the font size of heading in the onboarding wizard. I am not sure if it's intentional.

How it appears in the latest PR
Markup 2025-08-20 at 14 41 59

How it was previously
Screenshot 2025-08-20 at 2 51 05 PM

@ineagu
Copy link
Contributor

ineagu commented Aug 20, 2025

we can keep the smaller text here as well.

@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 5.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-complete The Pull Request checklist is complete. (automatic label) pr-checklist-skip Allow this Pull Request to skip checklist. released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants