diff --git a/wp-includes/abilities/wp-core-abilities.php b/wp-includes/abilities/wp-core-abilities.php index 610cf68f27..de8acdfaab 100644 --- a/wp-includes/abilities/wp-core-abilities.php +++ b/wp-includes/abilities/wp-core-abilities.php @@ -8,6 +8,7 @@ */ declare( strict_types = 1 ); + /** * Registers the core ability categories. * @@ -44,16 +45,41 @@ function wp_register_core_abilities(): void { $category_site = 'site'; $category_user = 'user'; - $site_info_fields = array( - 'name', - 'description', - 'url', - 'wpurl', - 'admin_email', - 'charset', - 'language', - 'version', + $site_info_properties = array( + 'name' => array( + 'type' => 'string', + 'description' => __( 'The site title.' ), + ), + 'description' => array( + 'type' => 'string', + 'description' => __( 'The site tagline.' ), + ), + 'url' => array( + 'type' => 'string', + 'description' => __( 'The site home URL.' ), + ), + 'wpurl' => array( + 'type' => 'string', + 'description' => __( 'The WordPress installation URL.' ), + ), + 'admin_email' => array( + 'type' => 'string', + 'description' => __( 'The site administrator email address.' ), + ), + 'charset' => array( + 'type' => 'string', + 'description' => __( 'The site character encoding.' ), + ), + 'language' => array( + 'type' => 'string', + 'description' => __( 'The site language locale code.' ), + ), + 'version' => array( + 'type' => 'string', + 'description' => __( 'The WordPress version.' ), + ), ); + $site_info_fields = array_keys( $site_info_properties ); wp_register_ability( 'core/get-site-info', @@ -78,40 +104,7 @@ function wp_register_core_abilities(): void { ), 'output_schema' => array( 'type' => 'object', - 'properties' => array( - 'name' => array( - 'type' => 'string', - 'description' => __( 'The site title.' ), - ), - 'description' => array( - 'type' => 'string', - 'description' => __( 'The site tagline.' ), - ), - 'url' => array( - 'type' => 'string', - 'description' => __( 'The site home URL.' ), - ), - 'wpurl' => array( - 'type' => 'string', - 'description' => __( 'The WordPress installation URL.' ), - ), - 'admin_email' => array( - 'type' => 'string', - 'description' => __( 'The site administrator email address.' ), - ), - 'charset' => array( - 'type' => 'string', - 'description' => __( 'The site character encoding.' ), - ), - 'language' => array( - 'type' => 'string', - 'description' => __( 'The site language locale code.' ), - ), - 'version' => array( - 'type' => 'string', - 'description' => __( 'The WordPress version.' ), - ), - ), + 'properties' => $site_info_properties, 'additionalProperties' => false, ), 'execute_callback' => static function ( $input = array() ) use ( $site_info_fields ): array { diff --git a/wp-includes/version.php b/wp-includes/version.php index 2a1510dbca..cc3ef42898 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-beta1-61067'; +$wp_version = '6.9-beta1-61068'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-settings.php b/wp-settings.php index 471c22b0fd..20ee50276d 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -290,7 +290,7 @@ require ABSPATH . WPINC . '/abilities-api/class-wp-ability-categories-registry.p require ABSPATH . WPINC . '/abilities-api/class-wp-ability.php'; require ABSPATH . WPINC . '/abilities-api/class-wp-abilities-registry.php'; require ABSPATH . WPINC . '/abilities-api.php'; -require ABSPATH . WPINC . '/abilities/wp-core-abilities.php'; +require ABSPATH . WPINC . '/abilities.php'; require ABSPATH . WPINC . '/rest-api.php'; require ABSPATH . WPINC . '/rest-api/class-wp-rest-server.php'; require ABSPATH . WPINC . '/rest-api/class-wp-rest-response.php';