From 91464bce658541193a47886e0e5041c27f25851a Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Fri, 9 Feb 2018 16:55:31 +0000 Subject: [PATCH] Docs: Add missing code formatting to various `@since` entries. See #42505 Built from https://develop.svn.wordpress.org/trunk@42678 git-svn-id: http://core.svn.wordpress.org/trunk@42506 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 4 ++-- wp-includes/class-wp-customize-manager.php | 4 ++-- wp-includes/class-wp-roles.php | 2 +- wp-includes/comment.php | 4 ++-- wp-includes/functions.php | 10 +++++----- wp-includes/http.php | 2 +- wp-includes/link-template.php | 2 +- wp-includes/ms-blogs.php | 2 +- wp-includes/ms-functions.php | 20 +++++++++---------- wp-includes/post.php | 20 +++++++++---------- .../class-wp-rest-comments-controller.php | 2 +- .../class-wp-rest-posts-controller.php | 2 +- wp-includes/taxonomy.php | 2 +- wp-includes/template.php | 2 +- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- 16 files changed, 41 insertions(+), 41 deletions(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 2b1c5b1864..254c591982 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -219,7 +219,7 @@ function wp_get_plugin_file_editable_extensions( $plugin ) { * Filters file type extensions editable in the plugin editor. * * @since 2.8.0 - * @since 4.9.0 Adds $plugin param. + * @since 4.9.0 Added the `$plugin` parameter. * * @param string $plugin Plugin file. * @param array $editable_extensions An array of editable plugin file extensions. @@ -339,7 +339,7 @@ function wp_print_file_editor_templates() { * * @param array $args { * Args. Note that all of the arg values are already unslashed. They are, however, - * coming straight from $_POST and are not validated or sanitized in any way. + * coming straight from `$_POST` and are not validated or sanitized in any way. * * @type string $file Relative path to file. * @type string $plugin Plugin being edited. diff --git a/wp-includes/class-wp-customize-manager.php b/wp-includes/class-wp-customize-manager.php index 6d793d15db..a73d429111 100644 --- a/wp-includes/class-wp-customize-manager.php +++ b/wp-includes/class-wp-customize-manager.php @@ -240,7 +240,7 @@ final class WP_Customize_Manager { * Constructor. * * @since 3.4.0 - * @since 4.7.0 Added $args param. + * @since 4.7.0 Added `$args` parameter. * * @param array $args { * Args. @@ -1683,7 +1683,7 @@ final class WP_Customize_Manager { * incoming post data. * * @since 4.1.1 - * @since 4.7.0 Added $args param and merging with changeset values and stashed theme mods. + * @since 4.7.0 Added `$args` parameter and merging with changeset values and stashed theme mods. * * @param array $args { * Args. diff --git a/wp-includes/class-wp-roles.php b/wp-includes/class-wp-roles.php index fc8f1b1590..e696bc9fb9 100644 --- a/wp-includes/class-wp-roles.php +++ b/wp-includes/class-wp-roles.php @@ -76,7 +76,7 @@ class WP_Roles { * Constructor * * @since 2.0.0 - * @since 4.9.0 The $site_id argument was added. + * @since 4.9.0 The `$site_id` argument was added. * * @global array $wp_user_roles Used to set the 'roles' property value. * diff --git a/wp-includes/comment.php b/wp-includes/comment.php index e9c7457d5e..0d35f091f9 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -2594,7 +2594,7 @@ function do_all_pings() { * Perform trackbacks. * * @since 1.5.0 - * @since 4.7.0 $post_id can be a WP_Post object. + * @since 4.7.0 `$post_id` can be a WP_Post object. * * @global wpdb $wpdb WordPress database abstraction object. * @@ -2673,7 +2673,7 @@ function generic_ping( $post_id = 0 ) { * Pings back the links found in a post. * * @since 0.71 - * @since 4.7.0 $post_id can be a WP_Post object. + * @since 4.7.0 `$post_id` can be a WP_Post object. * * @param string $content Post content to check for links. If empty will retrieve from post. * @param int|WP_Post $post_id Post Object or ID. diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 89770f3cb5..f5a5642e17 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -231,7 +231,7 @@ function number_format_i18n( $number, $decimals = 0 ) { * Filters the number formatted based on the locale. * * @since 2.8.0 - * @since 4.9.0 The `$number` and `$decimals` arguments were added. + * @since 4.9.0 The `$number` and `$decimals` parameters were added. * * @param string $formatted Converted number in string format. * @param float $number The number to convert based on locale. @@ -3712,7 +3712,7 @@ function wp_is_numeric_array( $data ) { * Filters a list of objects, based on a set of key => value arguments. * * @since 3.0.0 - * @since 4.7.0 Uses WP_List_Util class. + * @since 4.7.0 Uses `WP_List_Util` class. * * @param array $list An array of objects to filter * @param array $args Optional. An array of key => value arguments to match @@ -3745,7 +3745,7 @@ function wp_filter_object_list( $list, $args = array(), $operator = 'and', $fiel * Filters a list of objects, based on a set of key => value arguments. * * @since 3.1.0 - * @since 4.7.0 Uses WP_List_Util class. + * @since 4.7.0 Uses `WP_List_Util` class. * * @param array $list An array of objects to filter. * @param array $args Optional. An array of key => value arguments to match @@ -3773,7 +3773,7 @@ function wp_list_filter( $list, $args = array(), $operator = 'AND' ) { * * @since 3.1.0 * @since 4.0.0 $index_key parameter added. - * @since 4.7.0 Uses WP_List_Util class. + * @since 4.7.0 Uses `WP_List_Util` class. * * @param array $list List of objects or arrays * @param int|string $field Field from the object to place instead of the entire object @@ -4575,7 +4575,7 @@ function wp_suspend_cache_invalidation( $suspend = true ) { * Determine whether a site is the main site of the current network. * * @since 3.0.0 - * @since 4.9.0 The $network_id parameter has been added. + * @since 4.9.0 The `$network_id` parameter was added. * * @param int $site_id Optional. Site ID to test. Defaults to current site. * @param int $network_id Optional. Network ID of the network to check for. diff --git a/wp-includes/http.php b/wp-includes/http.php index e73f1e686e..bba726748f 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -663,7 +663,7 @@ function ms_allowed_http_request_hosts( $is_external, $host ) { * when URL parsing failed. * * @since 4.4.0 - * @since 4.7.0 The $component parameter was added for parity with PHP's parse_url(). + * @since 4.7.0 The `$component` parameter was added for parity with PHP's `parse_url()`. * * @link https://secure.php.net/manual/en/function.parse-url.php * diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index 2772c0537f..31ac27d21f 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -3713,7 +3713,7 @@ function wp_get_canonical_url( $post = null ) { * Outputs rel=canonical for singular queries. * * @since 2.9.0 - * @since 4.6.0 Adjusted to use wp_get_canonical_url(). + * @since 4.6.0 Adjusted to use `wp_get_canonical_url()`. */ function rel_canonical() { if ( ! is_singular() ) { diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index b862037a0a..e455cecc7d 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -75,7 +75,7 @@ function get_blogaddress_by_name( $blogname ) { * Retrieves a sites ID given its (subdomain or directory) slug. * * @since MU (3.0.0) - * @since 4.7.0 Converted to use get_sites(). + * @since 4.7.0 Converted to use `get_sites()`. * * @param string $slug A site's slug. * @return int|null The site ID, or null if no site is found for the given slug. diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index c878739d6e..3b9ad0ef72 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -101,7 +101,7 @@ function get_active_blog_for_user( $user_id ) { * The count is cached and updated twice daily. This is not a live count. * * @since MU (3.0.0) - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. * @return int Number of active users on the network. @@ -116,8 +116,8 @@ function get_user_count( $network_id = null ) { * The count is cached and updated twice daily. This is not a live count. * * @since MU (3.0.0) - * @since 3.7.0 The $network_id parameter has been deprecated. - * @since 4.8.0 The $network_id parameter is now being used. + * @since 3.7.0 The `$network_id` parameter has been deprecated. + * @since 4.8.0 The `$network_id` parameter is now being used. * * @param int|null $network_id ID of the network. Default is the current network. * @return int Number of active sites on the network. @@ -2463,7 +2463,7 @@ function wp_schedule_update_network_counts() { * Update the network-wide counts for the current network. * * @since 3.1.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ @@ -2479,7 +2479,7 @@ function wp_update_network_counts( $network_id = null ) { * on a network when a site is created or its status is updated. * * @since 3.7.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ @@ -2510,7 +2510,7 @@ function wp_maybe_update_network_site_counts( $network_id = null ) { * on a network when a user is created or its status is updated. * * @since 3.7.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ @@ -2529,7 +2529,7 @@ function wp_maybe_update_network_user_counts( $network_id = null ) { * Update the network-wide site count. * * @since 3.7.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param int|null $network_id ID of the network. Default is the current network. */ @@ -2556,7 +2556,7 @@ function wp_update_network_site_counts( $network_id = null ) { * Update the network-wide user count. * * @since 3.7.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @global wpdb $wpdb WordPress database abstraction object. * @@ -2685,7 +2685,7 @@ function upload_size_limit_filter( $size ) { * Plugins can alter this criteria using the {@see 'wp_is_large_network'} filter. * * @since 3.3.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param string $using 'sites or 'users'. Default is 'sites'. * @param int|null $network_id ID of the network. Default is the current network. @@ -2703,7 +2703,7 @@ function wp_is_large_network( $using = 'sites', $network_id = null ) { * Filters whether the network is considered large. * * @since 3.3.0 - * @since 4.8.0 The $network_id parameter has been added. + * @since 4.8.0 The `$network_id` parameter has been added. * * @param bool $is_large_network Whether the network has more than 10000 users or sites. * @param string $component The component to count. Accepts 'users', or 'sites'. diff --git a/wp-includes/post.php b/wp-includes/post.php index ba59019870..281978eb8d 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -1004,7 +1004,7 @@ function get_post_type( $post = null ) { * Retrieves a post type object by name. * * @since 3.0.0 - * @since 4.6.0 Object returned is now an instance of WP_Post_Type. + * @since 4.6.0 Object returned is now an instance of `WP_Post_Type`. * * @global array $wp_post_types List of post types. * @@ -1067,8 +1067,8 @@ function get_post_types( $args = array(), $output = 'names', $operator = 'and' ) * @since 3.0.0 The `show_ui` argument is now enforced on the new post screen. * @since 4.4.0 The `show_ui` argument is now enforced on the post type listing * screen and post editing screen. - * @since 4.6.0 Post type object returned is now an instance of WP_Post_Type. - * @since 4.7.0 Introduced `show_in_rest`, 'rest_base' and 'rest_controller_class' + * @since 4.6.0 Post type object returned is now an instance of `WP_Post_Type`. + * @since 4.7.0 Introduced `show_in_rest`, `rest_base` and `rest_controller_class` * arguments to register the post type in REST API. * * @global array $wp_post_types List of post types. @@ -1214,7 +1214,7 @@ function register_post_type( $post_type, $args = array() ) { * Fires after a post type is registered. * * @since 3.3.0 - * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object. + * @since 4.6.0 Converted the `$post_type` parameter to accept a `WP_Post_Type` object. * * @param string $post_type Post type. * @param WP_Post_Type $post_type_object Arguments used to register the post type. @@ -1443,7 +1443,7 @@ function _post_type_meta_capabilities( $capabilities = null ) { * and `use_featured_image` labels. * @since 4.4.0 Added the `archives`, `insert_into_item`, `uploaded_to_this_item`, `filter_items_list`, * `items_list_navigation`, and `items_list` labels. - * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object. + * @since 4.6.0 Converted the `$post_type` parameter to accept a `WP_Post_Type` object. * @since 4.7.0 Added the `view_items` and `attributes` labels. * * @access private @@ -1712,7 +1712,7 @@ function set_post_type( $post_id = 0, $post_type = 'post' ) { * * @since 4.4.0 * @since 4.5.0 Added the ability to pass a post type name in addition to object. - * @since 4.6.0 Converted the `$post_type` parameter to accept a WP_Post_Type object. + * @since 4.6.0 Converted the `$post_type` parameter to accept a `WP_Post_Type` object. * * @param string|WP_Post_Type $post_type Post type name or object. * @return bool Whether the post type should be considered viewable. @@ -4248,8 +4248,8 @@ function wp_transition_post_status( $new_status, $old_status, $post ) { * Add a URL to those already pinged. * * @since 1.5.0 - * @since 4.7.0 $post_id can be a WP_Post object. - * @since 4.7.0 $uri can be an array of URIs. + * @since 4.7.0 `$post_id` can be a WP_Post object. + * @since 4.7.0 `$uri` can be an array of URIs. * * @global wpdb $wpdb WordPress database abstraction object. * @@ -4330,7 +4330,7 @@ function get_enclosed( $post_id ) { * * @since 1.5.0 * - * @since 4.7.0 $post_id can be a WP_Post object. + * @since 4.7.0 `$post_id` can be a WP_Post object. * * @param int|WP_Post $post_id Post ID or object. * @return array @@ -4358,7 +4358,7 @@ function get_pung( $post_id ) { * Retrieve URLs that need to be pinged. * * @since 1.5.0 - * @since 4.7.0 $post_id can be a WP_Post object. + * @since 4.7.0 `$post_id` can be a WP_Post object. * * @param int|WP_Post $post_id Post Object or ID * @return array diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php index 3f7a9ed554..e394ccebdf 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php @@ -578,7 +578,7 @@ class WP_REST_Comments_Controller extends WP_REST_Controller { * skipping further processing. * * @since 4.7.0 - * @since 4.8.0 $prepared_comment can now be a WP_Error to shortcircuit insertion. + * @since 4.8.0 `$prepared_comment` can now be a WP_Error to shortcircuit insertion. * * @param array|WP_Error $prepared_comment The prepared comment data for wp_insert_comment(). * @param WP_REST_Request $request Request used to insert the comment. diff --git a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php index 7d8b5d6109..0661152de6 100644 --- a/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php +++ b/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php @@ -1201,7 +1201,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller { * Sets the template for a post. * * @since 4.7.0 - * @since 4.9.0 Introduced the $validate parameter. + * @since 4.9.0 Added the `$validate` parameter. * * @param string $template Page template filename. * @param integer $post_id Post ID. diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 57e42e275a..8a8dcc09ca 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -3230,7 +3230,7 @@ function clean_taxonomy_cache( $taxonomy ) { * function only fetches relationship data that is already in the cache. * * @since 2.3.0 - * @since 4.7.0 Returns a WP_Error object if get_term() returns an error for + * @since 4.7.0 Returns a `WP_Error` object if `get_term()` returns an error for * any of the matched terms. * * @param int $id Term object ID. diff --git a/wp-includes/template.php b/wp-includes/template.php index b0b49fe06a..3168607412 100644 --- a/wp-includes/template.php +++ b/wp-includes/template.php @@ -477,7 +477,7 @@ function get_search_template() { * @since 4.4.0 `single-{post_type}-{post_name}.php` was added to the top of the template hierarchy. * @since 4.7.0 The decoded form of `single-{post_type}-{post_name}.php` was added to the top of the * template hierarchy when the post name contains multibyte characters. - * @since 4.7.0 {Post Type Template}.php was added to the top of the template hierarchy. + * @since 4.7.0 `{Post Type Template}.php` was added to the top of the template hierarchy. * * @see get_query_template() * diff --git a/wp-includes/user.php b/wp-includes/user.php index 9a685b9b36..5c1bf9a342 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -593,7 +593,7 @@ function get_users( $args = array() ) { * Get the sites a user belongs to. * * @since 3.0.0 - * @since 4.7.0 Converted to use get_sites(). + * @since 4.7.0 Converted to use `get_sites()`. * * @global wpdb $wpdb WordPress database abstraction object. * diff --git a/wp-includes/version.php b/wp-includes/version.php index 35114ab55c..f702837e37 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42677'; +$wp_version = '5.0-alpha-42678'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.