Skip to content

Restored legacy deletion settings to existing imports - #1309

Open
girishpanchal30 wants to merge 4 commits into
developmentfrom
bugfix/pro/1010
Open

Restored legacy deletion settings to existing imports#1309
girishpanchal30 wants to merge 4 commits into
developmentfrom
bugfix/pro/1010

Conversation

@girishpanchal30

@girishpanchal30 girishpanchal30 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Restored the legacy setting - auto-delete days for imported posts and delete attached media. The setting is only rendered for imports that already have it stored, so it won't create it for the rest.

Screenshots

image

Test instructions

  • Create a new import and set up the auto-delete days and delete attached media settings from the older version.
  • Verify that the settings are displayed in the import edit page and that they are saved correctly when updated.
  • Also verify that the settings are not displayed for new imports that don't have them stored.

Check before Pull Request is ready:

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

@pirate-bot pirate-bot added the pr-checklist-complete The Pull Request checklist is complete. (automatic label) label Aug 6, 2026
@pirate-bot

pirate-bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Plugin build for 0a2f9f0 is ready 🛎️!

Note

You can preview the changes in the Playground

@pirate-bot

pirate-bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🌍 i18n String Review Report

📊 Summary

Category Count
➕ Added 2
➖ Removed 0
🔄 Changed 0
Total 2
➕ Added Strings (2) - Click to expand
String Location Words Suggested Match
Delete the posts created for this import after ... includes/views/import-meta... 12 Delete the posts created from all feeds, after a number of days
Helpful if you want to remove stale or old item... includes/views/import-meta... 22 Helpful if you want to remove stale or old items automatically. If you choose 0, it will be considered the individual import setting.
Total 34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores legacy per-import post and media deletion settings only for imports that previously stored them.

Changes:

  • Restores legacy deletion controls and persistence behavior.
  • Adds PHPUnit coverage for visibility and saving.
  • Updates test bootstrap for SDK helpers.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
includes/admin/feedzy-rss-feeds-import.php Loads and saves legacy deletion metadata.
includes/views/import-metabox-edit.php Renders legacy deletion controls conditionally.
tests/test-import-legacy-settings.php Tests legacy setting visibility and persistence.
tests/bootstrap.php Reloads the SDK loader during test bootstrap.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread includes/views/import-metabox-edit.php Outdated
Comment thread includes/admin/feedzy-rss-feeds-import.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.

Suppressed comments (1)

includes/admin/feedzy-rss-feeds-import.php:765

  • Clearing the new number input submits an empty string (the field is not required). This branch then deletes import_feed_delete_days, so the legacy control disappears on the next edit and the import can fall back to the global deletion period instead of remaining disabled. Normalize an empty submitted value to the documented 0 state (or reject blank input) and add a regression test for this save path.
					if ( ( 'default_thumbnail_id' === $key || 'import_feed_delete_days' === $key ) && '0' === $value ) { // Mark the feed as having no default fallback image or auto-delete days (including the global fallback).

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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants