Repository navigation
Rename the settings ability to core/settings-get - #1087
Conversation
Keep core/read-settings registered as a deprecated alias for a few releases, the same way #1002 handled the content and users renames.
|
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. |
✅ WordPress Plugin Check Report
📊 ReportAll checks passed! No errors or warnings found. 🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1087 +/- ##
==========================================
Coverage 81.53% 81.54%
Complexity 3071 3071
==========================================
Files 129 129
Lines 12253 12254 +1
==========================================
+ Hits 9991 9992 +1
Misses 2262 2262
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@dkotter probably worth pulling into the 1.4.0 release? |
Resolves the Gated_AbilitiesTest import conflict from the `core/settings-get` rename (WordPress#1087). Also marks Terms_Query as depending on core-object exposure, since `core/terms-query` now reads the `show_in_abilities` flag that Show_In_Abilities sets on `category` and `post_tag`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W6LxjEQnP4PPgXXvAM3M2F
…-get. Syncs the core PR with the WordPress/ai plugin, where the ability was renamed in WordPress/ai#1087. Renames the ability, its label (Read Settings -> Settings Get), the docblock references in option.php and abilities.php, the test file, its test methods, and the custom test option.
…-get. Syncs the core PR with the WordPress/ai plugin, where the ability was renamed in WordPress/ai#1087. Renames the ability, its label (Read Settings -> Settings Get), the docblock references in option.php and abilities.php, the test file, its test methods, and the custom test option.
This reverts commit 7f149df. The AI plugin labels the ability "Settings Get", in line with its other object-first abilities, since WordPress/ai#1087, which this PR carries over.
…-get. Syncs the core PR with the WordPress/ai plugin, where the ability was renamed in WordPress/ai#1087. Renames the ability, its label (Read Settings -> Settings Get), the docblock references in option.php and abilities.php, the test file, its test methods, and the custom test option.
This reverts commit 7f149df. The AI plugin labels the ability "Settings Get", in line with its other object-first abilities, since WordPress/ai#1087, which this PR carries over.

What?
Follow up to #1002.
Renames the settings ability so its name puts the object first, like the other core abilities:
core/read-settingsis nowcore/settings-getWhy?
#1002 renamed
core/read-contentandcore/read-userstocore/content-queryandcore/users-query. That leftcore/read-settingsas the only core ability still namedread-*. The settings ability returns a single map of setting values rather than a list of items, so "get" describes it better than "query".How?
Rename:
Settings_Get.Show_In_Abilitiesdocblocks, integration tests, the e2e helper plugin, and the e2e spec follow the new name. The spec file is renamed tocore-settings-get.spec.js.CHANGELOG.mdandreadme.txtkeep the old name because they describe released versions.Deprecated alias
The old name keeps working for a few releases:
core/read-settingsis registered as a deprecated alias withregister_deprecated_ability_alias(), the helper added in Rename the content and users abilities and remove ai/get-post-details #1002. The alias copies the label, description, category, schemas, and meta ofcore/settings-get, and forwards execution and permission checks to it. The description starts with a "Deprecated" note, and the meta carries adeprecatedentry with the version and the replacement name._deprecated_function().@todocomment for removal after a few releases.Testing Instructions
/wp-json/wp-abilities/v1/abilitiesand check thatcore/settings-getis listed. The old namecore/read-settingsis still listed, with "(deprecated)" in the label and adeprecatedentry in the meta.core/read-settingsand confirm it returns the same result ascore/settings-get. WithWP_DEBUGon, a deprecation notice is logged.Changelog Entry