Changeset 18827 for trunk/wp-includes/link-template.php
- Timestamp:
- 09/29/2011 10:57:43 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/link-template.php (modified) (51 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/link-template.php
r18680 r18827 561 561 * Retrieve the feed link for a category. 562 562 * 563 * Returns a link to the feed for all post in a given category. A specific feed563 * Returns a link to the feed for all posts in a given category. A specific feed 564 564 * can be requested or left blank to get the default feed. 565 565 * … … 577 577 578 578 /** 579 * Retrieve the feed link for a t axonomy.580 * 581 * Returns a link to the feed for all post in a given term. A specific feed579 * 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 582 582 * can be requested or left blank to get the default feed. 583 583 * … … 587 587 * @param string $taxonomy Optional. Taxonomy of $term_id 588 588 * @param string $feed Optional. Feed type. 589 * @return string Link to the feed for the t axonomyspecified by $term_id and $taxonomy.589 * @return string Link to the feed for the term specified by $term_id and $taxonomy. 590 590 */ 591 591 function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { … … 896 896 * 897 897 * @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 '&'. 899 899 * @return string 900 900 */ … … 1065 1065 * @since 1.5.0 1066 1066 * 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. 1068 1068 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1069 1069 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. … … 1078 1078 * @since 1.5.0 1079 1079 * 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. 1081 1081 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1082 1082 * @return mixed Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. … … 1093 1093 * @since 2.5.0 1094 1094 * 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. 1096 1096 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1097 1097 * @param bool $previous Optional. Whether to retrieve previous post. … … 1171 1171 * 1172 1172 * @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. 1174 1174 * @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 previouspost.1175 * @param bool $previous Optional, default is true. Whether to display link to previous or next post. 1176 1176 * @return string 1177 1177 */ … … 1208 1208 * 1209 1209 * @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. 1211 1211 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1212 1212 */ … … 1219 1219 * Display relational links for the posts adjacent to the current post for single post pages. 1220 1220 * 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. 1222 1222 * @since 3.0.0 1223 1223 * … … 1235 1235 * 1236 1236 * @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. 1238 1238 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1239 1239 */ … … 1248 1248 * 1249 1249 * @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. 1251 1251 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1252 1252 */ … … 1259 1259 * 1260 1260 * Boundary being either the first or last post by publish date within the constraints specified 1261 * by in same category or excludedcategories.1261 * by $in_same_cat or $excluded_categories. 1262 1262 * 1263 1263 * @since 2.8.0 1264 1264 * 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. 1266 1266 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1267 1267 * @param bool $start Optional. Whether to retrieve first or last post. … … 1307 1307 * @param string $format Optional. Link anchor format. 1308 1308 * @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. 1310 1310 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1311 1311 */ … … 1321 1321 * @param string $format Optional. Link anchor format. 1322 1322 * @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. 1324 1324 * @param array|string $excluded_categories Optional. Array or comma-separated list of excluded category IDs. 1325 1325 */ … … 1337 1337 * @param string $format Link anchor format. 1338 1338 * @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. 1340 1340 * @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 previouspost.1341 * @param bool $previous Optional, default is true. Whether to display link to previous or next post. 1342 1342 */ 1343 1343 function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) { … … 1371 1371 1372 1372 /** 1373 * Retrieve getlinks for page numbers.1373 * Retrieve links for page numbers. 1374 1374 * 1375 1375 * @since 1.5.0 … … 1433 1433 1434 1434 /** 1435 * Retrieve next posts page slink.1435 * Retrieve next posts page link. 1436 1436 * 1437 1437 * Backported from 2.1.3 to 2.0.10. … … 1455 1455 1456 1456 /** 1457 * Display or return the next posts page slink.1457 * Display or return the next posts page link. 1458 1458 * 1459 1459 * @since 0.71 … … 1472 1472 1473 1473 /** 1474 * Return the next posts page slink.1474 * Return the next posts page link. 1475 1475 * 1476 1476 * @since 2.7.0 … … 1501 1501 1502 1502 /** 1503 * Display the next posts page slink.1503 * Display the next posts page link. 1504 1504 * 1505 1505 * @since 0.71 … … 1514 1514 1515 1515 /** 1516 * Retrieve previous post pageslink.1516 * Retrieve previous posts page link. 1517 1517 * 1518 1518 * Will only return string, if not on a single page or post. … … 1536 1536 1537 1537 /** 1538 * Display or return the previous posts page slink.1538 * Display or return the previous posts page link. 1539 1539 * 1540 1540 * @since 0.71 … … 1552 1552 1553 1553 /** 1554 * Return the previous posts page slink.1554 * Return the previous posts page link. 1555 1555 * 1556 1556 * @since 2.7.0 … … 1637 1637 1638 1638 /** 1639 * Retrieve page numbers links.1639 * Retrieve comments page number link. 1640 1640 * 1641 1641 * @since 2.7.0 … … 1673 1673 1674 1674 /** 1675 * Return the link to next comments page s.1675 * Return the link to next comments page. 1676 1676 * 1677 1677 * @since 2.7.1 … … 1707 1707 1708 1708 /** 1709 * Display the link to next comments page s.1709 * Display the link to next comments page. 1710 1710 * 1711 1711 * @since 2.7.0 … … 1760 1760 * @since 2.7.0 1761 1761 * 1762 * @param string|array $args Optional args. See paginate_links .1762 * @param string|array $args Optional args. See paginate_links(). 1763 1763 * @return string Markup for pagination links. 1764 1764 */ … … 1826 1826 * Retrieve the home url for the current site. 1827 1827 * 1828 * Returns the 'home' option with the appropriate protocol, 'https' if1828 * Returns the 'home' option with the appropriate protocol, 'https' if 1829 1829 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1830 1830 * overridden. … … 1836 1836 * 1837 1837 * @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'. 1839 1839 * @return string Home url link with optional path appended. 1840 1840 */ … … 1846 1846 * Retrieve the home url for a given site. 1847 1847 * 1848 * Returns the 'home' option with the appropriate protocol, 'https' if1848 * Returns the 'home' option with the appropriate protocol, 'https' if 1849 1849 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1850 1850 * overridden. … … 1855 1855 * @param int $blog_id (optional) Blog ID. Defaults to current blog. 1856 1856 * @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'. 1858 1858 * @return string Home url link with optional path appended. 1859 1859 */ … … 1881 1881 * Retrieve the site url for the current site. 1882 1882 * 1883 * Returns the 'site_url' option with the appropriate protocol, 'https' if1883 * Returns the 'site_url' option with the appropriate protocol, 'https' if 1884 1884 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1885 1885 * overridden. … … 1891 1891 * 1892 1892 * @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'. 1894 1894 * @return string Site url link with optional path appended. 1895 1895 */ … … 1901 1901 * Retrieve the site url for a given site. 1902 1902 * 1903 * Returns the 'site_url' option with the appropriate protocol, 'https' if1903 * Returns the 'site_url' option with the appropriate protocol, 'https' if 1904 1904 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1905 1905 * overridden. … … 1910 1910 * @param int $blog_id (optional) Blog ID. Defaults to current blog. 1911 1911 * @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'. 1913 1913 * @return string Site url link with optional path appended. 1914 1914 */ … … 1947 1947 * @since 2.6.0 1948 1948 * 1949 * @param string $path Optional path relative to the admin url 1949 * @param string $path Optional path relative to the admin url. 1950 1950 * @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. 1952 1952 */ 1953 1953 function admin_url( $path = '', $scheme = 'admin' ) { … … 1962 1962 * 1963 1963 * @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. 1965 1965 * @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. 1967 1967 */ 1968 1968 function get_admin_url( $blog_id = null, $path = '', $scheme = 'admin' ) { … … 2055 2055 * Retrieve the site url for the current network. 2056 2056 * 2057 * Returns the site url with the appropriate protocol, 'https' if2057 * Returns the site url with the appropriate protocol, 'https' if 2058 2058 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 2059 2059 * overridden. … … 2063 2063 * 2064 2064 * @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'. 2066 2066 * @return string Site url link with optional path appended. 2067 2067 */ … … 2095 2095 * Retrieve the home url for the current network. 2096 2096 * 2097 * Returns the home url with the appropriate protocol, 'https' if2097 * Returns the home url with the appropriate protocol, 'https' if 2098 2098 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 2099 2099 * overridden. … … 2103 2103 * 2104 2104 * @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'. 2106 2106 * @return string Home url link with optional path appended. 2107 2107 */ … … 2131 2131 * @since 3.0.0 2132 2132 * 2133 * @param string $path Optional path relative to the admin url 2133 * @param string $path Optional path relative to the admin url. 2134 2134 * @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. 2136 2136 */ 2137 2137 function network_admin_url( $path = '', $scheme = 'admin' ) { … … 2153 2153 * @since 3.0.0 2154 2154 * 2155 * @param string $path Optional path relative to the admin url 2155 * @param string $path Optional path relative to the admin url. 2156 2156 * @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. 2158 2158 */ 2159 2159 function user_admin_url( $path = '', $scheme = 'admin' ) { … … 2172 2172 * @since 3.1.0 2173 2173 * 2174 * @param string $path Optional path relative to the admin url 2174 * @param string $path Optional path relative to the admin url. 2175 2175 * @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. 2177 2177 */ 2178 2178 function self_admin_url($path = '', $scheme = 'admin') { … … 2188 2188 * Get the URL to the user's dashboard. 2189 2189 * 2190 * If a user does not belong to any site s, 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's2190 * 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 2192 2192 * primary blog is returned. 2193 2193 * … … 2195 2195 * 2196 2196 * @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. 2198 2198 * @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. 2200 2200 */ 2201 2201 function get_dashboard_url( $user_id, $path = '', $scheme = 'admin' ) { … … 2230 2230 * @param int $user User ID 2231 2231 * @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. 2233 2233 */ 2234 2234 function get_edit_profile_url( $user, $scheme = 'admin' ) { … … 2246 2246 2247 2247 /** 2248 * Output rel=canonical for singular queries 2248 * Output rel=canonical for singular queries. 2249 2249 * 2250 2250 * @package WordPress … … 2266 2266 * Return a shortlink for a post, page, attachment, or blog. 2267 2267 * 2268 * This function exists to provide a shortlink tag that all themes and plugins can target. A plugin must hook in to2269 * 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 output2268 * 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 2271 2271 * via the get_shortlink filter. 2272 2272 * 2273 2273 * @since 3.0.0. 2274 2274 * 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. 2276 2276 * @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'. 2277 2277 * @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this. … … 2353 2353 * @since 3.0.0 2354 2354 * 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. 2357 2357 * @param string $before Optional HTML to display before the link. 2358 * @param string $ beforeOptional HTML to display after the link.2358 * @param string $after Optional HTML to display after the link. 2359 2359 */ 2360 2360 function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.