Guidelines CPT: Changes slug from wp_content_guidelines to wp_guidelines#77147
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
gziolo
left a comment
There was a problem hiding this comment.
These atomic changes look good. I couldn't locate more occurrences of wp_content_guideline. The rest of the code will need to be updated to reflect the changes, like the names of both modified classes and files.
Follow-up to #77147. That PR renames the Guidelines CPT slug but the feature has no end-to-end coverage, so there is no regression signal for changes that touch the CPT, REST controller, or admin page boot-up. This adds three Playwright specs that drive the UI the same way the PR's "Testing Instructions" do. See also #76390. This partially covers the scope of that issue on the e2e level. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
I verified this change locally by running a new e2e suite I put up in #77192 against this branch. All three specs pass with the renamed If you're open to it, it would be great to pull #77192 into your local branch (or rebase on top once it lands) and re-run |
Thanks! I pulled the linked PR with E2Es and the tests are working fine ( #77192 (comment) ) |
Follow-up to #77147. That PR renames the Guidelines CPT slug but the feature has no end-to-end coverage, so there is no regression signal for changes that touch the CPT, REST controller, or admin page boot-up. This adds three Playwright specs that drive the UI the same way the PR's "Testing Instructions" do. See also #76390. This partially covers the scope of that issue on the e2e level. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Follow-up to #77147. That PR renames the Guidelines CPT slug but the feature has no end-to-end coverage, so there is no regression signal for changes that touch the CPT, REST controller, or admin page boot-up. This adds three Playwright specs that drive the UI the same way the PR's "Testing Instructions" do. See also #76390. This partially covers the scope of that issue on the e2e level. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: gziolo <gziolo@git.wordpress.org> Co-authored-by: iamchughmayank <iamchughmayank@git.wordpress.org>
What?
Closes
See #76384
Renames the Content Guidelines custom post type slug from
wp_content_guidelinetowp_guideline.Why?
Before the 22.7 release, the public-facing name was simplified from "Content Guidelines" to just "Guidelines" — recognizing the feature extends beyond content to design guidelines, coding standards, and more (announcement
post).
This PR aligns the internal CPT slug with that direction. As noted in the core review comments,
wp_guidelinefollows WordPress's CPT naming convention (wp_block,wp_template,wp_global_styles).How?
Two changes:
Gutenberg_Content_Guidelines_Post_Type::POST_TYPEconstant →'wp_guideline'Gutenberg_Content_Guidelines_Revisions_Controllerconstructor default →'wp_guideline'All other code references the
POST_TYPEconstant, so they pick up the change automatically. Therest_baseremainscontent-guidelines. Meta keys (_content_guideline_*) are unchanged.Testing Instructions
Setup: Boot up local WordPress using
npm run wp-env startTesting Instructions for Keyboard
No special steps for keyboard testing required
Screenshots or screencast
No visual changes
Use of AI Tools
Claude Opus used for planning the task and creating summarised draft of PR description