Changeset 32606 for trunk/src/wp-includes/link-template.php
- Timestamp:
- 05/26/2015 06:43:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/link-template.php
r32106 r32606 32 32 * 33 33 * @since 2.2.0 34 * @ uses$wp_rewrite34 * @global WP_Rewrite $wp_rewrite 35 35 * 36 36 * @param string $string URL with or without a trailing slash. … … 56 56 * 'month', 'day', 'paged', 'post_type_archive'. 57 57 */ 58 $string = apply_filters( 'user_trailingslashit', $string, $type_of_url ); 59 return $string; 58 return apply_filters( 'user_trailingslashit', $string, $type_of_url ); 60 59 } 61 60 … … 95 94 * @param int|WP_Post $id Optional. Post ID or post object. Default is the current post. 96 95 * @param bool $leavename Optional. Whether to keep post name or page name. Default false. 97 * @return string| boolThe permalink URL or false if post does not exist.96 * @return string|false The permalink URL or false if post does not exist. 98 97 */ 99 98 function get_the_permalink( $id = 0, $leavename = false ) { … … 108 107 * @param int|WP_Post $id Optional. Post ID or post object. Default current post. 109 108 * @param bool $leavename Optional. Whether to keep post name or page name. Default false. 110 * @return string| boolThe permalink URL or false if post does not exist.109 * @return string|false The permalink URL or false if post does not exist. 111 110 */ 112 111 function get_permalink( $id = 0, $leavename = false ) { … … 237 236 * @since 3.0.0 238 237 * 239 * @param int $id Optional. Post ID. 238 * @global WP_Rewrite $wp_rewrite 239 * 240 * @param int $id Optional. Post ID. 240 241 * @param bool $leavename Optional, defaults to false. Whether to keep post name. 241 * @param bool $sample Optional, defaults to false. Is it a sample permalink.242 * @return string The post permalink.242 * @param bool $sample Optional, defaults to false. Is it a sample permalink. 243 * @return string|WP_Error The post permalink. 243 244 */ 244 245 function get_post_permalink( $id = 0, $leavename = false, $sample = false ) { … … 293 294 * @since 1.0.0 294 295 * 295 * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post.296 * @param mixed $deprecated Not used.297 * @return string 296 * @param int|WP_Post $post_id Optional. Post ID or WP_Post object. Default is global $post. 297 * @param mixed $deprecated Not used. 298 * @return string|false 298 299 */ 299 300 function post_permalink( $post_id = 0, $deprecated = '' ) { … … 311 312 * @since 1.5.0 312 313 * 313 * @param int|object $post Optional. Post ID or object.314 * @param bool $leavename Optional, defaults to false. Whether to keep page name.315 * @param bool $sampleOptional, defaults to false. Is it a sample permalink.314 * @param int|object $post Optional. Post ID or object. 315 * @param bool $leavename Optional, defaults to false. Whether to keep page name. 316 * @param bool $sample Optional, defaults to false. Is it a sample permalink. 316 317 * @return string The page permalink. 317 318 */ … … 344 345 * @access private 345 346 * 346 * @param int|object $post Optional. Post ID or object. 347 * @param bool $leavename Optional. Leave name. 348 * @param bool $sample Optional. Sample permalink. 347 * @global WP_Rewrite $wp_rewrite 348 * 349 * @param int|object $post Optional. Post ID or object. 350 * @param bool $leavename Optional. Leave name. 351 * @param bool $sample Optional. Sample permalink. 349 352 * @return string The page permalink. 350 353 */ … … 387 390 * @since 2.0.0 388 391 * 389 * @param int|object $post Optional. Post ID or object. 390 * @param bool $leavename Optional. Leave name. 392 * @global WP_Rewrite $wp_rewrite 393 * 394 * @param int|object $post Optional. Post ID or object. 395 * @param bool $leavename Optional. Leave name. 391 396 * @return string The attachment permalink. 392 397 */ … … 435 440 * 436 441 * @since 1.5.0 442 * 443 * @global WP_Rewrite $wp_rewrite 437 444 * 438 445 * @param int|bool $year False for current year or year for permalink. … … 467 474 * @since 1.0.0 468 475 * 469 * @param bool|int $year False for current year. Integer of year. 476 * @global WP_Rewrite $wp_rewrite 477 * 478 * @param bool|int $year False for current year. Integer of year. 470 479 * @param bool|int $month False for current month. Integer of month. 471 480 * @return string The permalink for the specified month and year archive. … … 503 512 * @since 1.0.0 504 513 * 505 * @param bool|int $year False for current year. Integer of year. 514 * @global WP_Rewrite $wp_rewrite 515 * 516 * @param bool|int $year False for current year. Integer of year. 506 517 * @param bool|int $month False for current month. Integer of month. 507 * @param bool|int $day False for current day. Integer of day.518 * @param bool|int $day False for current day. Integer of day. 508 519 * @return string The permalink for the specified day, month, and year archive. 509 520 */ … … 546 557 * 547 558 * @param string $anchor The link's anchor text. 548 * @param string $feed Optional, defaults to default feed. Feed type.559 * @param string $feed Optional, defaults to default feed. Feed type. 549 560 */ 550 561 function the_feed_link( $anchor, $feed = '' ) { … … 567 578 * 568 579 * @since 1.5.0 580 * 581 * @global WP_Rewrite $wp_rewrite 569 582 * 570 583 * @param string $feed Optional, defaults to default feed. Feed type. … … 613 626 * @since 2.2.0 614 627 * 615 * @param int $post_id Optional. Post ID.616 * @param string $feed Optional. Feed type.628 * @param int $post_id Optional. Post ID. 629 * @param string $feed Optional. Feed type. 617 630 * @return string The permalink for the comments feed for the given post. 618 631 */ … … 664 677 * 665 678 * @param string $link_text Descriptive text. 666 * @param int $post_id Optional post ID. Default to current post. 667 * @param string $feed Optional. Feed format. 668 * @return string Link to the comment feed for the current post. 679 * @param int $post_id Optional post ID. Default to current post. 680 * @param string $feed Optional. Feed format. 669 681 */ 670 682 function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) { … … 693 705 * @since 2.5.0 694 706 * 695 * @param int $author_id ID of an author.696 * @param string $feed Optional. Feed type.707 * @param int $author_id ID of an author. 708 * @param string $feed Optional. Feed type. 697 709 * @return string Link to the feed for the author specified by $author_id. 698 710 */ … … 737 749 * @since 2.5.0 738 750 * 739 * @param int $cat_id ID of a category.740 * @param string $feed Optional. Feed type.751 * @param int $cat_id ID of a category. 752 * @param string $feed Optional. Feed type. 741 753 * @return string Link to the feed for the category specified by $cat_id. 742 754 */ 743 function get_category_feed_link( $cat_id, $feed = '') {744 return get_term_feed_link( $cat_id, 'category', $feed);755 function get_category_feed_link( $cat_id, $feed = '' ) { 756 return get_term_feed_link( $cat_id, 'category', $feed ); 745 757 } 746 758 … … 753 765 * @since 3.0.0 754 766 * 755 * @param int $term_idID of a category.767 * @param int $term_id ID of a category. 756 768 * @param string $taxonomy Optional. Taxonomy of $term_id 757 * @param string $feed Optional. Feed type.758 * @return string Link to the feed for the term specified by $term_id and $taxonomy.769 * @param string $feed Optional. Feed type. 770 * @return string|false Link to the feed for the term specified by $term_id and $taxonomy. 759 771 */ 760 772 function get_term_feed_link( $term_id, $taxonomy = 'category', $feed = '' ) { … … 832 844 * @since 2.3.0 833 845 * 834 * @param int $tag_id Tag ID.835 * @param string $feed Optional. Feed type.846 * @param int $tag_id Tag ID. 847 * @param string $feed Optional. Feed type. 836 848 * @return string The feed permalink for the given tag. 837 849 */ 838 function get_tag_feed_link( $tag_id, $feed = '') {839 return get_term_feed_link( $tag_id, 'post_tag', $feed);850 function get_tag_feed_link( $tag_id, $feed = '' ) { 851 return get_term_feed_link( $tag_id, 'post_tag', $feed ); 840 852 } 841 853 … … 845 857 * @since 2.7.0 846 858 * 847 * @param int $tag_idTag ID859 * @param int $tag_id Tag ID 848 860 * @param string $taxonomy Taxonomy 849 861 * @return string The edit tag link URL for the given tag. … … 865 877 * @since 2.7.0 866 878 * 867 * @param string $link Optional. Anchor text.879 * @param string $link Optional. Anchor text. 868 880 * @param string $before Optional. Display before edit link. 869 * @param string $after Optional. Display after edit link. 870 * @param object $tag Tag object. 871 * @return string HTML content. 881 * @param string $after Optional. Display after edit link. 882 * @param object $tag Tag object. 872 883 */ 873 884 function edit_tag_link( $link = '', $before = '', $after = '', $tag = null ) { … … 934 945 * @since 3.1.0 935 946 * 936 * @param string $link Optional. Anchor text.947 * @param string $link Optional. Anchor text. 937 948 * @param string $before Optional. Display before edit link. 938 * @param string $after Optional. Display after edit link.939 * @param object $term Term object.940 * @return string HTML content.949 * @param string $after Optional. Display after edit link. 950 * @param object $term Term object. 951 * @return string|void HTML content. 941 952 */ 942 953 function edit_term_link( $link = '', $before = '', $after = '', $term = null, $echo = true ) { … … 976 987 * 977 988 * @since 3.0.0 989 * 990 * @global WP_Rewrite $wp_rewrite 978 991 * 979 992 * @param string $query Optional. The query string to use. If empty the current query is used. … … 1015 1028 * @since 2.5.0 1016 1029 * 1030 * @global WP_Rewrite $wp_rewrite 1031 * 1017 1032 * @param string $search_query Optional. Search query. 1018 * @param string $feed Optional. Feed type.1033 * @param string $feed Optional. Feed type. 1019 1034 * @return string The search results feed permalink. 1020 1035 */ … … 1044 1059 * @param string $type The search type. One of 'posts' or 'comments'. 1045 1060 */ 1046 $link = apply_filters( 'search_feed_link', $link, $feed, 'posts' ); 1047 1048 return $link; 1061 return apply_filters( 'search_feed_link', $link, $feed, 'posts' ); 1049 1062 } 1050 1063 … … 1054 1067 * @since 2.5.0 1055 1068 * 1069 * @global WP_Rewrite $wp_rewrite 1070 * 1056 1071 * @param string $search_query Optional. Search query. 1057 * @param string $feed Optional. Feed type.1072 * @param string $feed Optional. Feed type. 1058 1073 * @return string The comments feed search results permalink. 1059 1074 */ … … 1074 1089 1075 1090 /** This filter is documented in wp-includes/link-template.php */ 1076 $link = apply_filters('search_feed_link', $link, $feed, 'comments'); 1077 1078 return $link; 1091 return apply_filters( 'search_feed_link', $link, $feed, 'comments' ); 1079 1092 } 1080 1093 … … 1084 1097 * @since 3.1.0 1085 1098 * 1099 * @global WP_Rewrite $wp_rewrite 1100 * 1086 1101 * @param string $post_type Post type 1087 * @return string The post type archive permalink.1102 * @return string|false The post type archive permalink. 1088 1103 */ 1089 1104 function get_post_type_archive_link( $post_type ) { … … 1123 1138 * 1124 1139 * @param string $post_type Post type 1125 * @param string $feed Optional. Feed type1126 * @return string The post type feed permalink.1140 * @param string $feed Optional. Feed type 1141 * @return string|false The post type feed permalink. 1127 1142 */ 1128 1143 function get_post_type_archive_feed_link( $post_type, $feed = '' ) { … … 1163 1178 * @since 2.3.0 1164 1179 * 1165 * @param int $idOptional. Post ID.1180 * @param int $id Optional. Post ID. 1166 1181 * @param string $context Optional, defaults to display. How to write the '&', defaults to '&'. 1167 * @return string The edit post link for the given post.1182 * @return string|void The edit post link for the given post. 1168 1183 */ 1169 1184 function get_edit_post_link( $id = 0, $context = 'display' ) { … … 1203 1218 * @since 1.0.0 1204 1219 * 1205 * @param string $text Optional. Anchor text.1220 * @param string $text Optional. Anchor text. 1206 1221 * @param string $before Optional. Display before edit link. 1207 * @param string $after Optional. Display after edit link.1208 * @param int $idOptional. Post ID.1222 * @param string $after Optional. Display after edit link. 1223 * @param int $id Optional. Post ID. 1209 1224 */ 1210 1225 function edit_post_link( $text = null, $before = '', $after = '', $id = 0 ) { … … 1242 1257 * @since 2.9.0 1243 1258 * 1244 * @param int $idOptional. Post ID.1245 * @param string $deprecated Not used.1246 * @param bool $force_delete Whether to bypass trash and force deletion. Default is false.1247 * @return string The delete post link URL for the given post.1259 * @param int $id Optional. Post ID. 1260 * @param string $deprecated Not used. 1261 * @param bool $force_delete Whether to bypass trash and force deletion. Default is false. 1262 * @return string|void The delete post link URL for the given post. 1248 1263 */ 1249 1264 function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) { … … 1283 1298 * 1284 1299 * @param int $comment_id Optional. Comment ID. 1285 * @return string The edit comment link URL for the given comment.1300 * @return string|void The edit comment link URL for the given comment. 1286 1301 */ 1287 1302 function get_edit_comment_link( $comment_id = 0 ) { … … 1308 1323 * @since 1.0.0 1309 1324 * 1310 * @param string $text Optional. Anchor text. 1325 * @global object $comment 1326 * 1327 * @param string $text Optional. Anchor text. 1311 1328 * @param string $before Optional. Display before edit link. 1312 * @param string $after Optional. Display after edit link.1329 * @param string $after Optional. Display after edit link. 1313 1330 */ 1314 1331 function edit_comment_link( $text = null, $before = '', $after = '' ) { … … 1343 1360 * 1344 1361 * @param int|stdClass $link Optional. Bookmark ID. 1345 * @return string The edit bookmark link URL.1362 * @return string|void The edit bookmark link URL. 1346 1363 */ 1347 1364 function get_edit_bookmark_link( $link = 0 ) { … … 1369 1386 * @since 2.7.0 1370 1387 * 1371 * @param string $link Optional. Anchor text.1372 * @param string $before Optional. Display before edit link.1373 * @param string $after Optional. Display after edit link.1374 * @param int $bookmark Optional. Bookmark ID.1388 * @param string $link Optional. Anchor text. 1389 * @param string $before Optional. Display before edit link. 1390 * @param string $after Optional. Display after edit link. 1391 * @param int $bookmark Optional. Bookmark ID. 1375 1392 */ 1376 1393 function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) { … … 1442 1459 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1443 1460 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1444 * @return mixedPost object if successful. Null if global $post is not set. Empty string if no corresponding post exists.1461 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1445 1462 */ 1446 1463 function get_previous_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { … … 1456 1473 * @param array|string $excluded_terms Optional. Array or comma-separated list of excluded term IDs. 1457 1474 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1458 * @return mixedPost object if successful. Null if global $post is not set. Empty string if no corresponding post exists.1475 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1459 1476 */ 1460 1477 function get_next_post( $in_same_term = false, $excluded_terms = '', $taxonomy = 'category' ) { … … 1468 1485 * 1469 1486 * @since 2.5.0 1487 * 1488 * @global wpdb $wpdb 1470 1489 * 1471 1490 * @param bool $in_same_term Optional. Whether post should be in a same taxonomy term. … … 1473 1492 * @param bool $previous Optional. Whether to retrieve previous post. 1474 1493 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1475 * @return mixedPost object if successful. Null if global $post is not set. Empty string if no corresponding post exists.1494 * @return null|string|WP_Post Post object if successful. Null if global $post is not set. Empty string if no corresponding post exists. 1476 1495 */ 1477 1496 function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { … … 1629 1648 * @param bool $previous Optional. Whether to display link to previous or next post. Default true. 1630 1649 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1631 * @return string The adjacent post relational link URL.1650 * @return string|void The adjacent post relational link URL. 1632 1651 */ 1633 1652 function get_adjacent_post_rel_link( $title = '%title', $in_same_term = false, $excluded_terms = '', $previous = true, $taxonomy = 'category' ) { … … 1738 1757 * @param bool $start Optional. Whether to retrieve first or last post. 1739 1758 * @param string $taxonomy Optional. Taxonomy, if $in_same_term is true. Default 'category'. 1740 * @return mixedArray containing the boundary post object if successful, null otherwise.1759 * @return null|array Array containing the boundary post object if successful, null otherwise. 1741 1760 */ 1742 1761 function get_boundary_post( $in_same_term = false, $excluded_terms = '', $start = true, $taxonomy = 'category' ) { … … 1934 1953 * @since 1.5.0 1935 1954 * 1936 * @param int $pagenum Optional. Page ID. 1937 * @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true. 1938 * Otherwise, prepares the URL with esc_url_raw(). 1955 * @global WP_Rewrite $wp_rewrite 1956 * 1957 * @param int $pagenum Optional. Page ID. 1958 * @param bool $escape Optional. Whether to escape the URL for display, with esc_url(). Defaults to true. 1959 * Otherwise, prepares the URL with esc_url_raw(). 1939 1960 * @return string The link URL for the given page number. 1940 1961 */ … … 2010 2031 * @since 2.0.10 2011 2032 * 2033 * @global int $paged 2034 * 2012 2035 * @param int $max_page Optional. Max pages. 2013 * @return string The link URL for next posts page.2036 * @return string|void The link URL for next posts page. 2014 2037 */ 2015 2038 function get_next_posts_page_link($max_page = 0) { … … 2030 2053 * @since 0.71 2031 2054 * 2032 * @param int $max_page Optional. Max pages.2033 * @param boolean $echo Optional. Echo or return;2034 * @return string The link URL for next posts page if `$echo = false`.2055 * @param int $max_page Optional. Max pages. 2056 * @param boolean $echo Optional. Echo or return; 2057 * @return string|void The link URL for next posts page if `$echo = false`. 2035 2058 */ 2036 2059 function next_posts( $max_page = 0, $echo = true ) { … … 2048 2071 * @since 2.7.0 2049 2072 * 2050 * @param string $label Content for link text. 2051 * @param int $max_page Optional. Max pages. 2052 * @return string|null HTML-formatted next posts page link. 2073 * @global int $paged 2074 * @global WP_Query $wp_query 2075 * 2076 * @param string $label Content for link text. 2077 * @param int $max_page Optional. Max pages. 2078 * @return string|void HTML-formatted next posts page link. 2053 2079 */ 2054 2080 function get_next_posts_link( $label = null, $max_page = 0 ) { … … 2085 2111 * @since 0.71 2086 2112 * 2087 * @param string $label Content for link text.2088 * @param int $max_page Optional. Max pages.2113 * @param string $label Content for link text. 2114 * @param int $max_page Optional. Max pages. 2089 2115 */ 2090 2116 function next_posts_link( $label = null, $max_page = 0 ) { … … 2101 2127 * @since 2.0.10 2102 2128 * 2103 * @return string|null The link for the previous posts page. 2129 * @global int $paged 2130 * 2131 * @return string|void The link for the previous posts page. 2104 2132 */ 2105 2133 function get_previous_posts_page_link() { … … 2120 2148 * 2121 2149 * @param boolean $echo Optional. Echo or return; 2122 * @return string The previous posts page link if `$echo = false`.2150 * @return string|void The previous posts page link if `$echo = false`. 2123 2151 */ 2124 2152 function previous_posts( $echo = true ) { … … 2136 2164 * @since 2.7.0 2137 2165 * 2166 * @global int $paged 2167 * 2138 2168 * @param string $label Optional. Previous page link text. 2139 * @return string| nullHTML-formatted previous page link.2169 * @return string|void HTML-formatted previous page link. 2140 2170 */ 2141 2171 function get_previous_posts_link( $label = null ) { … … 2174 2204 * @since 2.8.0 2175 2205 * 2206 * @global WP_Query $wp_query 2207 * 2176 2208 * @param string|array $args Optional args. 2177 2209 * @return string The posts link navigation. … … 2213 2245 * @since 0.71 2214 2246 * 2215 * @param string $sep Optional. Separator for posts navigation links.2247 * @param string $sep Optional. Separator for posts navigation links. 2216 2248 * @param string $prelabel Optional. Label for previous pages. 2217 2249 * @param string $nxtlabel Optional Label for next pages. … … 2411 2443 * @since 2.7.0 2412 2444 * 2413 * @param int $pagenum Optional. Page number. 2445 * @global WP_Rewrite $wp_rewrite 2446 * 2447 * @param int $pagenum Optional. Page number. 2414 2448 * @param int $max_page Optional. The maximum number of comment pages. 2415 2449 * @return string The comments page number link URL. … … 2445 2479 * @param string $result The comments page number link. 2446 2480 */ 2447 $result = apply_filters( 'get_comments_pagenum_link', $result ); 2448 2449 return $result; 2481 return apply_filters( 'get_comments_pagenum_link', $result ); 2450 2482 } 2451 2483 … … 2455 2487 * @since 2.7.1 2456 2488 * 2457 * @param string $label Optional. Label for link text. 2458 * @param int $max_page Optional. Max page. 2459 * @return string|null HTML-formatted link for the next page of comments. 2489 * @global WP_Query $wp_query 2490 * 2491 * @param string $label Optional. Label for link text. 2492 * @param int $max_page Optional. Max page. 2493 * @return string|void HTML-formatted link for the next page of comments. 2460 2494 */ 2461 2495 function get_next_comments_link( $label = '', $max_page = 0 ) { … … 2500 2534 * @since 2.7.0 2501 2535 * 2502 * @param string $label Optional. Label for link text.2503 * @param int $max_page Optional. Max page.2536 * @param string $label Optional. Label for link text. 2537 * @param int $max_page Optional. Max page. 2504 2538 */ 2505 2539 function next_comments_link( $label = '', $max_page = 0 ) { … … 2513 2547 * 2514 2548 * @param string $label Optional. Label for comments link text. 2515 * @return string| nullHTML-formatted link for the previous page of comments.2549 * @return string|void HTML-formatted link for the previous page of comments. 2516 2550 */ 2517 2551 function get_previous_comments_link( $label = '' ) { … … 2556 2590 * @since 2.7.0 2557 2591 * 2592 * @global WP_Rewrite $wp_rewrite 2593 * 2558 2594 * @param string|array $args Optional args. See paginate_links(). 2559 * @return string Markup for pagination links.2595 * @return string|void Markup for pagination links. 2560 2596 */ 2561 2597 function paginate_comments_links($args = array()) { … … 2596 2632 * @since 2.6.0 2597 2633 * 2634 * @global bool $is_IE 2635 * @global string $wp_version 2636 * @global WP_Press_This $wp_press_this 2637 * 2598 2638 * @return string The Press This bookmarklet link URL. 2599 2639 */ … … 2675 2715 * @since 3.0.0 2676 2716 * 2717 * @global string $pagenow 2718 * 2677 2719 * @param int $blog_id Optional. Blog ID. Default null (current blog). 2678 2720 * @param string $path Optional. Path relative to the home URL. Default empty. … … 2726 2768 * @since 3.0.0 2727 2769 * 2728 * @param string $path Optional. Path relative to the site url.2770 * @param string $path Optional. Path relative to the site url. 2729 2771 * @param string $scheme Optional. Scheme to give the site url context. See set_url_scheme(). 2730 2772 * @return string Site url link with optional path appended. … … 2783 2825 * @since 2.6.0 2784 2826 * 2785 * @param string $path Optional path relative to the admin url.2827 * @param string $path Optional path relative to the admin url. 2786 2828 * @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. 2787 2829 * @return string Admin url link with optional path appended. … … 2826 2868 * @since 2.6.0 2827 2869 * 2828 * @param string $path Optional. Path relative to the includes url.2870 * @param string $path Optional. Path relative to the includes url. 2829 2871 * @param string $scheme Optional. Scheme to give the includes url context. 2830 2872 * @return string Includes url link with optional path appended. … … 2934 2976 * @since 3.0.0 2935 2977 * 2936 * @param string $path Optional. Path relative to the site url.2978 * @param string $path Optional. Path relative to the site url. 2937 2979 * @param string $scheme Optional. Scheme to give the site url context. See set_url_scheme(). 2938 2980 * @return string Site url link with optional path appended. … … 3017 3059 * @since 3.0.0 3018 3060 * 3019 * @param string $path Optional path relative to the admin url.3061 * @param string $path Optional path relative to the admin url. 3020 3062 * @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. 3021 3063 * @return string Admin url link with optional path appended. … … 3047 3089 * @since 3.0.0 3048 3090 * 3049 * @param string $path Optional path relative to the admin url.3091 * @param string $path Optional path relative to the admin url. 3050 3092 * @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. 3051 3093 * @return string Admin url link with optional path appended. … … 3074 3116 * @since 3.1.0 3075 3117 * 3076 * @param string $path Optional path relative to the admin url.3118 * @param string $path Optional path relative to the admin url. 3077 3119 * @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. 3078 3120 * @return string Admin url link with optional path appended. … … 3092 3134 * @since 3.4.0 3093 3135 * 3094 * @param string $url Absolute url that includes a scheme3136 * @param string $url Absolute url that includes a scheme 3095 3137 * @param string $scheme Optional. Scheme to give $url. Currently 'http', 'https', 'login', 'login_post', 'admin', or 'relative'. 3096 3138 * @return string $url URL with chosen scheme. … … 3141 3183 * @since 3.1.0 3142 3184 * 3143 * @param int $user_id Optional. User ID. Defaults to current user.3144 * @param string $path Optional path relative to the dashboard. Use only paths known to both blog and user admins.3145 * @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.3185 * @param int $user_id Optional. User ID. Defaults to current user. 3186 * @param string $path Optional path relative to the dashboard. Use only paths known to both blog and user admins. 3187 * @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. 3146 3188 * @return string Dashboard url link with optional path appended. 3147 3189 */ … … 3218 3260 * 3219 3261 * @since 2.9.0 3262 * 3263 * @global WP_Query $wp_the_query 3220 3264 */ 3221 3265 function rel_canonical() { … … 3245 3289 * @since 3.0.0. 3246 3290 * 3247 * @param int $id A post or blog id. Default is 0, which means the current post or blog. 3248 * @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'. 3249 * @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this. 3291 * @global WP_Query $wp_query 3292 * 3293 * @param int $id A post or blog id. Default is 0, which means the current post or blog. 3294 * @param string $context Whether the id is a 'blog' id, 'post' id, or 'media' id. 3295 * If 'post', the post_type of the post is consulted. 3296 * If 'query', the current query is consulted to determine the id and context. 3297 * Default is 'post'. 3298 * @param bool $allow_slugs Whether to allow post slugs in the shortlink. It is up to the plugin how and whether to honor this. 3250 3299 * @return string A shortlink or an empty string if no shortlink exists for the requested resource or if shortlinks are not enabled. 3251 3300 */ … … 3350 3399 * @since 3.0.0 3351 3400 * 3352 * @param string $text Optional The link text or HTML to be displayed. Defaults to 'This is the short link.'3353 * @param string $title Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title.3401 * @param string $text Optional The link text or HTML to be displayed. Defaults to 'This is the short link.' 3402 * @param string $title Optional The tooltip for the link. Must be sanitized. Defaults to the sanitized post title. 3354 3403 * @param string $before Optional HTML to display before the link. 3355 * @param string $after Optional HTML to display after the link.3404 * @param string $after Optional HTML to display after the link. 3356 3405 */ 3357 3406 function the_shortlink( $text = '', $title = '', $before = '', $after = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.