You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bbc9c19
Browse filesBrowse the repository at this point in the historyBrowse files
Label the settings abilities Get Settings and Update Settings
"Settings Get" and "Settings Update" follow the ability names but do not
read as labels. The core abilities start with the verb, as in "Get Site
Information", and the core port uses "Get Settings" too.
Copy file name to clipboardExpand all lines: includes/Abilities/Settings/Settings.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ private function register_get_settings(): void {
143
143
wp_register_ability(
144
144
'core/settings-get',
145
145
array(
146
-
'label' => __( 'Settings Get', 'ai' ),
146
+
'label' => __( 'Get Settings', 'ai' ),
147
147
'description' => __( 'Returns WordPress settings as a flat map of setting name to value. By default returns all settings exposed to abilities, or optionally a subset filtered by settings group, by setting name, or both. A setting whose value does not match its schema is left out.', 'ai' ),
@@ -206,7 +206,7 @@ private function register_update_settings(): void {
206
206
wp_register_ability(
207
207
'core/settings-update',
208
208
array(
209
-
'label' => __( 'Settings Update', 'ai' ),
209
+
'label' => __( 'Update Settings', 'ai' ),
210
210
'description' => __( 'Updates WordPress settings exposed to abilities, except siteurl, admin_email, and wp_page_for_privacy_policy. Accepts a map of setting name to its new value, where null deletes the stored value so the setting falls back to its default. Returns the updated settings with their values after the update; a setting whose value does not match its schema is left out, as in core/settings-get.', 'ai' ),
@@ -475,7 +475,7 @@ public function test_registers_deprecated_read_settings_alias(): void {
475
475
$current = wp_get_ability( 'core/settings-get' );
476
476
477
477
$this->assertInstanceOf( WP_Ability::class, $alias, 'The deprecated core/read-settings alias should be registered.' );
478
-
$this->assertSame( 'Settings Get (deprecated)', $alias->get_label(), 'The alias label should mark it as deprecated.' );
478
+
$this->assertSame( 'Get Settings (deprecated)', $alias->get_label(), 'The alias label should mark it as deprecated.' );
479
479
$this->assertStringContainsString( 'Use `core/settings-get` instead.', $alias->get_description(), 'The alias description should name the replacement.' );
480
480
$this->assertSame( $current->get_category(), $alias->get_category(), 'The alias should share the replacement category.' );
481
481
$this->assertSame( $current->get_input_schema(), $alias->get_input_schema(), 'The alias should share the replacement input schema.' );
@@ -595,7 +595,7 @@ public function test_core_settings_update_ability_is_registered(): void {
0 commit comments