Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* 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@37542


git-svn-id: http://core.svn.wordpress.org/trunk@37510 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Drew Jaynes 2016-05-23 18:59:27 +00:00
parent 9549a46d7c
commit da78aeffe9
9 changed files with 45 additions and 43 deletions

View File

@ -11,7 +11,7 @@
* Instantiate the admin bar object and set it up as a global for access elsewhere.
*
* UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR.
* For that, use show_admin_bar(false) or the 'show_admin_bar' filter.
* For that, use show_admin_bar(false) or the {@see 'show_admin_bar'} filter.
*
* @since 3.1.0
* @access private
@ -51,13 +51,15 @@ function _wp_admin_bar_init() {
}
/**
* Render the admin bar to the page based on the $wp_admin_bar->menu member var.
* This is called very late on the footer actions so that it will render after anything else being
* added to the footer.
* Renders the admin bar to the page based on the $wp_admin_bar->menu member var.
*
* It includes the action "admin_bar_menu" which should be used to hook in and
* add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
* right before the admin bar is rendered. This also gives you access to the $post global, among others.
* This is called very late on the footer actions so that it will render after
* anything else being added to the footer.
*
* It includes the {@see 'admin_bar_menu'} action which should be used to hook in and
* add new menus to the admin bar. That way you can be sure that you are adding at most
* optimal point, right before the admin bar is rendered. This also gives you access to
* the `$post` global, among others.
*
* @since 3.1.0
*
@ -872,9 +874,10 @@ function _admin_bar_bump_cb() { ?>
}
/**
* Set the display status of the admin bar.
* Sets the display status of the admin bar.
*
* This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
* This can be called immediately upon plugin load. It does not need to be called
* from a function hooked to the {@see 'init'} action.
*
* @since 3.1.0
*

View File

@ -329,7 +329,7 @@ function sanitize_bookmark($bookmark, $context = 'display') {
}
/**
* Sanitizes a bookmark field
* Sanitizes a bookmark field.
*
* Sanitizes the bookmark fields based on what the field name is. If the field
* has a strict value set, then it will be tested for that, else a more generic
@ -337,11 +337,11 @@ function sanitize_bookmark($bookmark, $context = 'display') {
* $context is 'raw' then the value is immediately return.
*
* Hooks exist for the more generic cases. With the 'edit' context, the
* 'edit_$field' filter will be called and passed the $value and $bookmark_id
* respectively. With the 'db' context, the 'pre_$field' filter is called and
* {@see 'edit_$field'} filter will be called and passed the `$value` and `$bookmark_id`
* respectively. With the 'db' context, the {@see 'pre_$field'} filter is called and
* passed the value. The 'display' context is the final context and has the
* $field has the filter name and is passed the $value, $bookmark_id, and
* $context respectively.
* `$field` has the filter name and is passed the `$value`, `$bookmark_id`, and
* `$context`, respectively.
*
* @since 2.3.0
*

View File

@ -777,7 +777,7 @@ function default_topic_count_scale( $count ) {
* 'format' argument will format the tags in a UL HTML list. The array value for
* the 'format' argument will return in PHP array type format.
*
* The 'tag_cloud_sort' filter allows you to override the sorting.
* The {@see 'tag_cloud_sort'} filter allows you to override the sorting.
* Passed to the filter: $tags array and $args array, has to return the $tags array
* after sorting it.
*

View File

@ -513,8 +513,8 @@ class WP {
/**
* Sets the query string property based off of the query variable property.
*
* The 'query_string' filter is deprecated, but still works. Plugins should
* use the 'request' filter instead.
* The {@see 'query_string'} filter is deprecated, but still works. Plugins should
* use the {@see 'request'} filter instead.
*
* @since 2.0.0
* @access public
@ -711,7 +711,7 @@ class WP {
/**
* Sets up all of the variables required by the WordPress environment.
*
* The action 'wp' has one parameter that references the WP object. It
* The action {@see 'wp'} has one parameter that references the WP object. It
* allows for accessing the properties and methods to further manipulate the
* object.
*

View File

@ -1239,10 +1239,10 @@ function wp_comment_form_unfiltered_html_nonce() {
* the post does not have comments.
*
* Uses the WordPress database object to query for the comments. The comments
* are passed through the 'comments_array' filter hook with the list of comments
* are passed through the {@see 'comments_array'} filter hook with the list of comments
* and the post ID respectively.
*
* The $file path is passed through a filter hook called, 'comments_template'
* The `$file` path is passed through a filter hook called {@see 'comments_template'},
* which includes the TEMPLATEPATH and $file combined. Tries the $filtered path
* first and if it fails it will require the default comment template from the
* default theme. If either does not exist, then the WordPress process will be
@ -2069,13 +2069,13 @@ function wp_list_comments( $args = array(), $comments = null ) {
}
/**
* Output a complete commenting form for use within a template.
* Outputs a complete commenting form for use within a template.
*
* Most strings and form fields may be controlled through the $args array passed
* into the function, while you may also choose to use the comment_form_default_fields
* into the function, while you may also choose to use the {@see 'comment_form_default_fields'}
* filter to modify the array of default fields if you'd just like to add a new
* one or remove a single field. All fields are also individually passed through
* a filter of the form comment_form_field_$name where $name is the key used
* a filter of the {@see 'form comment_form_field_$name'} where $name is the key used
* in the array of fields.
*
* @since 3.0.0
@ -2091,7 +2091,7 @@ function wp_list_comments( $args = array(), $comments = null ) {
* Optional. Default arguments and form fields to override.
*
* @type array $fields {
* Default comment fields, filterable by default via the 'comment_form_default_fields' hook.
* Default comment fields, filterable by default via the {@see 'comment_form_default_fields'} hook.
*
* @type string $author Comment author field HTML.
* @type string $email Comment author email field HTML.
@ -2208,7 +2208,7 @@ function comment_form( $args = array(), $post_id = null ) {
/**
* Filters the comment form default arguments.
*
* Use 'comment_form_default_fields' to filter the comment fields.
* Use {@see 'comment_form_default_fields'} to filter the comment fields.
*
* @since 3.0.0
*

View File

@ -1409,14 +1409,12 @@ function wp_get_comment_status($comment_id) {
*
* Calls hooks for comment status transitions. If the new comment status is not the same
* as the previous comment status, then two hooks will be ran, the first is
* 'transition_comment_status' with new status, old status, and comment data. The
* next action called is 'comment_OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the
* $new_status parameter and the OLDSTATUS is $old_status parameter; it has the
* {@see 'transition_comment_status'} with new status, old status, and comment data. The
* next action called is {@see comment_$old_status_to_$new_status'}. It has the
* comment data.
*
* The final action will run whether or not the comment statuses are the same. The
* action is named 'comment_NEWSTATUS_COMMENTTYPE', NEWSTATUS is from the $new_status
* parameter and COMMENTTYPE is comment_type comment data.
* action is named {@see 'comment_$new_status_$comment->comment_type'}.
*
* @since 2.7.0
*
@ -1700,12 +1698,13 @@ function wp_throttle_comment_flood($block, $time_lastcomment, $time_newcomment)
* Adds a new comment to the database.
*
* Filters new comment to ensure that the fields are sanitized and valid before
* inserting comment into database. Calls 'comment_post' action with comment ID
* and whether comment is approved by WordPress. Also has 'preprocess_comment'
* inserting comment into database. Calls {@see 'comment_post'} action with comment ID
* and whether comment is approved by WordPress. Also has {@see 'preprocess_comment'}
* filter for processing the comment data before the function handles it.
*
* We use REMOTE_ADDR here directly. If you are behind a proxy, you should ensure
* We use `REMOTE_ADDR` here directly. If you are behind a proxy, you should ensure
* that it is properly set, such as in wp-config.php, for your environment.
*
* See {@link https://core.trac.wordpress.org/ticket/9235}
*
* @since 1.5.0
@ -1891,7 +1890,7 @@ function wp_new_comment_notify_postauthor( $comment_ID ) {
/**
* Sets the status of a comment.
*
* The 'wp_set_comment_status' action is called after the comment is handled.
* The {@see 'wp_set_comment_status'} action is called after the comment is handled.
* If the comment status is not in the list, then false is returned.
*
* @since 1.0.0

View File

@ -62,7 +62,7 @@ function wp_schedule_single_event( $timestamp, $hook, $args = array()) {
* visits your WordPress site, if the scheduled time has passed.
*
* Valid values for the recurrence are hourly, daily and twicedaily. These can
* be extended using the cron_schedules filter in wp_get_schedules().
* be extended using the {@see 'cron_schedules'} filter in wp_get_schedules().
*
* Use wp_next_scheduled() to prevent duplicates
*
@ -363,7 +363,7 @@ function wp_cron() {
* Retrieve supported and filtered Cron recurrences.
*
* The supported recurrences are 'hourly' and 'daily'. A plugin may add more by
* hooking into the 'cron_schedules' filter. The filter accepts an array of
* hooking into the {@see 'cron_schedules'} filter. The filter accepts an array of
* arrays. The outer array has a key that is the name of the schedule or for
* example 'weekly'. The value is an array with two keys, one is 'interval' and
* the other is 'display'.

View File

@ -2020,7 +2020,7 @@ function sanitize_url( $url, $protocols = null ) {
* @param string $url The URL to be cleaned.
* @param array $protocols Optional. An array of acceptable protocols.
* @param string $context Optional. How the URL will be used. Default is 'display'.
* @return string The cleaned $url after the 'clean_url' filter is applied.
* @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
*/
function clean_url( $url, $protocols = null, $context = 'display' ) {
if ( $context == 'db' )
@ -2033,7 +2033,7 @@ function clean_url( $url, $protocols = null, $context = 'display' ) {
/**
* Escape single quotes, specialchar double quotes, and fix line endings.
*
* The filter 'js_escape' is also applied by esc_js()
* The filter {@see 'js_escape'} is also applied by esc_js().
*
* @since 2.0.4
* @deprecated 2.8.0 Use esc_js()
@ -2968,7 +2968,7 @@ function clean_pre($matches) {
* @deprecated 3.4.0 Use add_theme_support()
* @see add_theme_support()
*
* @param callable $wp_head_callback Call on 'wp_head' action.
* @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
* @param callable $admin_head_callback Call on custom header administration screen.
* @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
*/
@ -3004,7 +3004,7 @@ function remove_custom_image_header() {
* @deprecated 3.4.0 Use add_theme_support()
* @see add_theme_support()
*
* @param callable $wp_head_callback Call on 'wp_head' action.
* @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
* @param callable $admin_head_callback Call on custom background administration screen.
* @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
*/
@ -3524,7 +3524,7 @@ function preview_theme_ob_filter_callback( $matches ) {
/**
* Formats text for the rich text editor.
*
* The filter 'richedit_pre' is applied here. If $text is empty the filter will
* The {@see 'richedit_pre'} filter is applied here. If $text is empty the filter will
* be applied to an empty string.
*
* @since 2.0.0
@ -3567,7 +3567,7 @@ function wp_richedit_pre($text) {
* Formats text for the HTML editor.
*
* Unless $output is empty it will pass through htmlspecialchars before the
* 'htmledit_pre' filter is applied.
* {@see 'htmledit_pre'} filter is applied.
*
* @since 2.5.0
* @deprecated 4.3.0 Use format_for_editor()

View File

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