WordPress.org

Make WordPress Core

Changeset 37542


Ignore:
Timestamp:
05/23/2016 06:58:48 PM (3 years ago)
Author:
DrewAPicture
Message:

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.

Location:
trunk/src/wp-includes
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/admin-bar.php

    r37518 r37542  
    1212 *
    1313 * UNHOOKING THIS FUNCTION WILL NOT PROPERLY REMOVE THE ADMIN BAR.
    14  * For that, use show_admin_bar(false) or the 'show_admin_bar' filter.
     14 * For that, use show_admin_bar(false) or the {@see 'show_admin_bar'} filter.
    1515 *
    1616 * @since 3.1.0
     
    5252
    5353/**
    54  * Render the admin bar to the page based on the $wp_admin_bar->menu member var.
    55  * This is called very late on the footer actions so that it will render after anything else being
    56  * added to the footer.
    57  *
    58  * It includes the action "admin_bar_menu" which should be used to hook in and
    59  * add new menus to the admin bar. That way you can be sure that you are adding at most optimal point,
    60  * right before the admin bar is rendered. This also gives you access to the $post global, among others.
     54 * Renders the admin bar to the page based on the $wp_admin_bar->menu member var.
     55 *
     56 * This is called very late on the footer actions so that it will render after
     57 * anything else being added to the footer.
     58 *
     59 * It includes the {@see 'admin_bar_menu'} action which should be used to hook in and
     60 * add new menus to the admin bar. That way you can be sure that you are adding at most
     61 * optimal point, right before the admin bar is rendered. This also gives you access to
     62 * the `$post` global, among others.
    6163 *
    6264 * @since 3.1.0
     
    873875
    874876/**
    875  * Set the display status of the admin bar.
    876  *
    877  * This can be called immediately upon plugin load. It does not need to be called from a function hooked to the init action.
     877 * Sets the display status of the admin bar.
     878 *
     879 * This can be called immediately upon plugin load. It does not need to be called
     880 * from a function hooked to the {@see 'init'} action.
    878881 *
    879882 * @since 3.1.0
  • trunk/src/wp-includes/bookmark.php

    r37518 r37542  
    330330
    331331/**
    332  * Sanitizes a bookmark field
     332 * Sanitizes a bookmark field.
    333333 *
    334334 * Sanitizes the bookmark fields based on what the field name is. If the field
     
    338338 *
    339339 * Hooks exist for the more generic cases. With the 'edit' context, the
    340  * 'edit_$field' filter will be called and passed the $value and $bookmark_id
    341  * respectively. With the 'db' context, the 'pre_$field' filter is called and
     340 * {@see 'edit_$field'} filter will be called and passed the `$value` and `$bookmark_id`
     341 * respectively. With the 'db' context, the {@see 'pre_$field'} filter is called and
    342342 * passed the value. The 'display' context is the final context and has the
    343  * $field has the filter name and is passed the $value, $bookmark_id, and
    344  * $context respectively.
     343 * `$field` has the filter name and is passed the `$value`, `$bookmark_id`, and
     344 * `$context`, respectively.
    345345 *
    346346 * @since 2.3.0
  • trunk/src/wp-includes/category-template.php

    r37496 r37542  
    778778 * the 'format' argument will return in PHP array type format.
    779779 *
    780  * The 'tag_cloud_sort' filter allows you to override the sorting.
     780 * The {@see 'tag_cloud_sort'} filter allows you to override the sorting.
    781781 * Passed to the filter: $tags array and $args array, has to return the $tags array
    782782 * after sorting it.
  • trunk/src/wp-includes/class-wp.php

    r37518 r37542  
    514514     * Sets the query string property based off of the query variable property.
    515515     *
    516      * The 'query_string' filter is deprecated, but still works. Plugins should
    517      * use the 'request' filter instead.
     516     * The {@see 'query_string'} filter is deprecated, but still works. Plugins should
     517     * use the {@see 'request'} filter instead.
    518518     *
    519519     * @since 2.0.0
     
    712712     * Sets up all of the variables required by the WordPress environment.
    713713     *
    714      * The action 'wp' has one parameter that references the WP object. It
     714     * The action {@see 'wp'} has one parameter that references the WP object. It
    715715     * allows for accessing the properties and methods to further manipulate the
    716716     * object.
  • trunk/src/wp-includes/comment-template.php

    r37497 r37542  
    12401240 *
    12411241 * Uses the WordPress database object to query for the comments. The comments
    1242  * are passed through the 'comments_array' filter hook with the list of comments
     1242 * are passed through the {@see 'comments_array'} filter hook with the list of comments
    12431243 * and the post ID respectively.
    12441244 *
    1245  * The $file path is passed through a filter hook called, 'comments_template'
     1245 * The `$file` path is passed through a filter hook called {@see 'comments_template'},
    12461246 * which includes the TEMPLATEPATH and $file combined. Tries the $filtered path
    12471247 * first and if it fails it will require the default comment template from the
     
    20702070
    20712071/**
    2072  * Output a complete commenting form for use within a template.
     2072 * Outputs a complete commenting form for use within a template.
    20732073 *
    20742074 * Most strings and form fields may be controlled through the $args array passed
    2075  * into the function, while you may also choose to use the comment_form_default_fields
     2075 * into the function, while you may also choose to use the {@see 'comment_form_default_fields'}
    20762076 * filter to modify the array of default fields if you'd just like to add a new
    20772077 * one or remove a single field. All fields are also individually passed through
    2078  * a filter of the form comment_form_field_$name where $name is the key used
     2078 * a filter of the {@see 'form comment_form_field_$name'} where $name is the key used
    20792079 * in the array of fields.
    20802080 *
     
    20922092 *
    20932093 *     @type array $fields {
    2094  *         Default comment fields, filterable by default via the 'comment_form_default_fields' hook.
     2094 *         Default comment fields, filterable by default via the {@see 'comment_form_default_fields'} hook.
    20952095 *
    20962096 *         @type string $author Comment author field HTML.
     
    22092209     * Filters the comment form default arguments.
    22102210     *
    2211      * Use 'comment_form_default_fields' to filter the comment fields.
     2211     * Use {@see 'comment_form_default_fields'} to filter the comment fields.
    22122212     *
    22132213     * @since 3.0.0
  • trunk/src/wp-includes/comment.php

    r37512 r37542  
    14101410 * Calls hooks for comment status transitions. If the new comment status is not the same
    14111411 * as the previous comment status, then two hooks will be ran, the first is
    1412  * 'transition_comment_status' with new status, old status, and comment data. The
    1413  * next action called is 'comment_OLDSTATUS_to_NEWSTATUS' the NEWSTATUS is the
    1414  * $new_status parameter and the OLDSTATUS is $old_status parameter; it has the
     1412 * {@see 'transition_comment_status'} with new status, old status, and comment data. The
     1413 * next action called is {@see comment_$old_status_to_$new_status'}. It has the
    14151414 * comment data.
    14161415 *
    14171416 * The final action will run whether or not the comment statuses are the same. The
    1418  * action is named 'comment_NEWSTATUS_COMMENTTYPE', NEWSTATUS is from the $new_status
    1419  * parameter and COMMENTTYPE is comment_type comment data.
     1417 * action is named {@see 'comment_$new_status_$comment->comment_type'}.
    14201418 *
    14211419 * @since 2.7.0
     
    17011699 *
    17021700 * Filters new comment to ensure that the fields are sanitized and valid before
    1703  * inserting comment into database. Calls 'comment_post' action with comment ID
    1704  * and whether comment is approved by WordPress. Also has 'preprocess_comment'
     1701 * inserting comment into database. Calls {@see 'comment_post'} action with comment ID
     1702 * and whether comment is approved by WordPress. Also has {@see 'preprocess_comment'}
    17051703 * filter for processing the comment data before the function handles it.
    17061704 *
    1707  * We use REMOTE_ADDR here directly. If you are behind a proxy, you should ensure
     1705 * We use `REMOTE_ADDR` here directly. If you are behind a proxy, you should ensure
    17081706 * that it is properly set, such as in wp-config.php, for your environment.
     1707 *
    17091708 * See {@link https://core.trac.wordpress.org/ticket/9235}
    17101709 *
     
    18921891 * Sets the status of a comment.
    18931892 *
    1894  * The 'wp_set_comment_status' action is called after the comment is handled.
     1893 * The {@see 'wp_set_comment_status'} action is called after the comment is handled.
    18951894 * If the comment status is not in the list, then false is returned.
    18961895 *
  • trunk/src/wp-includes/cron.php

    r37518 r37542  
    6363 *
    6464 * Valid values for the recurrence are hourly, daily and twicedaily. These can
    65  * be extended using the cron_schedules filter in wp_get_schedules().
     65 * be extended using the {@see 'cron_schedules'} filter in wp_get_schedules().
    6666 *
    6767 * Use wp_next_scheduled() to prevent duplicates
     
    364364 *
    365365 * The supported recurrences are 'hourly' and 'daily'. A plugin may add more by
    366  * hooking into the 'cron_schedules' filter. The filter accepts an array of
     366 * hooking into the {@see 'cron_schedules'} filter. The filter accepts an array of
    367367 * arrays. The outer array has a key that is the name of the schedule or for
    368368 * example 'weekly'. The value is an array with two keys, one is 'interval' and
  • trunk/src/wp-includes/deprecated.php

    r37518 r37542  
    20212021 * @param array $protocols Optional. An array of acceptable protocols.
    20222022 * @param string $context Optional. How the URL will be used. Default is 'display'.
    2023  * @return string The cleaned $url after the 'clean_url' filter is applied.
     2023 * @return string The cleaned $url after the {@see 'clean_url'} filter is applied.
    20242024 */
    20252025function clean_url( $url, $protocols = null, $context = 'display' ) {
     
    20342034 * Escape single quotes, specialchar double quotes, and fix line endings.
    20352035 *
    2036  * The filter 'js_escape' is also applied by esc_js()
     2036 * The filter {@see 'js_escape'} is also applied by esc_js().
    20372037 *
    20382038 * @since 2.0.4
     
    29692969 * @see add_theme_support()
    29702970 *
    2971  * @param callable $wp_head_callback Call on 'wp_head' action.
     2971 * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
    29722972 * @param callable $admin_head_callback Call on custom header administration screen.
    29732973 * @param callable $admin_preview_callback Output a custom header image div on the custom header administration screen. Optional.
     
    30053005 * @see add_theme_support()
    30063006 *
    3007  * @param callable $wp_head_callback Call on 'wp_head' action.
     3007 * @param callable $wp_head_callback Call on the {@see 'wp_head'} action.
    30083008 * @param callable $admin_head_callback Call on custom background administration screen.
    30093009 * @param callable $admin_preview_callback Output a custom background image div on the custom background administration screen. Optional.
     
    35253525 * Formats text for the rich text editor.
    35263526 *
    3527  * The filter 'richedit_pre' is applied here. If $text is empty the filter will
     3527 * The {@see 'richedit_pre'} filter is applied here. If $text is empty the filter will
    35283528 * be applied to an empty string.
    35293529 *
     
    35683568 *
    35693569 * Unless $output is empty it will pass through htmlspecialchars before the
    3570  * 'htmledit_pre' filter is applied.
     3570 * {@see 'htmledit_pre'} filter is applied.
    35713571 *
    35723572 * @since 2.5.0
Note: See TracChangeset for help on using the changeset viewer.