Update/removing tags - #175
Open
amerk-sitecrafting wants to merge 5 commits into
Open
Conversation
amerk-sitecrafting
requested review from
rhendrickson-sc
and
a lite review from Copilot
August 21, 2026 20:27
Contributor
There was a problem hiding this comment.
Pull request overview
This PR moves tag-removal behavior into Conifer\Site, adds a new public helper for disabling tags on selected post types, and documents the new capability while adding integration tests to validate expected behavior.
Changes:
- Added
Site::disable_tags_for_post_types()plus private helpers to removepost_tagtaxonomy associations. - Added an integration test suite covering tag-removal behavior (including excluded post types).
- Updated
docs/site.mdwith corrected wording and new “Disabling Tags” documentation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| test/integration/SiteTagRemovalTest.php | Adds integration coverage for tag-removal helpers on Conifer\Site. |
| lib/Conifer/Site.php | Introduces new tag-removal methods and internal implementation. |
| docs/site.md | Fixes typos/wording and documents how to disable tags for specific post types. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+841
to
+846
| public function disable_tags_for_post_types(array $postTypes): void | ||
| { | ||
| foreach ($postTypes as $postType) { | ||
| $this->disable_tags_for_post_type($postType); | ||
| } | ||
| } |
Comment on lines
+888
to
+893
| private function disable_tags_for_post_type(string $postType): bool | ||
| { | ||
| remove_post_type_support($postType, 'post_tag'); | ||
|
|
||
| return unregister_taxonomy_for_object_type('post_tag', $postType); | ||
| } |
Deploying conifer-plugin with
|
| Latest commit: |
e49e397
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6e390db6.conifer-plugin.pages.dev |
| Branch Preview URL: | https://update-removing-tags.conifer-plugin.pages.dev |
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.
Ticket: # 234
Issue
Currently, removing tags is functionality that is hardcoded in Groot.
Solution
This update extracts that logic from Groot and adds it to Conifer's Site.php class. It also exposes additional functionality, allowing downstream users to explicitly disable tag support for specified post types.
Impact
This shouldn't affect any sites.
Usage Changes
Conifer now has a public
disable_tags_for_post_typesfunction which takes an array of post types and disables tags and unregisters taxonomies for those post types.It also includes a private
disable_tagsfunction, which disables tags for all post types excludingtribe_events.Considerations
There is one included comment in the code for a future consideration, Site.php:864
Testing
This update passes all tests and PHPStan