Guidelines CPT: Rename references from content guidelines to guidelines#77223
Guidelines CPT: Rename references from content guidelines to guidelines#77223iamchughmayank wants to merge 4 commits intoWordPress:trunkfrom
Conversation
fdeaf8d to
3885710
Compare
|
Since this is experimental feature, perhaps, the Core back port may not be required. I understand that adding a specific label should skip the CI check failure of "Verify Core Backport" |
|
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. |
|
Nice, thank you for working on the follow-up. The changes are straightforward, so it mostly needs some testing. |
aagam-shah
left a comment
There was a problem hiding this comment.
Nice cleanup @iamchughmayank — the mechanical rename is thorough and consistent across PHP, JS, SCSS, and tests. A couple of concerns:
Incomplete JS/TS internal rename: The store STORE_NAME and CSS classes were renamed, but all JS/TS identifiers still say "ContentGuidelines" — fetchContentGuidelines, ContentGuidelinesState, coreContentGuidelinesStore, etc. Not blocking since these are private to the route package, but worth noting whether this is intentional or a follow-up.
Nit: package-lock.json includes an unrelated @babel/eslint-parser version hoist — lockfile regeneration noise.
|
Few observations:
|
What?
Follow-up to #77147 (CPT slug rename). See #76384.
Renames all internal references from "Content Guidelines" to "Guidelines" — class names, file names, directories, experiment flag, REST base, Redux store, CSS class prefix, meta keys, and route package name.
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).
In #77147, the CPT slug was aligned to
wp_guideline. As noted in the review, the rest of the code still referenced the old "Content Guidelines" naming. This PR completes thatalignment.
How?
PHP:
Gutenberg_Content_Guidelines_*→Gutenberg_Guidelines_*class-gutenberg-content-guidelines-*→class-gutenberg-guidelines-*lib/experimental/content-guidelines/→lib/experimental/guidelines/gutenberg_*_content_guidelines_*→gutenberg_*_guidelines_*Identifiers:
gutenberg-content-guidelines→gutenberg-guidelinescontent-guidelines→guidelines_content_guideline_*→_guideline_*core/content-guidelines→core/guidelines.content-guidelines__→.guidelines__@wordpress/content-guidelines-route→@wordpress/guidelines-routeUnchanged: Admin page slug (
guidelines-wp-admin), render function names that already use "guidelines" without "content".Testing Instructions
Setup:
npm run wp-env start/wp/v2/guidelinesreturns data while on the Guidelines admin page.vendor/bin/phpunit --filter Gutenberg_Guidelines— all 31 tests pass.npm run test:e2e -- test/e2e/specs/admin/guidelines.spec.js— all 3 tests pass.Testing Instructions for Keyboard
No special keyboard testing required.
Screenshots or screencast
No visual changes.
Use of AI Tools
Claude Opus used for planning the rename scope and executing the find-and-replace across the codebase.