Make WordPress Core


Ignore:
Timestamp:
09/29/2011 10:57:43 PM (13 years ago)
Author:
ryan
Message:

phpdoc typo and readability fixes. Props SergeyBiryukov. fixes #18560

File:
1 edited

Legend:

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

    r18680 r18827  
    561561 * Retrieve the feed link for a category.
    562562 *
    563  * Returns a link to the feed for all post in a given category. A specific feed
     563 * Returns a link to the feed for all posts in a given category. A specific feed
    564564 * can be requested or left blank to get the default feed.
    565565 *
     
    577577
    578578/**
    579  * Retrieve the feed link for a taxonomy.
    580  *
    581  * Returns a link to the feed for all post in a given term. A specific feed
     579 * Retrieve the feed link for a term.
     580 *
     581 * Returns a link to the feed for all posts in a given term. A specific feed
    582582 * can be requested or left blank to get the default feed.
    583583 *
     
    587587 * @param string $taxonomy Optional. Taxonomy of $term_id
    588588 * @param string $feed Optional. Feed type.
    589  * @return string Link to the feed for the taxonomy specified by $term_id and $taxonomy.
     589 * @return string Link to the feed for the term specified by $term_id and $taxonomy.
    590590*/
    591591function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) {
     
    896896 *
    897897 * @param int $id Optional. Post ID.
    898  * @param string $context Optional, default to display. How to write the '&', defaults to '&'.
     898 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&'.
    899899 * @return string
    900900 */
     
    10651065 * @since 1.5.0
    10661066 *
    1067  * @param bool $in_same_cat Optional. Whether post should be in same category.
     1067 * @param bool $in_same_cat Optional. Whether post should be in a same category.
    10681068 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    10691069 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
     
    10781078 * @since 1.5.0
    10791079 *
    1080  * @param bool $in_same_cat Optional. Whether post should be in same category.
     1080 * @param bool $in_same_cat Optional. Whether post should be in a same category.
    10811081 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    10821082 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists.
     
    10931093 * @since 2.5.0
    10941094 *
    1095  * @param bool $in_same_cat Optional. Whether post should be in same category.
     1095 * @param bool $in_same_cat Optional. Whether post should be in a same category.
    10961096 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    10971097 * @param bool $previous Optional. Whether to retrieve previous post.
     
    11711171 *
    11721172 * @param string $title Optional. Link title format.
    1173  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1173 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    11741174 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    1175  * @param bool $previous Optional, default is true. Whether display link to previous post.
     1175 * @param bool $previous Optional, default is true. Whether to display link to previous or next post.
    11761176 * @return string
    11771177 */
     
    12081208 *
    12091209 * @param string $title Optional. Link title format.
    1210  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1210 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    12111211 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12121212 */
     
    12191219 * Display relational links for the posts adjacent to the current post for single post pages.
    12201220 *
    1221  * This is meant to be attached to actions like 'wp_head'.  Do not call this directly in plugins or theme templates.
     1221 * This is meant to be attached to actions like 'wp_head'. Do not call this directly in plugins or theme templates.
    12221222 * @since 3.0.0
    12231223 *
     
    12351235 *
    12361236 * @param string $title Optional. Link title format.
    1237  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1237 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    12381238 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12391239 */
     
    12481248 *
    12491249 * @param string $title Optional. Link title format.
    1250  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1250 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    12511251 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12521252 */
     
    12591259 *
    12601260 * Boundary being either the first or last post by publish date within the constraints specified
    1261  * by in same category or excluded categories.
     1261 * by $in_same_cat or $excluded_categories.
    12621262 *
    12631263 * @since 2.8.0
    12641264 *
    1265  * @param bool $in_same_cat Optional. Whether returned post should be in same category.
     1265 * @param bool $in_same_cat Optional. Whether returned post should be in a same category.
    12661266 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    12671267 * @param bool $start Optional. Whether to retrieve first or last post.
     
    13071307 * @param string $format Optional. Link anchor format.
    13081308 * @param string $link Optional. Link permalink format.
    1309  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1309 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    13101310 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    13111311 */
     
    13211321 * @param string $format Optional. Link anchor format.
    13221322 * @param string $link Optional. Link permalink format.
    1323  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1323 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    13241324 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    13251325 */
     
    13371337 * @param string $format Link anchor format.
    13381338 * @param string $link Link permalink format.
    1339  * @param bool $in_same_cat Optional. Whether link should be in same category.
     1339 * @param bool $in_same_cat Optional. Whether link should be in a same category.
    13401340 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs.
    1341  * @param bool $previous Optional, default is true. Whether display link to previous post.
     1341 * @param bool $previous Optional, default is true. Whether to display link to previous or next post.
    13421342 */
    13431343function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) {
     
    13711371
    13721372/**
    1373  * Retrieve get links for page numbers.
     1373 * Retrieve links for page numbers.
    13741374 *
    13751375 * @since 1.5.0
     
    14331433
    14341434/**
    1435  * Retrieve next posts pages link.
     1435 * Retrieve next posts page link.
    14361436 *
    14371437 * Backported from 2.1.3 to 2.0.10.
     
    14551455
    14561456/**
    1457  * Display or return the next posts pages link.
     1457 * Display or return the next posts page link.
    14581458 *
    14591459 * @since 0.71
     
    14721472
    14731473/**
    1474  * Return the next posts pages link.
     1474 * Return the next posts page link.
    14751475 *
    14761476 * @since 2.7.0
     
    15011501
    15021502/**
    1503  * Display the next posts pages link.
     1503 * Display the next posts page link.
    15041504 *
    15051505 * @since 0.71
     
    15141514
    15151515/**
    1516  * Retrieve previous post pages link.
     1516 * Retrieve previous posts page link.
    15171517 *
    15181518 * Will only return string, if not on a single page or post.
     
    15361536
    15371537/**
    1538  * Display or return the previous posts pages link.
     1538 * Display or return the previous posts page link.
    15391539 *
    15401540 * @since 0.71
     
    15521552
    15531553/**
    1554  * Return the previous posts pages link.
     1554 * Return the previous posts page link.
    15551555 *
    15561556 * @since 2.7.0
     
    16371637
    16381638/**
    1639  * Retrieve page numbers links.
     1639 * Retrieve comments page number link.
    16401640 *
    16411641 * @since 2.7.0
     
    16731673
    16741674/**
    1675  * Return the link to next comments pages.
     1675 * Return the link to next comments page.
    16761676 *
    16771677 * @since 2.7.1
     
    17071707
    17081708/**
    1709  * Display the link to next comments pages.
     1709 * Display the link to next comments page.
    17101710 *
    17111711 * @since 2.7.0
     
    17601760 * @since 2.7.0
    17611761 *
    1762  * @param string|array $args Optional args. See paginate_links.
     1762 * @param string|array $args Optional args. See paginate_links().
    17631763 * @return string Markup for pagination links.
    17641764*/
     
    18261826 * Retrieve the home url for the current site.
    18271827 *
    1828  * Returns the 'home' option with the appropriate protocol,  'https' if
     1828 * Returns the 'home' option with the appropriate protocol, 'https' if
    18291829 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    18301830 * overridden.
     
    18361836 *
    18371837 * @param  string $path   (optional) Path relative to the home url.
    1838  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
     1838 * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'.
    18391839 * @return string Home url link with optional path appended.
    18401840*/
     
    18461846 * Retrieve the home url for a given site.
    18471847 *
    1848  * Returns the 'home' option with the appropriate protocol,  'https' if
     1848 * Returns the 'home' option with the appropriate protocol, 'https' if
    18491849 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    18501850 * overridden.
     
    18551855 * @param  int $blog_id   (optional) Blog ID. Defaults to current blog.
    18561856 * @param  string $path   (optional) Path relative to the home url.
    1857  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
     1857 * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'.
    18581858 * @return string Home url link with optional path appended.
    18591859*/
     
    18811881 * Retrieve the site url for the current site.
    18821882 *
    1883  * Returns the 'site_url' option with the appropriate protocol,  'https' if
     1883 * Returns the 'site_url' option with the appropriate protocol, 'https' if
    18841884 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    18851885 * overridden.
     
    18911891 *
    18921892 * @param string $path Optional. Path relative to the site url.
    1893  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
     1893 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'.
    18941894 * @return string Site url link with optional path appended.
    18951895*/
     
    19011901 * Retrieve the site url for a given site.
    19021902 *
    1903  * Returns the 'site_url' option with the appropriate protocol,  'https' if
     1903 * Returns the 'site_url' option with the appropriate protocol, 'https' if
    19041904 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    19051905 * overridden.
     
    19101910 * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    19111911 * @param string $path Optional. Path relative to the site url.
    1912  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
     1912 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'.
    19131913 * @return string Site url link with optional path appended.
    19141914*/
     
    19471947 * @since 2.6.0
    19481948 *
    1949  * @param string $path Optional path relative to the admin url
     1949 * @param string $path Optional path relative to the admin url.
    19501950 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    1951  * @return string Admin url link with optional path appended
     1951 * @return string Admin url link with optional path appended.
    19521952*/
    19531953function admin_url( $path = '', $scheme = 'admin' ) {
     
    19621962 *
    19631963 * @param int $blog_id (optional) Blog ID. Defaults to current blog.
    1964  * @param string $path Optional path relative to the admin url
     1964 * @param string $path Optional path relative to the admin url.
    19651965 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    1966  * @return string Admin url link with optional path appended
     1966 * @return string Admin url link with optional path appended.
    19671967*/
    19681968function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) {
     
    20552055 * Retrieve the site url for the current network.
    20562056 *
    2057  * Returns the site url with the appropriate protocol,  'https' if
     2057 * Returns the site url with the appropriate protocol, 'https' if
    20582058 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    20592059 * overridden.
     
    20632063 *
    20642064 * @param string $path Optional. Path relative to the site url.
    2065  * @param string $scheme Optional. Scheme to give the site url context. Currently 'http','https', 'login', 'login_post', or 'admin'.
     2065 * @param string $scheme Optional. Scheme to give the site url context. Currently 'http', 'https', 'login', 'login_post', or 'admin'.
    20662066 * @return string Site url link with optional path appended.
    20672067*/
     
    20952095 * Retrieve the home url for the current network.
    20962096 *
    2097  * Returns the home url with the appropriate protocol,  'https' if
     2097 * Returns the home url with the appropriate protocol, 'https' if
    20982098 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is
    20992099 * overridden.
     
    21032103 *
    21042104 * @param  string $path   (optional) Path relative to the home url.
    2105  * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http','https'
     2105 * @param  string $scheme (optional) Scheme to give the home url context. Currently 'http', 'https'.
    21062106 * @return string Home url link with optional path appended.
    21072107*/
     
    21312131 * @since 3.0.0
    21322132 *
    2133  * @param string $path Optional path relative to the admin url
     2133 * @param string $path Optional path relative to the admin url.
    21342134 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2135  * @return string Admin url link with optional path appended
     2135 * @return string Admin url link with optional path appended.
    21362136*/
    21372137function network_admin_url( $path = '', $scheme = 'admin' ) {
     
    21532153 * @since 3.0.0
    21542154 *
    2155  * @param string $path Optional path relative to the admin url
     2155 * @param string $path Optional path relative to the admin url.
    21562156 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2157  * @return string Admin url link with optional path appended
     2157 * @return string Admin url link with optional path appended.
    21582158*/
    21592159function user_admin_url( $path = '', $scheme = 'admin' ) {
     
    21722172 * @since 3.1.0
    21732173 *
    2174  * @param string $path Optional path relative to the admin url
     2174 * @param string $path Optional path relative to the admin url.
    21752175 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2176  * @return string Admin url link with optional path appended
     2176 * @return string Admin url link with optional path appended.
    21772177*/
    21782178function self_admin_url($path = '', $scheme = 'admin') {
     
    21882188 * Get the URL to the user's dashboard.
    21892189 *
    2190  * If a user does not belong to any sites, the global user dashboard is used.  If the user belongs to the current site,
    2191  * the dashboard for the current site is returned.  If the user cannot edit the current site, the dashboard to the user's
     2190 * If a user does not belong to any site, the global user dashboard is used.  If the user belongs to the current site,
     2191 * the dashboard for the current site is returned. If the user cannot edit the current site, the dashboard to the user's
    21922192 * primary blog is returned.
    21932193 *
     
    21952195 *
    21962196 * @param int $user_id User ID
    2197  * @param string $path Optional path relative to the dashboard.  Use only paths known to both blog and user admins.
     2197 * @param string $path Optional path relative to the dashboard. Use only paths known to both blog and user admins.
    21982198 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2199  * @return string Dashboard url link with optional path appended
     2199 * @return string Dashboard url link with optional path appended.
    22002200 */
    22012201function get_dashboard_url( $user_id, $path = '', $scheme = 'admin' ) {
     
    22302230 * @param int $user User ID
    22312231 * @param string $scheme The scheme to use. Default is 'admin', which obeys force_ssl_admin() and is_ssl(). 'http' or 'https' can be passed to force those schemes.
    2232  * @return string Dashboard url link with optional path appended
     2232 * @return string Dashboard url link with optional path appended.
    22332233 */
    22342234function get_edit_profile_url( $user, $scheme = 'admin' ) {
     
    22462246
    22472247/**
    2248  * Output rel=canonical for singular queries
     2248 * Output rel=canonical for singular queries.
    22492249 *
    22502250 * @package WordPress
     
    22662266 * Return a shortlink for a post, page, attachment, or blog.
    22672267 *
    2268  * This function exists to provide a shortlink tag that all themes and plugins can target.  A plugin must hook in to
    2269  * provide the actual shortlinks.  Default shortlink support is limited to providing ?p= style links for posts.
    2270  * Plugins can short circuit this function via the pre_get_shortlink filter or filter the output
     2268 * This function exists to provide a shortlink tag that all themes and plugins can target. A plugin must hook in to
     2269 * provide the actual shortlinks. Default shortlink support is limited to providing ?p= style links for posts.
     2270 * Plugins can short-circuit this function via the pre_get_shortlink filter or filter the output
    22712271 * via the get_shortlink filter.
    22722272 *
    22732273 * @since 3.0.0.
    22742274 *
    2275  * @param int $id A post or blog id.  Default is 0, which means the current post or blog.
     2275 * @param int $id A post or blog id. Default is 0, which means the current post or blog.
    22762276 * @param string $context Whether the id is a 'blog' id, 'post' id, or 'media' id. If 'post', the post_type of the post is consulted. If 'query', the current query is consulted to determine the id and context. Default is 'post'.
    22772277 * @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this.
     
    23532353 * @since 3.0.0
    23542354 *
    2355  * @param string $text Optional The link text or HTML to be displayed.  Defaults to 'This is the short link.'
    2356  * @param string $title Optional The tooltip for the link.  Must be sanitized. Defaults to the sanitized post title.
     2355 * @param string $text Optional The link text or HTML to be displayed. Defaults to 'This is the short link.'
     2356 * @param string $title Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.
    23572357 * @param string $before Optional HTML to display before the link.
    2358  * @param string $before Optional HTML to display after the link.
     2358 * @param string $after Optional HTML to display after the link.
    23592359 */
    23602360function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
Note: See TracChangeset for help on using the changeset viewer.