Skip to content

feat(rss): Hooks extending RSS#4055

Merged
Takshil-Kunadia merged 2 commits intotrunkfrom
feat/rss-extendible-hooks
Jul 1, 2025
Merged

feat(rss): Hooks extending RSS#4055
Takshil-Kunadia merged 2 commits intotrunkfrom
feat/rss-extendible-hooks

Conversation

@Takshil-Kunadia
Copy link
Copy Markdown
Collaborator

@Takshil-Kunadia Takshil-Kunadia commented Jun 30, 2025

All Submissions:

Changes proposed in this Pull Request:

Closes https://app.asana.com/1/26890605006346/project/1210562189110460/task/1210639782446443?focus=true .

Adds hooks and filters to support extending the RSS feeds functionalities via external plugin.

Filters:

  • newspack_rss_feed_settings - Add new default settings.
  • newspack_rss_saved_settings - Modify saved settings before processing.
  • newspack_rss_modify_save_settings - Process settings before saving.
  • newspack_rss_after_tracking_snippet - Modify content after tracking snippets are added.

Actions:

  • newspack_rss_render_content_settings - Add settings UI to content settings section.
  • newspack_rss_render_technical_settings - Add settings UI to technical settings section.
  • newspack_rss_modify_feed_query - Modify the feed query.

How to test the changes in this Pull Request:

  1. Create a new test plugin or use the one attached below
  2. Hook into the newly introduced actions and filters and register their corresponding callbacks.
  3. Create a New Feed > Check if the new settings appear in the Feed settings editor
  4. Make changes to the fields introduced via the plugin and check if they are saved.
  5. For changes affecting the content, Click on RSS/Atom feed link > check if the appropriate changes appear in the feed content.

Test Plugin:-

TEST_PLUGIN.md

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@Takshil-Kunadia Takshil-Kunadia marked this pull request as ready for review June 30, 2025 06:50
@Takshil-Kunadia Takshil-Kunadia requested a review from a team as a code owner June 30, 2025 06:50
@Takshil-Kunadia Takshil-Kunadia added the [Status] Needs Review The issue or pull request needs to be reviewed label Jun 30, 2025
@Takshil-Kunadia Takshil-Kunadia self-assigned this Jun 30, 2025
Copy link
Copy Markdown
Contributor

@leogermani leogermani left a comment

Choose a reason for hiding this comment

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

Please add doc blocks to the hooks following WP coding standards

@Takshil-Kunadia
Copy link
Copy Markdown
Collaborator Author

Added doc blocks for the hooks

@github-actions github-actions bot added [Status] Approved The pull request has been reviewed and is ready to merge and removed [Status] Needs Review The issue or pull request needs to be reviewed labels Jul 1, 2025
@Takshil-Kunadia Takshil-Kunadia merged commit da97ff4 into trunk Jul 1, 2025
8 checks passed
@Takshil-Kunadia Takshil-Kunadia deleted the feat/rss-extendible-hooks branch July 1, 2025 14:53
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 1, 2025

Hey @Takshil-Kunadia, good job getting this PR merged! 🎉

Now, the needs-changelog label has been added to it.

Please check if this PR needs to be included in the "Upcoming Changes" and "Release Notes" doc. If it doesn't, simply remove the label.

If it does, please add an entry to our shared document, with screenshots and testing instructions if applicable, then remove the label.

Thank you! ❤️

matticbot pushed a commit that referenced this pull request Jul 3, 2025
# [6.12.0-alpha.1](v6.11.2...v6.12.0-alpha.1) (2025-07-03)

### Bug Fixes

* **menu:** don't hide sponsors menu if the user can't see the newspack dashboard ([#4041](#4041)) ([f988bd2](f988bd2))
* saving name when registering user ([#4050](#4050)) ([498028e](498028e))
* **woocommerce-memberships:** prevent membership expiry if there's another active subscription ([#4009](#4009)) ([6b42cbd](6b42cbd))

### Features

* **capabilities:** add caps for RSS Feeds ([#3908](#3908)) ([2620c54](2620c54))
* **collections:** add hierarchical fields ([#4051](#4051)) ([3f5a704](3f5a704))
* **collections:** allow overriding "collection" names and slugs ([#4033](#4033)) ([f5523b0](f5523b0))
* **collections:** support multiple CTAs in collections meta ([#4049](#4049)) ([d445444](d445444))
* modal checkout for My Account's reorders ([#3988](#3988)) ([fd347bc](fd347bc))
* **my-account:** subscription payment notice ([#4029](#4029)) ([4b78d7f](4b78d7f))
* **rss:** Custom Tracking snippet ([#4047](#4047)) ([2e682c5](2e682c5))
* **rss:** Hooks extending RSS ([#4055](#4055)) ([da97ff4](da97ff4))
* **rss:** Skip non-distributable images ([#4052](#4052)) ([9fdfe78](9fdfe78))
* show "deleted" label on segments if list, subscription, or plan was deleted [NPPM-2031] ([#4021](#4021)) ([4dec8bb](4dec8bb))
* **woocommerce:** rename WooCommerce Payments to WooPay ([#4048](#4048)) ([1528cad](1528cad))
@matticbot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.12.0-alpha.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request Jul 14, 2025
# [6.12.0](v6.11.3...v6.12.0) (2025-07-14)

### Bug Fixes

* **menu:** don't hide sponsors menu if the user can't see the newspack dashboard ([#4041](#4041)) ([f988bd2](f988bd2))
* saving name when registering user ([#4050](#4050)) ([498028e](498028e))
* **woocommerce-memberships:** prevent membership expiry if there's another active subscription ([#4009](#4009)) ([6b42cbd](6b42cbd))

### Features

* **capabilities:** add caps for RSS Feeds ([#3908](#3908)) ([2620c54](2620c54))
* **collections:** add hierarchical fields ([#4051](#4051)) ([3f5a704](3f5a704))
* **collections:** allow overriding "collection" names and slugs ([#4033](#4033)) ([f5523b0](f5523b0))
* **collections:** support multiple CTAs in collections meta ([#4049](#4049)) ([d445444](d445444))
* modal checkout for My Account's reorders ([#3988](#3988)) ([fd347bc](fd347bc))
* **my-account:** subscription payment notice ([#4029](#4029)) ([4b78d7f](4b78d7f))
* **rss:** Custom Tracking snippet ([#4047](#4047)) ([2e682c5](2e682c5))
* **rss:** Hooks extending RSS ([#4055](#4055)) ([da97ff4](da97ff4))
* **rss:** Skip non-distributable images ([#4052](#4052)) ([9fdfe78](9fdfe78))
* show "deleted" label on segments if list, subscription, or plan was deleted [NPPM-2031] ([#4021](#4021)) ([4dec8bb](4dec8bb))
* **woocommerce:** rename WooCommerce Payments to WooPay ([#4048](#4048)) ([1528cad](1528cad))
@matticbot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 6.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released on @alpha released [Status] Approved The pull request has been reviewed and is ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants