From b855ffec3f87ae1716d203adb559b472eb78e083 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 1 Nov 2021 14:31:00 +0000 Subject: [PATCH] Docs: Add a `@since` note for the `rest_namespace` argument of `register_post_type()` and `register_taxonomy()`. Use 3-digit, x.x.x-style semantic versioning for `@since` tags of the `$rest_namespace` property in `WP_Post_Type` and `WP_Taxonomy`. Add a `@since` note to `WP_REST_Taxonomies_Controller::get_item_schema()` for the `visibility` and `rest_namespace` properties. The `rest_base` property was also added after the method was initially introduced, but that happened during the same release cycle, so it doesn't need a separate `@since` note. Follow-up to [38832], [39191], [42729], [51959], [51961], [51962], [51964]. See #53399. Built from https://develop.svn.wordpress.org/trunk@51965 git-svn-id: http://core.svn.wordpress.org/trunk@51554 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-post-type.php | 2 +- wp-includes/class-wp-taxonomy.php | 2 +- wp-includes/post.php | 1 + .../rest-api/endpoints/class-wp-rest-taxonomies-controller.php | 2 ++ wp-includes/taxonomy.php | 1 + wp-includes/version.php | 2 +- 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-includes/class-wp-post-type.php b/wp-includes/class-wp-post-type.php index e284994401..029bd26fe7 100644 --- a/wp-includes/class-wp-post-type.php +++ b/wp-includes/class-wp-post-type.php @@ -361,7 +361,7 @@ final class WP_Post_Type { /** * The namespace for this post type's REST API endpoints. * - * @since 5.9 + * @since 5.9.0 * @var string|bool $rest_namespace */ public $rest_namespace; diff --git a/wp-includes/class-wp-taxonomy.php b/wp-includes/class-wp-taxonomy.php index 21c954ad05..9ef1fdce4a 100644 --- a/wp-includes/class-wp-taxonomy.php +++ b/wp-includes/class-wp-taxonomy.php @@ -202,7 +202,7 @@ final class WP_Taxonomy { /** * The namespace for this taxonomy's REST API endpoints. * - * @since 5.9 + * @since 5.9.0 * @var string|bool $rest_namespace */ public $rest_namespace; diff --git a/wp-includes/post.php b/wp-includes/post.php index 5cd73d1bd8..0f75bf537e 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1371,6 +1371,7 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * arguments to register the post type in REST API. * @since 5.0.0 The `template` and `template_lock` arguments were added. * @since 5.3.0 The `supports` argument will now accept an array of arguments for a feature. + * @since 5.9.0 The `rest_namespace` argument was added. * * @global array $wp_post_types List of post types. * diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php index d05abcbcea..ede47585b1 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php @@ -301,6 +301,8 @@ class WP_REST_Taxonomies_Controller extends WP_REST_Controller { * Retrieves the taxonomy's schema, conforming to JSON Schema. * * @since 4.7.0 + * @since 5.0.0 The `visibility` property was added. + * @since 5.9.0 The `rest_namespace` property was added. * * @return array Item schema data. */ diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 0273a4aac7..5b1acb4fc6 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -355,6 +355,7 @@ function is_taxonomy_hierarchical( $taxonomy ) { * @since 5.1.0 Introduced `meta_box_sanitize_cb` argument. * @since 5.4.0 Added the registered taxonomy object as a return value. * @since 5.5.0 Introduced `default_term` argument. + * @since 5.9.0 Introduced `rest_namespace` argument. * * @global WP_Taxonomy[] $wp_taxonomies Registered taxonomies. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 842a401546..a1467effea 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51964'; +$wp_version = '5.9-alpha-51965'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.