Skip to content

Commit 688019f

Browse files
remove duplicate variable
1 parent 54b48d6 commit 688019f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/wp-includes/abilities/wp-core-abilities.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,9 @@ function wp_register_core_abilities(): void {
114114
),
115115
'additionalProperties' => false,
116116
),
117-
'execute_callback' => static function ( $input = array() ): array {
117+
'execute_callback' => static function ( $input = array() ) use ( $site_info_fields ): array {
118118
$input = is_array( $input ) ? $input : array();
119-
$all_fields = array( 'name', 'description', 'url', 'wpurl', 'admin_email', 'charset', 'language', 'version' );
120-
$requested_fields = ! empty( $input['fields'] ) ? $input['fields'] : $all_fields;
119+
$requested_fields = ! empty( $input['fields'] ) ? $input['fields'] : $site_info_fields;
121120

122121
$result = array();
123122
foreach ( $requested_fields as $field ) {

0 commit comments

Comments
 (0)