Skip to content

Commit ba8a12a

Browse files
Abilities API: Update the core/settings-get @SInCE tags to 7.2.0.
WordPress 7.1 has shipped, so the ability and the `show_in_abilities` setting argument now target 7.2.0.
1 parent bdd5973 commit ba8a12a

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

‎src/wp-includes/abilities/class-wp-settings-abilities.php‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* @package WordPress
66
* @subpackage Abilities API
7-
* @since 7.1.0
7+
* @since 7.2.0
88
*/
99

1010
declare( strict_types = 1 );
@@ -34,7 +34,7 @@
3434
* not part of the public API. It may be changed or removed at any time without notice.
3535
* Do not use it directly or rely on its existence.
3636
*
37-
* @since 7.1.0
37+
* @since 7.2.0
3838
*
3939
* @access private
4040
*/
@@ -43,7 +43,7 @@ final class WP_Settings_Abilities {
4343
/**
4444
* The ability category used for settings abilities.
4545
*
46-
* @since 7.1.0
46+
* @since 7.2.0
4747
* @var string
4848
*/
4949
private const CATEGORY = 'site';
@@ -54,7 +54,7 @@ final class WP_Settings_Abilities {
5454
* Cached so the input/output schema and the executed result derive from the exact same
5555
* structure, and {@see get_registered_settings()} is only walked once per request.
5656
*
57-
* @since 7.1.0
57+
* @since 7.2.0
5858
* @var array<string, array{option: string, group: string, default: mixed, schema: array<string, mixed>}>|null
5959
*/
6060
private $exposed_settings = null;
@@ -64,7 +64,7 @@ final class WP_Settings_Abilities {
6464
*
6565
* Must run on the `wp_abilities_api_init` hook.
6666
*
67-
* @since 7.1.0
67+
* @since 7.2.0
6868
*/
6969
public function register(): void {
7070
/*
@@ -97,7 +97,7 @@ public function register(): void {
9797
/**
9898
* Registers the read-only `core/settings-get` ability.
9999
*
100-
* @since 7.1.0
100+
* @since 7.2.0
101101
*/
102102
private function register_get_settings(): void {
103103
// Compute once; execute_get_settings() reuses this exact structure.
@@ -145,7 +145,7 @@ private function register_get_settings(): void {
145145
/**
146146
* Executes the `core/settings-get` ability.
147147
*
148-
* @since 7.1.0
148+
* @since 7.2.0
149149
*
150150
* @param mixed $input Optional. The ability input. Default empty array.
151151
* @return array<string, mixed> Map of exposed setting name to current value.
@@ -184,7 +184,7 @@ public function execute_get_settings( $input = array() ): array {
184184
/**
185185
* Checks whether the current user may use the settings abilities.
186186
*
187-
* @since 7.1.0
187+
* @since 7.2.0
188188
*
189189
* @return bool True if the current user can manage options.
190190
*/
@@ -198,7 +198,7 @@ public function has_permission(): bool {
198198
* Both `group` and `fields` are optional; supplying both narrows the response to their
199199
* intersection, and supplying neither returns every exposed setting.
200200
*
201-
* @since 7.1.0
201+
* @since 7.2.0
202202
*
203203
* @param list<string> $groups Available settings groups.
204204
* @param list<string> $field_names Available exposed setting names.
@@ -236,7 +236,7 @@ private function get_settings_input_schema( array $groups, array $field_names ):
236236
* underlying option name, the settings group, the registration default, and a JSON Schema
237237
* describing the value.
238238
*
239-
* @since 7.1.0
239+
* @since 7.2.0
240240
*
241241
* @return array<string, array{option: string, group: string, default: mixed, schema: array<string, mixed>}> Settings keyed by exposed name.
242242
*/
@@ -266,7 +266,7 @@ private function get_exposed_settings(): array {
266266
/**
267267
* Builds the JSON Schema describing a single setting's value.
268268
*
269-
* @since 7.1.0
269+
* @since 7.2.0
270270
*
271271
* @param array<string, mixed> $args The setting registration arguments.
272272
* @param bool|array<string, mixed> $show The setting's `show_in_abilities` value.
@@ -294,7 +294,7 @@ private function value_schema( array $args, $show ): array {
294294
/**
295295
* Casts a stored option value to the type declared in its settings registration.
296296
*
297-
* @since 7.1.0
297+
* @since 7.2.0
298298
*
299299
* @param mixed $value The raw option value.
300300
* @param string $type The registered setting type.

‎src/wp-includes/option.php‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,7 @@ function set_site_transient( $transient, $value, $expiration = 0 ) {
27402740
* @since 4.7.0
27412741
* @since 6.0.1 The `show_on_front`, `page_on_front`, and `page_for_posts` options were added.
27422742
* @since 7.2.0 The `wp_page_for_privacy_policy` option was registered, exposed as `page_for_privacy_policy`.
2743-
* @since 7.1.0 Added `show_in_abilities` support for the exposed settings.
2743+
* @since 7.2.0 Added `show_in_abilities` support for the exposed settings.
27442744
*/
27452745
function register_initial_settings() {
27462746
register_setting(
@@ -3015,7 +3015,7 @@ function register_initial_settings() {
30153015
* @since 5.5.0 `$new_whitelist_options` was renamed to `$new_allowed_options`.
30163016
* Please consider writing more inclusive code.
30173017
* @since 6.6.0 Added the `label` argument.
3018-
* @since 7.1.0 Added the `show_in_abilities` argument.
3018+
* @since 7.2.0 Added the `show_in_abilities` argument.
30193019
*
30203020
* @global array $new_allowed_options
30213021
* @global array $wp_registered_settings
@@ -3249,7 +3249,7 @@ function unregister_setting( $option_group, $option_name, $deprecated = '' ) {
32493249
* Retrieves an array of registered settings.
32503250
*
32513251
* @since 4.7.0
3252-
* @since 7.1.0 Registered setting data includes the `show_in_abilities` argument.
3252+
* @since 7.2.0 Registered setting data includes the `show_in_abilities` argument.
32533253
*
32543254
* @global array $wp_registered_settings
32553255
*

‎tests/phpunit/tests/abilities-api/wpRegisterCoreSettingsGetAbility.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Tests_Abilities_API_WpRegisterCoreSettingsGetAbility extends WP_UnitTestCa
3434
* that uses the Abilities API before the REST server loads. The ability must
3535
* self-register core's initial settings (see WP_Settings_Abilities::register()).
3636
*
37-
* @since 7.1.0
37+
* @since 7.2.0
3838
*/
3939
public static function set_up_before_class(): void {
4040
parent::set_up_before_class();
@@ -72,7 +72,7 @@ public static function set_up_before_class(): void {
7272
/**
7373
* Tear down after the class.
7474
*
75-
* @since 7.1.0
75+
* @since 7.2.0
7676
*/
7777
public static function tear_down_after_class(): void {
7878
add_action( 'wp_abilities_api_categories_init', '_unhook_core_ability_categories_registration', 1 );

0 commit comments

Comments
 (0)