Make WordPress Core

Changeset 30628


Ignore:
Timestamp:
11/30/2014 04:43:44 AM (10 years ago)
Author:
DrewAPicture
Message:

Add missing return descriptions for a variety of functions in wp-includes/link-template.php.

Props colorful-tones, dustyf.
See #30406.

File:
1 edited

Legend:

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

    r30616 r30628  
    3636 * @param string $string URL with or without a trailing slash.
    3737 * @param string $type_of_url The type of URL being considered (e.g. single, category, etc) for use in the filter.
    38  * @return string
     38 * @return string The URL with the trailing slash appended or stripped.
    3939 */
    4040function user_trailingslashit($string, $type_of_url = '') {
     
    240240 * @param bool $leavename Optional, defaults to false. Whether to keep post name.
    241241 * @param bool $sample Optional, defaults to false. Is it a sample permalink.
    242  * @return string
     242 * @return string The post permalink.
    243243 */
    244244function get_post_permalink( $id = 0, $leavename = false, $sample = false ) {
     
    314314 * @param bool $leavename Optional, defaults to false. Whether to keep page name.
    315315 * @param bool $sample Optional, defaults to false. Is it a sample permalink.
    316  * @return string
     316 * @return string The page permalink.
    317317 */
    318318function get_page_link( $post = false, $leavename = false, $sample = false ) {
     
    347347 * @param bool $leavename Optional. Leave name.
    348348 * @param bool $sample Optional. Sample permalink.
    349  * @return string
     349 * @return string The page permalink.
    350350 */
    351351function _get_page_link( $post = false, $leavename = false, $sample = false ) {
     
    389389 * @param int|object $post Optional. Post ID or object.
    390390 * @param bool $leavename Optional. Leave name.
    391  * @return string
     391 * @return string The attachment permalink.
    392392 */
    393393function get_attachment_link( $post = null, $leavename = false ) {
     
    437437 *
    438438 * @param int|bool $year False for current year or year for permalink.
    439  * @return string
     439 * @return string The permalink for the specified year archive.
    440440 */
    441441function get_year_link($year) {
     
    469469 * @param bool|int $year False for current year. Integer of year.
    470470 * @param bool|int $month False for current month. Integer of month.
    471  * @return string
     471 * @return string The permalink for the specified month and year archive.
    472472 */
    473473function get_month_link($year, $month) {
     
    506506 * @param bool|int $month False for current month. Integer of month.
    507507 * @param bool|int $day False for current day. Integer of day.
    508  * @return string
     508 * @return string The permalink for the specified day, month, and year archive.
    509509 */
    510510function get_day_link($year, $month, $day) {
     
    569569 *
    570570 * @param string $feed Optional, defaults to default feed. Feed type.
    571  * @return string
     571 * @return string The feed permalink.
    572572 */
    573573function get_feed_link($feed = '') {
     
    615615 * @param int $post_id Optional. Post ID.
    616616 * @param string $feed Optional. Feed type.
    617  * @return string
     617 * @return string The permalink for the comments feed for the given post.
    618618 */
    619619function get_post_comments_feed_link($post_id = 0, $feed = '') {
     
    834834 * @param int $tag_id Tag ID.
    835835 * @param string $feed Optional. Feed type.
    836  * @return string
     836 * @return string The feed permalink for the given tag.
    837837 */
    838838function get_tag_feed_link($tag_id, $feed = '') {
     
    847847 * @param int $tag_id Tag ID
    848848 * @param string $taxonomy Taxonomy
    849  * @return string
     849 * @return string The edit tag link URL for the given tag.
    850850 */
    851851function get_edit_tag_link( $tag_id, $taxonomy = 'post_tag' ) {
     
    892892 * @param string $taxonomy Taxonomy
    893893 * @param string $object_type The object type
    894  * @return string
     894 * @return string The edit term link URL for the given term.
    895895 */
    896896function get_edit_term_link( $term_id, $taxonomy, $object_type = '' ) {
     
    974974 *
    975975 * @param string $query Optional. The query string to use. If empty the current query is used.
    976  * @return string
     976 * @return string The search permalink.
    977977 */
    978978function get_search_link( $query = '' ) {
     
    10131013 * @param string $search_query Optional. Search query.
    10141014 * @param string $feed Optional. Feed type.
    1015  * @return string
     1015 * @return string The search results feed permalink.
    10161016 */
    10171017function get_search_feed_link($search_query = '', $feed = '') {
     
    10521052 * @param string $search_query Optional. Search query.
    10531053 * @param string $feed Optional. Feed type.
    1054  * @return string
     1054 * @return string The comments feed search results permalink.
    10551055 */
    10561056function get_search_comments_feed_link($search_query = '', $feed = '') {
     
    10811081 *
    10821082 * @param string $post_type Post type
    1083  * @return string
     1083 * @return string The post type archive permalink.
    10841084 */
    10851085function get_post_type_archive_link( $post_type ) {
     
    11201120 * @param string $post_type Post type
    11211121 * @param string $feed Optional. Feed type
    1122  * @return string
     1122 * @return string The post type feed permalink.
    11231123 */
    11241124function get_post_type_archive_feed_link( $post_type, $feed = '' ) {
     
    11611161 * @param int $id Optional. Post ID.
    11621162 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&'.
    1163  * @return string
     1163 * @return string The edit post link for the given post.
    11641164 */
    11651165function get_edit_post_link( $id = 0, $context = 'display' ) {
     
    12411241 * @param string $deprecated Not used.
    12421242 * @param bool $force_delete Whether to bypass trash and force deletion. Default is false.
    1243  * @return string
     1243 * @return string The delete post link URL for the given post.
    12441244 */
    12451245function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
     
    12791279 *
    12801280 * @param int $comment_id Optional. Comment ID.
    1281  * @return string
     1281 * @return string The edit comment link URL for the given comment.
    12821282 */
    12831283function get_edit_comment_link( $comment_id = 0 ) {
     
    13391339 *
    13401340 * @param int $link Optional. Bookmark ID.
    1341  * @return string
     1341 * @return string The edit bookmark link URL.
    13421342 */
    13431343function get_edit_bookmark_link( $link = 0 ) {
     
    15951595 * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
    15961596 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1597  * @return string
     1597 * @return string The adjacent post relational link URL.
    15981598 */
    15991599function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
     
    17601760 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
    17611761 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1762  * @return string
     1762 * @return string The link URL of the previous post in relation to the current post.
    17631763 */
    17641764function get_previous_post_link( $format = '« %link', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
     
    17921792 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs.
    17931793 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1794  * @return string
     1794 * @return string The link URL of the next post in relation to the current post.
    17951795 */
    17961796function get_next_post_link( $format = '%link »', $link = '%title', $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) {
     
    18271827 * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
    18281828 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1829  * @return string
     1829 * @return string The link URL of the previous or next post in relation to the current post.
    18301830 */
    18311831function get_adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
     
    18881888 * @param bool         $previous       Optional. Whether to display link to previous or next post. Default true.
    18891889 * @param string       $taxonomy       Optional. Taxonomy, if $in_same_term is true. Default 'category'.
    1890  * @return string
    18911890 */
    18921891function adjacent_post_link( $format, $link, $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) {
     
    19021901 * @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true.
    19031902*   Otherwise, prepares the URL with esc_url_raw().
    1904  * @return string
     1903 * @return string The link URL for the given page number.
    19051904 */
    19061905function get_pagenum_link($pagenum = 1, $escape = true ) {
     
    19761975 *
    19771976 * @param int $max_page Optional. Max pages.
    1978  * @return string
     1977 * @return string The link URL for next posts page.
    19791978 */
    19801979function get_next_posts_page_link($max_page = 0) {
     
    19971996 * @param int $max_page Optional. Max pages.
    19981997 * @param boolean $echo Optional. Echo or return;
     1998 * @return string The link URL for next posts page if `$echo = false`.
    19991999 */
    20002000function next_posts( $max_page = 0, $echo = true ) {
     
    20142014 * @param string $label Content for link text.
    20152015 * @param int $max_page Optional. Max pages.
    2016  * @return string|null
     2016 * @return string|null HTML-formatted next posts page link.
    20172017 */
    20182018function get_next_posts_link( $label = null, $max_page = 0 ) {
     
    20652065 * @since 2.0.10
    20662066 *
    2067  * @return string|null
     2067 * @return string|null The link for the previous posts page.
    20682068 */
    20692069function get_previous_posts_page_link() {
     
    20842084 *
    20852085 * @param boolean $echo Optional. Echo or return;
     2086 * @return string The previous posts page link if `$echo = false`.
    20862087 */
    20872088function previous_posts( $echo = true ) {
     
    21002101 *
    21012102 * @param string $label Optional. Previous page link text.
    2102  * @return string|null
     2103 * @return string|null HTML-formatted previous page link.
    21032104 */
    21042105function get_previous_posts_link( $label = null ) {
     
    23722373 *
    23732374 * @param int $pagenum Optional. Page number.
    2374  * @return string
     2375 * @param int $max_page Optional. The maximum number of comment pages.
     2376 * @return string The comments page number link URL.
    23752377 */
    23762378function get_comments_pagenum_link( $pagenum = 1, $max_page = 0 ) {
     
    24162418 * @param string $label Optional. Label for link text.
    24172419 * @param int $max_page Optional. Max page.
    2418  * @return string|null
     2420 * @return string|null HTML-formatted link for the next page of comments.
    24192421 */
    24202422function get_next_comments_link( $label = '', $max_page = 0 ) {
     
    24682470 *
    24692471 * @param string $label Optional. Label for comments link text.
    2470  * @return string|null
     2472 * @return string|null HTML-formatted link for the previous page of comments.
    24712473 */
    24722474function get_previous_comments_link( $label = '' ) {
     
    25512553 * @since 2.6.0
    25522554 *
    2553  * @return string
     2555 * @return string The Press This bookmarklet link URL.
    25542556 */
    25552557function get_shortcut_link() {
Note: See TracChangeset for help on using the changeset viewer.