Docs: Apply inline @see tags to hooks referenced in DocBlocks for wp-admin/* files.

Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.

Built from https://develop.svn.wordpress.org/trunk@37537


git-svn-id: http://core.svn.wordpress.org/trunk@37505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2016-05-23 17:28:27 +00:00
parent e52762a725
commit 1947f4d17c
11 changed files with 28 additions and 16 deletions

View File

@ -161,7 +161,7 @@ if ( current_user_can( 'manage_options' ) ) {
* Note, this does not just run on user-facing admin screens. * Note, this does not just run on user-facing admin screens.
* It runs on admin-ajax.php and admin-post.php as well. * It runs on admin-ajax.php and admin-post.php as well.
* *
* This is roughly analogous to the more general 'init' hook, which fires earlier. * This is roughly analogous to the more general {@see 'init'} hook, which fires earlier.
* *
* @since 2.5.0 * @since 2.5.0
*/ */

View File

@ -2552,7 +2552,7 @@ function wp_ajax_save_attachment_order() {
* Ajax handler for sending an attachment to the editor. * Ajax handler for sending an attachment to the editor.
* *
* Generates the HTML to send an attachment to the editor. * Generates the HTML to send an attachment to the editor.
* Backward compatible with the media_send_to_editor filter * Backward compatible with the {@see 'media_send_to_editor'} filter
* and the chain of filters that follow. * and the chain of filters that follow.
* *
* @since 3.5.0 * @since 3.5.0

View File

@ -134,8 +134,9 @@ class WP_Press_This {
$post_data['post_content'] = $this->side_load_images( $post_id, $post_data['post_content'] ); $post_data['post_content'] = $this->side_load_images( $post_id, $post_data['post_content'] );
/** /**
* Filters the post data of a Press This post before saving/updating, after * Filters the post data of a Press This post before saving/updating.
* side_load_images action had run. *
* The {@see 'side_load_images'} action has already run at this point.
* *
* @since 4.5.0 * @since 4.5.0
* *

View File

@ -1261,7 +1261,7 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) {
/** /**
* Display file upload quota on dashboard. * Display file upload quota on dashboard.
* *
* Runs on the activity_box_end hook in wp_dashboard_right_now(). * Runs on the {@see 'activity_box_end'} hook in wp_dashboard_right_now().
* *
* @since 3.0.0 * @since 3.0.0
* *

View File

@ -420,13 +420,15 @@ function _wp_handle_upload( &$file, $overrides, $time, $action ) {
} }
/** /**
* Wrapper for _wp_handle_upload(), passes 'wp_handle_upload' action. * Wrapper for _wp_handle_upload().
*
* Passes the {@see 'wp_handle_upload'} action.
* *
* @since 2.0.0 * @since 2.0.0
* *
* @see _wp_handle_upload() * @see _wp_handle_upload()
* *
* @param array $file Reference to a single element of $_FILES. Call the function once for * @param array $file Reference to a single element of `$_FILES`. Call the function once for
* each uploaded file. * each uploaded file.
* @param array|bool $overrides Optional. An associative array of names=>values to override default * @param array|bool $overrides Optional. An associative array of names=>values to override default
* variables. Default false. * variables. Default false.
@ -448,13 +450,15 @@ function wp_handle_upload( &$file, $overrides = false, $time = null ) {
} }
/** /**
* Wrapper for _wp_handle_upload(), passes 'wp_handle_sideload' action * Wrapper for _wp_handle_upload().
*
* Passes the {@see 'wp_handle_sideload'} action.
* *
* @since 2.6.0 * @since 2.6.0
* *
* @see _wp_handle_upload() * @see _wp_handle_upload()
* *
* @param array $file An array similar to that of a PHP $_FILES POST array * @param array $file An array similar to that of a PHP `$_FILES` POST array
* @param array|bool $overrides Optional. An associative array of names=>values to override default * @param array|bool $overrides Optional. An associative array of names=>values to override default
* variables. Default false. * variables. Default false.
* @param string $time Optional. Time formatted in 'yyyy/mm'. Default null. * @param string $time Optional. Time formatted in 'yyyy/mm'. Default null.

View File

@ -570,8 +570,10 @@ function media_buttons($editor_id = 'content') {
/** /**
* Filters the legacy (pre-3.5.0) media buttons. * Filters the legacy (pre-3.5.0) media buttons.
* *
* Use {@see 'media_buttons'} action instead.
*
* @since 2.5.0 * @since 2.5.0
* @deprecated 3.5.0 Use 'media_buttons' action instead. * @deprecated 3.5.0 Use {@see 'media_buttons'} action instead.
* *
* @param string $string Media buttons context. Default empty. * @param string $string Media buttons context. Default empty.
*/ */
@ -1132,7 +1134,7 @@ function media_post_single_attachment_fields_to_edit( $form_fields, $post ) {
* Filterss input from media_upload_form_handler() and assigns a default * Filterss input from media_upload_form_handler() and assigns a default
* post_title from the file name if none supplied. * post_title from the file name if none supplied.
* *
* Illustrates the use of the attachment_fields_to_save filter * Illustrates the use of the {@see 'attachment_fields_to_save'} filter
* which can be used to add default values to any field before saving to DB. * which can be used to add default values to any field before saving to DB.
* *
* @since 2.5.0 * @since 2.5.0

View File

@ -20,7 +20,7 @@ function got_mod_rewrite() {
* Filters whether Apache and mod_rewrite are present. * Filters whether Apache and mod_rewrite are present.
* *
* This filter was previously used to force URL rewriting for other servers, * This filter was previously used to force URL rewriting for other servers,
* like nginx. Use the got_url_rewrite filter in got_url_rewrite() instead. * like nginx. Use the {@see 'got_url_rewrite'} filter in got_url_rewrite() instead.
* *
* @since 2.5.0 * @since 2.5.0
* *

View File

@ -1815,7 +1815,9 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
} }
/** /**
* Refreshes the value of the options whitelist available via the 'whitelist_options' filter. * Refreshes the value of the options whitelist available via the 'whitelist_options' hook.
*
* See the {@see 'whitelist_options'} filter.
* *
* @since 2.7.0 * @since 2.7.0
* *

View File

@ -1383,7 +1383,8 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
* *
* Use the $sanitize argument to manually re-sanitize the option before returning errors. * Use the $sanitize argument to manually re-sanitize the option before returning errors.
* This is useful if you have errors or notices you want to show even when the user * This is useful if you have errors or notices you want to show even when the user
* hasn't submitted data (i.e. when they first load an options page, or in admin_notices action hook) * hasn't submitted data (i.e. when they first load an options page, or in the {@see 'admin_notices'}
* action hook).
* *
* @since 3.0.0 * @since 3.0.0
* *

View File

@ -275,7 +275,7 @@ function get_users_drafts( $user_id ) {
* Remove user and optionally reassign posts and links to another user. * Remove user and optionally reassign posts and links to another user.
* *
* If the $reassign parameter is not assigned to a User ID, then all posts will * If the $reassign parameter is not assigned to a User ID, then all posts will
* be deleted of that user. The action 'delete_user' that is passed the User ID * be deleted of that user. The action {@see 'delete_user'} that is passed the User ID
* being deleted will be run after the posts are either reassigned or deleted. * being deleted will be run after the posts are either reassigned or deleted.
* The user meta will also be deleted that are for that User ID. * The user meta will also be deleted that are for that User ID.
* *
@ -490,6 +490,8 @@ jQuery(document).ready( function($) {
/** /**
* Optional SSL preference that can be turned on by hooking to the 'personal_options' action. * Optional SSL preference that can be turned on by hooking to the 'personal_options' action.
* *
* See the {@see 'personal_options'} action.
*
* @since 2.7.0 * @since 2.7.0
* *
* @param object $user User data object * @param object $user User data object

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-alpha-37536'; $wp_version = '4.6-alpha-37537';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.