WordPress.org

Make WordPress Core

Changeset 37544


Ignore:
Timestamp:
05/23/2016 07:01:40 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.

Fixes #36921.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/nav-menu-template.php

    r37500 r37544  
    6767
    6868    /**
    69      * Start the element output.
     69     * Starts the element output.
    7070     *
    7171     * @see Walker::start_el()
    7272     *
    7373     * @since 3.0.0
    74      * @since 4.4.0 'nav_menu_item_args' filter was added.
     74     * @since 4.4.0 The {@see 'nav_menu_item_args'} filter was added.
    7575     *
    7676     * @param string $output Passed by reference. Used to append additional content.
  • trunk/src/wp-includes/option.php

    r37507 r37544  
    1717 * If the option was serialized then it will be unserialized when it is returned.
    1818 *
    19  * Any scalar values will be returned as strings. You may coerce the return type of a given option by registering a
    20  * 'option_{$option}' filter callback.
     19 * Any scalar values will be returned as strings. You may coerce the return type of
     20 * a given option by registering an {@see 'option_$option'} filter callback.
    2121 *
    2222 * @since 1.5.0
  • trunk/src/wp-includes/pluggable.php

    r37508 r37544  
    155155 * The default content type is 'text/plain' which does not allow using HTML.
    156156 * However, you can set the content type of the email by using the
    157  * 'wp_mail_content_type' filter.
     157 * {@see 'wp_mail_content_type'} filter.
    158158 *
    159159 * The default charset is based on the charset used on the blog. The charset can
    160  * be set using the 'wp_mail_charset' filter.
     160 * be set using the {@see 'wp_mail_charset'} filter.
    161161 *
    162162 * @since 1.2.1
  • trunk/src/wp-includes/post-template.php

    r37501 r37544  
    416416
    417417/**
    418  * Retrieve the classes for the post div as an array.
     418 * Retrieves the classes for the post div as an array.
    419419 *
    420420 * The class names are many. If the post is a sticky, then the 'sticky'
     
    422422 * post thumbnail, 'has-post-thumbnail' is added as a class. For each taxonomy that
    423423 * the post belongs to, a class will be added of the format '{$taxonomy}-{$slug}' -
    424  * eg 'category-foo' or 'my_custom_taxonomy-bar'. The 'post_tag' taxonomy is a special
     424 * eg 'category-foo' or 'my_custom_taxonomy-bar'.
     425 *
     426 * The 'post_tag' taxonomy is a special
    425427 * case; the class has the 'tag-' prefix instead of 'post_tag-'. All classes are
    426  * passed through the filter, 'post_class' with the list of classes, followed by
     428 * passed through the filter, {@see 'post_class'}, with the list of classes, followed by
    427429 * $class parameter value, with the post ID as the last parameter.
    428430 *
  • trunk/src/wp-includes/post.php

    r37504 r37544  
    1313/**
    1414 * Creates the initial post types when 'init' action is fired.
     15 *
     16 * See {@see 'init'}.
    1517 *
    1618 * @since 2.9.0
     
    39593961 * though this does not always mean the status has actually changed before and after
    39603962 * the save. This function fires a number of action hooks related to that transition:
    3961  * the generic 'transition_post_status' action, as well as the dynamic hooks
    3962  * `"{$old_status}_to_{$new_status}"` and `"{$new_status}_{$post->post_type}"`. Note
     3963 * the generic {@see 'transition_post_status'} action, as well as the dynamic hooks
     3964 * {@see '$old_status_to_$new_status'} and {@see '$new_status_$post->post_type'}. Note
    39633965 * that the function does not transition the post object in the database.
    39643966 *
     
    59275929 *
    59285930 * Prevents loops from forming and breaks those that it finds. Attached
    5929  * to the 'wp_insert_post_parent' filter.
     5931 * to the {@see 'wp_insert_post_parent'} filter.
    59305932 *
    59315933 * @since 3.1.0
  • trunk/src/wp-includes/query.php

    r37509 r37544  
    38843884
    38853885    /**
    3886      * Whether there are more posts available in the loop.
    3887      *
    3888      * Calls action 'loop_end', when the loop is complete.
     3886     * Determines whether there are more posts available in the loop.
     3887     *
     3888     * Calls the {@see 'loop_end'} action when the loop is complete.
    38893889     *
    38903890     * @since 1.5.0
  • trunk/src/wp-includes/rest-api.php

    r37518 r37544  
    209209     * Filters the REST URL.
    210210     *
    211      * Use this filter to adjust the url returned by the `get_rest_url` function.
     211     * Use this filter to adjust the url returned by the get_rest_url() function.
    212212     *
    213213     * @since 4.4.0
  • trunk/src/wp-includes/revision.php

    r37518 r37544  
    323323 * @param int|WP_Post $post   The post ID or object.
    324324 * @param string      $output Optional. OBJECT, ARRAY_A, or ARRAY_N.
    325  * @param string      $filter Optional sanitation filter. @see sanitize_post().
     325 * @param string      $filter Optional sanitation filter. See sanitize_post().
    326326 * @return WP_Post|array|null Null if error or post object if success.
    327327 */
  • trunk/src/wp-includes/rewrite.php

    r37518 r37544  
    145145 *
    146146 * The $query parameter is optional. If it is omitted you must ensure that
    147  * you call this on, or before, the 'init' hook. This is because $query defaults
     147 * you call this on, or before, the {@see 'init'} hook. This is because $query defaults
    148148 * to "$tag=", and for this to work a new query var has to be added.
    149149 *
  • trunk/src/wp-includes/session.php

    r37518 r37544  
    109109     * This function generates a token and stores it with the associated
    110110     * expiration time (and potentially other session information via the
    111      * `attach_session_information` filter).
     111     * {@see 'attach_session_information'} filter).
    112112     *
    113113     * @since 4.0.0
  • trunk/src/wp-includes/taxonomy.php

    r37506 r37544  
    12341234     * Filters the terms query default arguments.
    12351235     *
    1236      * Use 'get_terms_args' to filter the passed arguments.
     1236     * Use {@see 'get_terms_args'} to filter the passed arguments.
    12371237     *
    12381238     * @since 4.4.0
     
    21082108             * Filters the category nicename before it is sanitized.
    21092109             *
    2110              * Use the pre_{$taxonomy}_{$field} hook instead.
     2110             * Use the {@see 'pre_$taxonomy_$field'} hook instead.
    21112111             *
    21122112             * @since 2.0.3
  • trunk/src/wp-includes/theme.php

    r37493 r37544  
    234234
    235235/**
    236  * Retrieve localized stylesheet URI.
     236 * Retrieves the localized stylesheet URI.
    237237 *
    238238 * The stylesheet directory for the localized stylesheet files are located, by
     
    242242 *
    243243 * The theme may change the location of the stylesheet directory by either using
    244  * the 'stylesheet_directory_uri' filter or the 'locale_stylesheet_uri' filter.
     244 * the {@see 'stylesheet_directory_uri'} or {@see 'locale_stylesheet_uri'} filters.
     245 *
    245246 * If you want to change the location of the stylesheet files for the entire
    246247 * WordPress workflow, then change the former. If you just have the locale in a
     
    761762 * Will switch theme to the fallback theme if current theme does not validate.
    762763 *
    763  * You can use the 'validate_current_theme' filter to return false to
     764 * You can use the {@see 'validate_current_theme'} filter to return false to
    764765 * disable this functionality.
    765766 *
     
    15171518 *
    15181519 * Must be called in the theme's functions.php file to work.
    1519  * If attached to a hook, it must be after_setup_theme.
    1520  * The init hook may be too late for some features.
     1520 * If attached to a hook, it must be {@see 'after_setup_theme'}.
     1521 * The {@see 'init'} hook may be too late for some features.
    15211522 *
    15221523 * @since 2.9.0
     
    20142015
    20152016/**
    2016  * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load
     2017 * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load.
     2018 *
     2019 * See {@see 'after_switch_theme'}.
    20172020 *
    20182021 * @since 3.3.0
  • trunk/src/wp-includes/user.php

    r37503 r37544  
    312312
    313313/**
    314  * Validate the logged-in cookie.
     314 * Validates the logged-in cookie.
    315315 *
    316316 * Checks the logged-in cookie if the previous auth cookie could not be
    317317 * validated and parsed.
    318318 *
    319  * This is a callback for the determine_current_user filter, rather than API.
     319 * This is a callback for the {@see 'determine_current_user'} filter, rather than API.
    320320 *
    321321 * @since 3.9.0
     
    20402040     * Fires before a new password is retrieved.
    20412041     *
     2042     * Use the {@see 'retrieve_password'} hook instead.
     2043     *
    20422044     * @since 1.5.0
    20432045     * @deprecated 1.5.1 Misspelled. Use 'retrieve_password' hook instead.
  • trunk/src/wp-includes/widgets.php

    r37518 r37544  
    115115
    116116/**
    117  * Unregister a widget
    118  *
    119  * Unregisters a WP_Widget widget. Useful for unregistering default widgets.
    120  * Run within a function hooked to the widgets_init action.
     117 * Unregisters a widget.
     118 *
     119 * Unregisters a WP_Widget widget. Useful for un-registering default widgets.
     120 * Run within a function hooked to the {@see 'widgets_init'} action.
    121121 *
    122122 * @since 2.8.0
     
    126126 * @global WP_Widget_Factory $wp_widget_factory
    127127 *
    128  * @param string $widget_class The name of a class that extends WP_Widget
     128 * @param string $widget_class The name of a class that extends WP_Widget.
    129129 */
    130130function unregister_widget($widget_class) {
     
    781781 *
    782782 * NOTE: $widget_id and $id_base are the same for single widgets. To be effective
    783  * this function has to run after widgets have initialized, at action 'init' or later.
     783 * this function has to run after widgets have initialized, at action {@see 'init'} or later.
    784784 *
    785785 * @since 2.2.0
     
    14301430
    14311431/**
    1432  * Register all of the default WordPress widgets on startup.
    1433  *
    1434  * Calls 'widgets_init' action after all of the WordPress widgets have been
    1435  * registered.
     1432 * Registers all of the default WordPress widgets on startup.
     1433 *
     1434 * Calls {@see 'widgets_init'} action after all of the WordPress widgets have been registered.
    14361435 *
    14371436 * @since 2.2.0
  • trunk/src/wp-includes/wp-db.php

    r37523 r37544  
    15851585
    15861586    /**
    1587      * Check that the connection to the database is still up. If not, try to reconnect.
     1587     * Checks that the connection to the database is still up. If not, try to reconnect.
    15881588     *
    15891589     * If this function is unable to reconnect, it will forcibly die, or if after the
    1590      * the template_redirect hook has been fired, return false instead.
     1590     * the {@see 'template_redirect'} hook has been fired, return false instead.
    15911591     *
    15921592     * If $allow_bail is false, the lack of database connection will need
  • trunk/src/wp-includes/wp-diff.php

    r37431 r37544  
    160160
    161161                /**
    162                  * Contextually filter a diffed line.
     162                 * Contextually filters a diffed line.
    163163                 *
    164164                 * Filters TextDiff processing of diffed line. By default, diffs are processed with
Note: See TracChangeset for help on using the changeset viewer.