Merged
Conversation
…-block [MOOSE-263] FE Announcement Block
…se into feature/announcements-be
Feature/announcements be
Contributor
Author
|
Hey @dpellenwood I believe both the FE & BE have gone through code reviews but I'd like to get another once-over on the whole feature from you before we merge. I'm going to get this feature into DQA/QA though, so no rush. |
dpellenwood
approved these changes
Oct 17, 2025
Collaborator
dpellenwood
left a comment
There was a problem hiding this comment.
🟢 Just one tiny suggestion., This is good to merge, imho!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this do/fix?
This pull request introduces a new Announcements feature to the core plugin, enabling the definition, filtering, and rendering of announcements based on placement, page visibility, scheduling, and other rules. The implementation is modular, using a controller and a set of rule classes to determine which announcements should be shown in various contexts. Additionally, the necessary dependencies and block types are registered.
Announcements feature implementation:
Announcement_Controller, which retrieves and filters announcements for a given placement using a rule pipeline (placement, front page, page visibility, scheduling) (wp-content/plugins/core/src/Components/Announcements/Announcement_Controller.php).Rule_Interfaceto encapsulate announcement display logic:Placement_Rule: Filters by placementFront_Page_Rule: Handles front page display logicPage_Visibility_Rule: Handles inclusion/exclusion by page, taxonomy, or post typeScheduling_Rule: Enables time-based scheduling for announcementsRule_Interface: Defines the contract for all rulesAnnouncement_Renderer, which generates block markup for announcements and renders them as HTML (wp-content/plugins/core/src/Components/Announcements/Announcement_Renderer.php).Integration and registration:
tribe/announcement-renderer,tribe/announcements) in the block definer (wp-content/plugins/core/src/Blocks/Blocks_Definer.php).Announcement_Subscriberpost type and theAnnouncement_Metameta object in the core plugin and meta definer, respectively (wp-content/plugins/core/src/Core.php,wp-content/plugins/core/src/Object_Meta/Meta_Definer.php) [1] [2] [3].Developer tooling:
wp-content/themes/core/dist/directory from static analysis (phpstan.neon.dist).QA
Links to relevant issues
Screenshots/video:
Test Environment: