From 1f816ad18d2f8384858604f382fc3d2898360a6a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 9 Nov 2019 13:05:02 +0000 Subject: [PATCH] Docs: Use the `{@see ...}` tag for the replacement in `@deprecated` tags, so that Developer Reference could automatically link to the replacement. Props jrf. See #48255. Built from https://develop.svn.wordpress.org/trunk@46685 git-svn-id: http://core.svn.wordpress.org/trunk@46485 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tag-form.php | 14 +++++++------- wp-admin/edit-tags.php | 12 ++++++------ wp-admin/includes/class-wp-screen.php | 12 ++++++------ wp-admin/includes/class-wp-terms-list-table.php | 4 ++-- wp-admin/includes/image-edit.php | 6 +++--- wp-admin/includes/meta-boxes.php | 2 +- wp-includes/capabilities.php | 5 +++-- wp-includes/class-wp-rewrite.php | 4 ++-- wp-includes/class-wp.php | 2 +- wp-includes/ms-blogs.php | 2 +- wp-includes/ms-site.php | 4 ++-- wp-includes/post.php | 2 +- wp-includes/rest-api/class-wp-rest-server.php | 3 ++- wp-includes/taxonomy.php | 4 ++-- wp-includes/user.php | 2 +- wp-includes/version.php | 2 +- wp-login.php | 2 +- 17 files changed, 42 insertions(+), 40 deletions(-) diff --git a/wp-admin/edit-tag-form.php b/wp-admin/edit-tag-form.php index cf5c80ffa2..a56ee93ff7 100644 --- a/wp-admin/edit-tag-form.php +++ b/wp-admin/edit-tag-form.php @@ -17,7 +17,7 @@ if ( 'category' == $taxonomy ) { * Fires before the Edit Category form. * * @since 2.1.0 - * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. * * @param WP_Term $tag Current category term object. */ @@ -27,7 +27,7 @@ if ( 'category' == $taxonomy ) { * Fires before the Edit Link Category form. * * @since 2.3.0 - * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. * * @param WP_Term $tag Current link category term object. */ @@ -37,7 +37,7 @@ if ( 'category' == $taxonomy ) { * Fires before the Edit Tag form. * * @since 2.5.0 - * @deprecated 3.0.0 Use {$taxonomy}_pre_edit_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_edit_form'} instead. * * @param WP_Term $tag Current tag term object. */ @@ -197,7 +197,7 @@ if ( isset( $tag->name ) ) { * Fires after the Edit Category form fields are displayed. * * @since 2.9.0 - * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead. * * @param WP_Term $tag Current category term object. */ @@ -207,7 +207,7 @@ if ( isset( $tag->name ) ) { * Fires after the Edit Link Category form fields are displayed. * * @since 2.9.0 - * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead. * * @param WP_Term $tag Current link category term object. */ @@ -217,7 +217,7 @@ if ( isset( $tag->name ) ) { * Fires after the Edit Tag form fields are displayed. * * @since 2.9.0 - * @deprecated 3.0.0 Use {$taxonomy}_edit_form_fields instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form_fields'} instead. * * @param WP_Term $tag Current tag term object. */ @@ -250,7 +250,7 @@ if ( 'category' == $taxonomy ) { * Fires at the end of the Edit Term form. * * @since 2.5.0 - * @deprecated 3.0.0 Use {$taxonomy}_edit_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_edit_form'} instead. * * @param WP_Term $tag Current taxonomy term object. */ diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index d2cda2c633..93d5b73258 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -374,7 +374,7 @@ if ( $can_edit_terms ) { * Fires before the Add Category form. * * @since 2.1.0 - * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. * * @param object $arg Optional arguments cast to an object. */ @@ -384,7 +384,7 @@ if ( $can_edit_terms ) { * Fires before the link category form. * * @since 2.3.0 - * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. * * @param object $arg Optional arguments cast to an object. */ @@ -394,7 +394,7 @@ if ( $can_edit_terms ) { * Fires before the Add Tag form. * * @since 2.5.0 - * @deprecated 3.0.0 Use {$taxonomy}_pre_add_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_pre_add_form'} instead. * * @param string $taxonomy The taxonomy slug. */ @@ -530,7 +530,7 @@ if ( $can_edit_terms ) { * Fires at the end of the Edit Category form. * * @since 2.1.0 - * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead. * * @param object $arg Optional arguments cast to an object. */ @@ -540,7 +540,7 @@ if ( $can_edit_terms ) { * Fires at the end of the Edit Link form. * * @since 2.3.0 - * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead. * * @param object $arg Optional arguments cast to an object. */ @@ -550,7 +550,7 @@ if ( $can_edit_terms ) { * Fires at the end of the Add Tag form. * * @since 2.7.0 - * @deprecated 3.0.0 Use {$taxonomy}_add_form instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_add_form'} instead. * * @param string $taxonomy The taxonomy slug. */ diff --git a/wp-admin/includes/class-wp-screen.php b/wp-admin/includes/class-wp-screen.php index ccb7126530..dbd796593c 100644 --- a/wp-admin/includes/class-wp-screen.php +++ b/wp-admin/includes/class-wp-screen.php @@ -790,8 +790,8 @@ final class WP_Screen { * Filters the legacy contextual help list. * * @since 2.7.0 - * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or - * get_current_screen()->remove_help_tab() instead. + * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or + * {@see get_current_screen()->remove_help_tab()} instead. * * @param array $old_compat_help Old contextual help. * @param WP_Screen $this Current WP_Screen instance. @@ -809,8 +809,8 @@ final class WP_Screen { * Filters the legacy contextual help text. * * @since 2.7.0 - * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or - * get_current_screen()->remove_help_tab() instead. + * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or + * {@see get_current_screen()->remove_help_tab()} instead. * * @param string $old_help Help text that appears on the screen. * @param string $screen_id Screen ID. @@ -830,8 +830,8 @@ final class WP_Screen { * Filters the default legacy contextual help text. * * @since 2.8.0 - * @deprecated 3.3.0 Use get_current_screen()->add_help_tab() or - * get_current_screen()->remove_help_tab() instead. + * @deprecated 3.3.0 Use {@see get_current_screen()->add_help_tab()} or + * {@see get_current_screen()->remove_help_tab()} instead. * * @param string $old_help_default Default contextual help text. */ diff --git a/wp-admin/includes/class-wp-terms-list-table.php b/wp-admin/includes/class-wp-terms-list-table.php index a537311d40..125d3366b5 100644 --- a/wp-admin/includes/class-wp-terms-list-table.php +++ b/wp-admin/includes/class-wp-terms-list-table.php @@ -93,7 +93,7 @@ class WP_Terms_List_Table extends WP_List_Table { * Filters the number of terms displayed per page for the Tags list table. * * @since 2.7.0 - * @deprecated 2.8.0 Use edit_tags_per_page instead. + * @deprecated 2.8.0 Use {@see 'edit_tags_per_page'} instead. * * @param int $tags_per_page Number of tags to be displayed. Default 20. */ @@ -502,7 +502,7 @@ class WP_Terms_List_Table extends WP_List_Table { * Filters the action links displayed for each term in the Tags list table. * * @since 2.8.0 - * @deprecated 3.0.0 Use {$taxonomy}_row_actions instead. + * @deprecated 3.0.0 Use {@see '{$taxonomy}_row_actions'} instead. * * @param string[] $actions An array of action links to be displayed. Default * 'Edit', 'Quick Edit', 'Delete', and 'View'. diff --git a/wp-admin/includes/image-edit.php b/wp-admin/includes/image-edit.php index 519100acc3..02ab041840 100644 --- a/wp-admin/includes/image-edit.php +++ b/wp-admin/includes/image-edit.php @@ -287,7 +287,7 @@ function wp_stream_image( $image, $mime_type, $attachment_id ) { * Filters the GD image resource to be streamed to the browser. * * @since 2.9.0 - * @deprecated 3.5.0 Use image_editor_save_pre instead. + * @deprecated 3.5.0 Use {@see 'image_editor_save_pre'} instead. * * @param resource $image Image resource to be streamed. * @param int $attachment_id The attachment post ID. @@ -362,7 +362,7 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) { * returning that value instead. * * @since 2.9.0 - * @deprecated 3.5.0 Use wp_save_image_editor_file instead. + * @deprecated 3.5.0 Use {@see 'wp_save_image_editor_file'} instead. * * @param mixed $override Value to return instead of saving. Default null. * @param string $filename Name of the file to be saved. @@ -565,7 +565,7 @@ function image_edit_apply_changes( $image, $changes ) { * Filters the GD image resource before applying changes to the image. * * @since 2.9.0 - * @deprecated 3.5.0 Use wp_image_editor_before_change instead. + * @deprecated 3.5.0 Use {@see 'wp_image_editor_before_change'} instead. * * @param resource $image GD image resource. * @param array $changes Array of change operations. diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 4cf7378501..ae246f8b76 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -1504,7 +1504,7 @@ function register_and_do_post_meta_boxes( $post ) { * Fires in the middle of built-in meta box registration. * * @since 2.1.0 - * @deprecated 3.7.0 Use 'add_meta_boxes' instead. + * @deprecated 3.7.0 Use {@see 'add_meta_boxes'} instead. * * @param WP_Post $post Post object. */ diff --git a/wp-includes/capabilities.php b/wp-includes/capabilities.php index 3903ea8f24..0c40c7e384 100644 --- a/wp-includes/capabilities.php +++ b/wp-includes/capabilities.php @@ -354,8 +354,9 @@ function map_meta_cap( $cap, $user_id, ...$args ) { * The dynamic portion of the hook name, `$meta_key`, refers to the meta key passed to map_meta_cap(). * * @since 4.6.0 As `auth_post_{$post_type}_meta_{$meta_key}`. - * @since 4.7.0 - * @deprecated 4.9.8 Use `auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}` + * @since 4.7.0 Renamed from `auth_post_{$post_type}_meta_{$meta_key}` to + * `auth_{$object_type}_{$object_subtype}_meta_{$meta_key}`. + * @deprecated 4.9.8 Use {@see 'auth_{$object_type}_meta_{$meta_key}_for_{$object_subtype}'} instead. * * @param bool $allowed Whether the user can add the object meta. Default false. * @param string $meta_key The meta key. diff --git a/wp-includes/class-wp-rewrite.php b/wp-includes/class-wp-rewrite.php index 5a86ecaa50..6fe36f7591 100644 --- a/wp-includes/class-wp-rewrite.php +++ b/wp-includes/class-wp-rewrite.php @@ -1407,7 +1407,7 @@ class WP_Rewrite { * Filters rewrite rules used specifically for Tags. * * @since 2.3.0 - * @deprecated 3.1.0 Use 'post_tag_rewrite_rules' instead + * @deprecated 3.1.0 Use {@see 'post_tag_rewrite_rules'} instead. * * @param string[] $rules Array of rewrite rules generated for tags, keyed by their regex pattern. */ @@ -1556,7 +1556,7 @@ class WP_Rewrite { * Filters the list of rewrite rules formatted for output to an .htaccess file. * * @since 1.5.0 - * @deprecated 1.5.0 Use the mod_rewrite_rules filter instead. + * @deprecated 1.5.0 Use the {@see 'mod_rewrite_rules'} filter instead. * * @param string $rules mod_rewrite Rewrite rules formatted for .htaccess. */ diff --git a/wp-includes/class-wp.php b/wp-includes/class-wp.php index 846fa0ae18..6dbc7d4794 100644 --- a/wp-includes/class-wp.php +++ b/wp-includes/class-wp.php @@ -542,7 +542,7 @@ class WP { * Filters the query string before parsing. * * @since 1.5.0 - * @deprecated 2.1.0 Use 'query_vars' or 'request' filters instead. + * @deprecated 2.1.0 Use {@see 'query_vars'} or {@see 'request'} filters instead. * * @param string $query_string The query string to modify. */ diff --git a/wp-includes/ms-blogs.php b/wp-includes/ms-blogs.php index 5de82cb7f4..82f48cb91e 100644 --- a/wp-includes/ms-blogs.php +++ b/wp-includes/ms-blogs.php @@ -249,7 +249,7 @@ function get_blog_details( $fields = null, $get_all = true ) { * Filters a blog's details. * * @since MU (3.0.0) - * @deprecated 4.7.0 Use site_details + * @deprecated 4.7.0 Use {@see 'site_details'} instead. * * @param object $details The blog details. */ diff --git a/wp-includes/ms-site.php b/wp-includes/ms-site.php index b98e17eaa4..729ecb9714 100644 --- a/wp-includes/ms-site.php +++ b/wp-includes/ms-site.php @@ -121,7 +121,7 @@ function wp_insert_site( array $data ) { * Fires immediately after a new site is created. * * @since MU (3.0.0) - * @deprecated 5.1.0 Use wp_insert_site + * @deprecated 5.1.0 Use {@see 'wp_insert_site'} instead. * * @param int $site_id Site ID. * @param int $user_id User ID. @@ -1026,7 +1026,7 @@ function clean_blog_cache( $blog ) { * Fires after the blog details cache is cleared. * * @since 3.4.0 - * @deprecated 4.9.0 Use clean_site_cache + * @deprecated 4.9.0 Use {@see 'clean_site_cache'} instead. * * @param int $blog_id Blog ID. */ diff --git a/wp-includes/post.php b/wp-includes/post.php index ba6b8cd24f..c6d25a65da 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -6737,7 +6737,7 @@ function _transition_post_status( $new_status, $old_status, $post ) { * Fires when a post's status is transitioned from private to published. * * @since 1.5.0 - * @deprecated 2.3.0 Use 'private_to_publish' instead. + * @deprecated 2.3.0 Use {@see 'private_to_publish'} instead. * * @param int $post_id Post ID. */ diff --git a/wp-includes/rest-api/class-wp-rest-server.php b/wp-includes/rest-api/class-wp-rest-server.php index de09c6c52e..9c7859b5ca 100644 --- a/wp-includes/rest-api/class-wp-rest-server.php +++ b/wp-includes/rest-api/class-wp-rest-server.php @@ -260,7 +260,8 @@ class WP_REST_Server { * Filters whether the REST API is enabled. * * @since 4.4.0 - * @deprecated 4.7.0 Use the rest_authentication_errors filter to restrict access to the API + * @deprecated 4.7.0 Use the {@see 'rest_authentication_errors'} filter to + * restrict access to the API. * * @param bool $rest_enabled Whether the REST API is enabled. Default true. */ diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index ff3d9d47fc..163b957b9e 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -4244,7 +4244,7 @@ function get_term_link( $term, $taxonomy = '' ) { * Filters the tag link. * * @since 2.3.0 - * @deprecated 2.5.0 Use 'term_link' instead. + * @deprecated 2.5.0 Use {@see 'term_link'} instead. * * @param string $termlink Tag link URL. * @param int $term_id Term ID. @@ -4256,7 +4256,7 @@ function get_term_link( $term, $taxonomy = '' ) { * Filters the category link. * * @since 1.5.0 - * @deprecated 2.5.0 Use 'term_link' instead. + * @deprecated 2.5.0 Use {@see 'term_link'} instead. * * @param string $termlink Category link URL. * @param int $term_id Term ID. diff --git a/wp-includes/user.php b/wp-includes/user.php index de8ce1bec3..f6b60db913 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -2273,7 +2273,7 @@ function get_password_reset_key( $user ) { * Use the {@see 'retrieve_password'} hook instead. * * @since 1.5.0 - * @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead. + * @deprecated 1.5.1 Misspelled. Use {@see 'retrieve_password'} hook instead. * * @param string $user_login The user login name. */ diff --git a/wp-includes/version.php b/wp-includes/version.php index 033813ee7f..17d08fc57f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.4-alpha-46684'; +$wp_version = '5.4-alpha-46685'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index 1e1ba5cc6a..ace097d9c0 100644 --- a/wp-login.php +++ b/wp-login.php @@ -141,7 +141,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) { * Filters the title attribute of the header logo above login form. * * @since 2.1.0 - * @deprecated 5.2.0 Use login_headertext + * @deprecated 5.2.0 Use {@see 'login_headertext'} instead. * * @param string $login_header_title Login header logo title attribute. */