Ticket #5642: 5642.r9247.diff
| File 5642.r9247.diff, 22.5 KB (added by , 17 years ago) |
|---|
-
link-template.php
7 7 */ 8 8 9 9 /** 10 * {@internal Missing Short Description}}10 * Display the permalink for the current post. 11 11 * 12 * {@internal Missing Long Description}}13 *14 12 * @since 1.2.0 15 * @uses apply_filters() 13 * @uses apply_filters() Calls 'the_permalink' filter on the permalink string. 16 14 */ 17 15 function the_permalink() { 18 16 echo apply_filters('the_permalink', get_permalink()); 19 17 } 20 18 21 19 /** 22 * {@internal Missing Short Description}}20 * Retrieve trailing slash string, if blog set for adding trailing slashes. 23 21 * 24 * Conditionally adds a trailing slash if the permalink structure 25 * has a trailing slash, strips the trailing slash if not 26 * {@internal Missing Long Description}} 22 * Conditionally adds a trailing slash if the permalink structure has a trailing 23 * slash, strips the trailing slash if not. The string is passed through the 24 * 'user_trailingslashit' filter. Will remove trailing slash from string, if 25 * blog is not set to have them. 27 26 * 28 27 * @since 2.2.0 29 28 * @uses $wp_rewrite 30 29 * 31 * @param $string String a URL with or without a trailing slash 32 * @param $type_of_url String the type of URL being considered (e.g. single, category, etc) for use in the filter 30 * @param $string String a URL with or without a trailing slash. 31 * @param $type_of_url String the type of URL being considered (e.g. single, category, etc) for use in the filter. 33 32 * @return string 34 33 */ 35 34 function user_trailingslashit($string, $type_of_url = '') { … … 46 45 } 47 46 48 47 /** 49 * {@internal Missing Short Description}}48 * Display permalink anchor for current post. 50 49 * 51 * {@internal Missing Long Description}} 50 * The permalink mode title will use the post title for the 'a' element 'id' 51 * attribute. The id mode uses 'post-' with the post ID for the 'id' attribute. 52 52 * 53 53 * @since 0.71 54 54 * 55 * @param unknown_type $mode55 * @param string $mode Permalink mode can be either 'title', 'id', or default, which is 'id'. 56 56 */ 57 57 function permalink_anchor($mode = 'id') { 58 58 global $post; … … 69 69 } 70 70 71 71 /** 72 * {@internal Missing Short Description}}72 * Retrieve full permalink for current post or post ID. 73 73 * 74 * {@internal Missing Long Description}}75 *76 74 * @since 1.0.0 77 75 * 78 * @param unknown_type $id 79 * @return unknown 76 * @param int $id Optional. Post ID. 77 * @param bool $leavename Optional, defaults to false. Whether to keep post name or page name. 78 * @return string 80 79 */ 81 function get_permalink($id = 0, $leavename =false) {80 function get_permalink($id = 0, $leavename = false) { 82 81 $rewritecode = array( 83 82 '%year%', 84 83 '%monthnum%', … … 95 94 96 95 $post = &get_post($id); 97 96 98 if ( empty($post->ID) ) return FALSE;97 if ( empty($post->ID) ) return false; 99 98 100 99 if ( $post->post_type == 'page' ) 101 100 return get_page_link($post->ID, $leavename); … … 114 113 usort($cats, '_usort_terms_by_ID'); // order by ID 115 114 $category = $cats[0]->slug; 116 115 if ( $parent=$cats[0]->parent ) 117 $category = get_category_parents($parent, FALSE, '/', TRUE) . $category;116 $category = get_category_parents($parent, false, '/', true) . $category; 118 117 119 118 // show default category in permalinks, without 120 119 // having to assign it explicitly … … 157 156 /** 158 157 * Retrieve permalink from post ID. 159 158 * 160 * {@internal Missing Long Description}}161 *162 159 * @since 1.0.0 163 160 * 164 * @param unknown_type $post_id165 * @param unknown_type $deprecated166 * @return unknown161 * @param int $post_id Optional. Post ID. 162 * @param mixed $deprecated Not used. 163 * @return string 167 164 */ 168 165 function post_permalink($post_id = 0, $deprecated = '') { 169 166 return get_permalink($post_id); 170 167 } 171 168 172 // Respects page_on_front. Use this one.173 169 /** 174 * {@internal Missing Short Description}}170 * Retrieve the permalink for current page or page ID. 175 171 * 176 * {@internal Missing Long Description}}172 * Respects page_on_front. Use this one. 177 173 * 178 174 * @since 1.5.0 179 175 * 180 * @param unknown_type $id 181 * @return unknown 176 * @param int $id Optional. Post ID. 177 * @param bool $leavename Optional, defaults to false. Whether to keep post name or page name. 178 * @return string 182 179 */ 183 180 function get_page_link($id = false, $leavename = false) { 184 181 global $post; … … 196 193 } 197 194 198 195 /** 199 * {@internal Missing Short Description}}196 * Retrieve the page permalink. 200 197 * 201 * {@internal Missing Long Description}}202 *203 198 * Ignores page_on_front. Internal use only. 204 199 * 205 200 * @since 2.1.0 206 201 * @access private 207 202 * 208 * @param unknown_type $id 209 * @return unknown 203 * @param int $id Optional. Post ID. 204 * @param bool $leavename Optional. Leave name. 205 * @return string 210 206 */ 211 207 function _get_page_link( $id = false, $leavename = false ) { 212 208 global $post, $wp_rewrite; … … 231 227 } 232 228 233 229 /** 234 * {@internal Missing Short Description}}230 * Retrieve permalink for attachment. 235 231 * 236 * {@internal Missing Long Description}}232 * This can be used in the WordPress Loop or outside of it. 237 233 * 238 234 * @since 2.0.0 239 235 * 240 * @param unknown_type $id241 * @return unknown236 * @param int $id Optional. Post ID. 237 * @return string 242 238 */ 243 239 function get_attachment_link($id = false) { 244 240 global $post, $wp_rewrite; … … 272 268 } 273 269 274 270 /** 275 * {@internal Missing Short Description}}271 * Retrieve the permalink for the year archives. 276 272 * 277 * {@internal Missing Long Description}}278 *279 273 * @since 1.5.0 280 274 * 281 * @param unknown_type $year282 * @return unknown275 * @param int|bool $year False for current year or year for permalink. 276 * @return string 283 277 */ 284 278 function get_year_link($year) { 285 279 global $wp_rewrite; … … 295 289 } 296 290 297 291 /** 298 * {@internal Missing Short Description}}292 * Retrieve the permalink for the month archives with year. 299 293 * 300 * {@internal Missing Long Description}}301 *302 294 * @since 1.0.0 303 295 * 304 * @param unknown_type $year305 * @param unknown_type $month306 * @return unknown296 * @param bool|int $year False for current year. Integer of year. 297 * @param bool|int $month False for current month. Integer of month. 298 * @return string 307 299 */ 308 300 function get_month_link($year, $month) { 309 301 global $wp_rewrite; … … 322 314 } 323 315 324 316 /** 325 * {@internal Missing Short Description}}317 * Retrieve the permalink for the day archives with year and month. 326 318 * 327 * {@internal Missing Long Description}}328 *329 319 * @since 1.0.0 330 320 * 331 * @param unknown_type $year332 * @param unknown_type $month333 * @param unknown_type $day334 * @return unknown321 * @param bool|int $year False for current year. Integer of year. 322 * @param bool|int $month False for current month. Integer of month. 323 * @param bool|int $day False for current day. Integer of day. 324 * @return string 335 325 */ 336 326 function get_day_link($year, $month, $day) { 337 327 global $wp_rewrite; … … 354 344 } 355 345 356 346 /** 357 * {@internal Missing Short Description}}347 * Retrieve the permalink for the feed type. 358 348 * 359 * {@internal Missing Long Description}}360 *361 349 * @since 1.5.0 362 350 * 363 * @param unknown_type $feed364 * @return unknown351 * @param string $feed Optional, defaults to default feed. Feed type. 352 * @return string 365 353 */ 366 354 function get_feed_link($feed = '') { 367 355 global $wp_rewrite; … … 393 381 } 394 382 395 383 /** 396 * {@internal Missing Short Description}}384 * Retrieve the permalink for the post comments feed. 397 385 * 398 * {@internal Missing Long Description}}399 *400 386 * @since 2.2.0 401 387 * 402 * @param unknown_type $post_id403 * @param unknown_type $feed404 * @return unknown388 * @param int $post_id Optional. Post ID. 389 * @param string $feed Optional. Feed type. 390 * @return string 405 391 */ 406 392 function get_post_comments_feed_link($post_id = '', $feed = '') { 407 393 global $id; … … 463 449 * @since 2.5.0 464 450 * 465 451 * @param int $author_id ID of an author. 466 * @param string $feed Feed type.452 * @param string $feed Optional. Feed type. 467 453 * @return string Link to the feed for the author specified by $author_id. 468 454 */ 469 455 function get_author_feed_link( $author_id, $feed = '' ) { … … 501 487 * @since 2.5.0 502 488 * 503 489 * @param int $cat_id ID of a category. 504 * @param string $feed Feed type.490 * @param string $feed Optional. Feed type. 505 491 * @return string Link to the feed for the category specified by $cat_id. 506 492 */ 507 493 function get_category_feed_link($cat_id, $feed = '') { … … 535 521 } 536 522 537 523 /** 538 * {@internal Missing Short Description}}524 * Retrieve permalink for feed of tag. 539 525 * 540 * {@internal Missing Long Description}}541 *542 526 * @since 2.3.0 543 527 * 544 * @param unknown_type $tag_id545 * @param unknown_type $feed546 * @return unknown528 * @param int $tag_id Tag ID. 529 * @param string $feed Optional. Feed type. 530 * @return string 547 531 */ 548 532 function get_tag_feed_link($tag_id, $feed = '') { 549 533 $tag_id = (int) $tag_id; … … 575 559 } 576 560 577 561 /** 578 * {@internal Missing Short Description}}562 * Retrieve the permalink for the feed of the search results. 579 563 * 580 * {@internal Missing Long Description}}581 *582 564 * @since 2.5.0 583 565 * 584 * @param unknown_type $search_query585 * @param unknown_type $feed586 * @return unknown566 * @param string $search_query Optional. Search query. 567 * @param string $feed Optional. Feed type. 568 * @return string 587 569 */ 588 570 function get_search_feed_link($search_query = '', $feed = '') { 589 571 if ( empty($search_query) ) … … 602 584 } 603 585 604 586 /** 605 * {@internal Missing Short Description}}587 * Retrieve the permalink for the comments feed of the search results. 606 588 * 607 * {@internal Missing Long Description}}608 *609 589 * @since 2.5.0 610 590 * 611 * @param unknown_type $search_query612 * @param unknown_type $feed613 * @return unknown591 * @param string $search_query Optional. Search query. 592 * @param string $feed Optional. Feed type. 593 * @return string 614 594 */ 615 595 function get_search_comments_feed_link($search_query = '', $feed = '') { 616 596 if ( empty($search_query) ) … … 629 609 } 630 610 631 611 /** 632 * {@internal Missing Short Description}}612 * Retrieve edit posts link for post. 633 613 * 634 * {@internal Missing Long Description}} 614 * Can be used within the WordPress loop or outside of it. Can be used with 615 * pages, posts, attachments, and revisions. 635 616 * 636 617 * @since 2.3.0 637 618 * 638 * @param unknown_type $id 639 * @return unknown 619 * @param int $id Optional. Post ID. 620 * @param string $context Optional, default to display. How to write the '&', defaults to '&'. 621 * @return string 640 622 */ 641 623 function get_edit_post_link( $id = 0, $context = 'display' ) { 642 624 if ( !$post = &get_post( $id ) ) … … 679 661 } 680 662 681 663 /** 682 * {@internal Missing Short Description}}664 * Retrieve edit posts link for post. 683 665 * 684 * {@internal Missing Long Description}}685 *686 666 * @since 1.0.0 687 667 * 688 * @param unknown_type $link689 * @param unknown_type $before690 * @param unknown_type $after668 * @param string $link Optional. Anchor text. 669 * @param string $before Optional. Display before edit link. 670 * @param string $after Optional. Display after edit link. 691 671 */ 692 672 function edit_post_link( $link = 'Edit This', $before = '', $after = '' ) { 693 673 global $post; … … 705 685 } 706 686 707 687 /** 708 * {@internal Missing Short Description}}688 * Retrieve edit comment link. 709 689 * 710 * {@internal Missing Long Description}}711 *712 690 * @since 2.3.0 713 691 * 714 * @param unknown_type $comment_id715 * @return unknown692 * @param int $comment_id Optional. Comment ID. 693 * @return string 716 694 */ 717 695 function get_edit_comment_link( $comment_id = 0 ) { 718 696 $comment = &get_comment( $comment_id ); … … 731 709 } 732 710 733 711 /** 734 * {@internal Missing Short Description}}712 * Display or retrieve edit comment link with formatting. 735 713 * 736 * {@internal Missing Long Description}}737 *738 714 * @since 1.0.0 739 715 * 740 * @param unknown_type $link 741 * @param unknown_type $before 742 * @param unknown_type $after 716 * @param string $link Optional. Anchor text. 717 * @param string $before Optional. Display before edit link. 718 * @param string $after Optional. Display after edit link. 719 * @param bool $echo Optional, defaults to true. Whether to echo or return HTML. 720 * @return string|null HTML content, if $echo is set to false. 743 721 */ 744 722 function edit_comment_link( $link = 'Edit This', $before = '', $after = '', $echo = true ) { 745 723 global $comment, $post; … … 762 740 } 763 741 764 742 /** 765 * {@internal Missing Short Description}}743 * Display edit bookmark (literally a URL external to blog) link. 766 744 * 767 * {@internal Missing Long Description}}745 * @since 2.7.0 768 746 * 769 * @since unknown 770 * 771 * @param unknown_type $link 772 * @return unknown 747 * @param int $link Optional. Bookmark ID. 748 * @return string 773 749 */ 774 750 function get_edit_bookmark_link( $link = 0 ) { 775 751 $link = &get_bookmark( $link ); … … 782 758 } 783 759 784 760 /** 785 * {@internal Missing Short Description}}761 * Display edit bookmark (literally a URL external to blog) link anchor content. 786 762 * 787 * {@internal Missing Long Description}}763 * @since 2.7.0 788 764 * 789 * @since unknown 790 * 791 * @param unknown_type $link 792 * @param unknown_type $before 793 * @param unknown_type $after 794 * @param unknown_type $bookmark 765 * @param string $link Optional. Anchor text. 766 * @param string $before Optional. Display before edit link. 767 * @param string $after Optional. Display after edit link. 768 * @param int $bookmark Optional. Bookmark ID. 795 769 */ 796 770 function edit_bookmark_link( $link = '', $before = '', $after = '', $bookmark = null ) { 797 771 $bookmark = get_bookmark($bookmark); … … 809 783 // Navigation links 810 784 811 785 /** 812 * {@internal Missing Short Description}}786 * Retrieve previous post link that is adjacent to current post. 813 787 * 814 * {@internal Missing Long Description}}815 *816 788 * @since 1.5.0 817 789 * 818 * @param unknown_type $in_same_cat819 * @param unknown_type $excluded_categories820 * @return unknown790 * @param bool $in_same_cat Optional. Whether link should be in same category. 791 * @param string $excluded_categories Optional. Excluded categories IDs. 792 * @return string 821 793 */ 822 794 function get_previous_post($in_same_cat = false, $excluded_categories = '') { 823 795 return get_adjacent_post($in_same_cat, $excluded_categories); 824 796 } 825 797 826 798 /** 827 * {@internal Missing Short Description}}799 * Retrieve next post link that is adjacent to current post. 828 800 * 829 * {@internal Missing Long Description}}830 *831 801 * @since 1.5.0 832 802 * 833 * @param unknown_type $in_same_cat834 * @param unknown_type $excluded_categories835 * @return unknown803 * @param bool $in_same_cat Optional. Whether link should be in same category. 804 * @param string $excluded_categories Optional. Excluded categories IDs. 805 * @return string 836 806 */ 837 807 function get_next_post($in_same_cat = false, $excluded_categories = '') { 838 808 return get_adjacent_post($in_same_cat, $excluded_categories, false); 839 809 } 840 810 841 811 /** 842 * {@internal Missing Short Description}}812 * Retrieve adjacent post link. 843 813 * 844 * {@internal Missing Long Description}}814 * Can either be next or previous post link. 845 815 * 846 816 * @since 2.5.0 847 817 * 848 * @param unknown_type $in_same_cat849 * @param unknown_type $excluded_categories850 * @param unknown_type $previous851 * @return unknown818 * @param bool $in_same_cat Optional. Whether link should be in same category. 819 * @param string $excluded_categories Optional. Excluded categories IDs. 820 * @param bool $previous Optional. Whether to retrieve previous post. 821 * @return string 852 822 */ 853 823 function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $previous = true) { 854 824 global $post, $wpdb; … … 894 864 } 895 865 896 866 /** 897 * {@internal Missing Short Description}}867 * Display previous post link that is adjacent to the current post. 898 868 * 899 * {@internal Missing Long Description}}900 *901 869 * @since 1.5.0 902 870 * 903 * @param unknown_type $format904 * @param unknown_type $link905 * @param unknown_type $in_same_cat906 * @param unknown_type $excluded_categories871 * @param string $format Optional. Link anchor format. 872 * @param string $link Optional. Link permalink format. 873 * @param bool $in_same_cat Optional. Whether link should be in same category. 874 * @param string $excluded_categories Optional. Excluded categories IDs. 907 875 */ 908 876 function previous_post_link($format='« %link', $link='%title', $in_same_cat = false, $excluded_categories = '') { 909 877 adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, true); 910 878 } 911 879 912 880 /** 913 * {@internal Missing Short Description}}881 * Display next post link that is adjacent to the current post. 914 882 * 915 * {@internal Missing Long Description}}916 *917 883 * @since 1.5.0 918 884 * 919 * @param unknown_type $format920 * @param unknown_type $link921 * @param unknown_type $in_same_cat922 * @param unknown_type $excluded_categories885 * @param string $format Optional. Link anchor format. 886 * @param string $link Optional. Link permalink format. 887 * @param bool $in_same_cat Optional. Whether link should be in same category. 888 * @param string $excluded_categories Optional. Excluded categories IDs. 923 889 */ 924 890 function next_post_link($format='%link »', $link='%title', $in_same_cat = false, $excluded_categories = '') { 925 891 adjacent_post_link($format, $link, $in_same_cat, $excluded_categories, false); 926 892 } 927 893 928 894 /** 929 * {@internal Missing Short Description}}895 * Display adjacent post link. 930 896 * 931 * {@internal Missing Long Description}}897 * Can be either next post link or previous. 932 898 * 933 899 * @since 2.5.0 934 900 * 935 * @param unknown_type $format936 * @param unknown_type $link937 * @param unknown_type $in_same_cat938 * @param unknown_type $excluded_categories939 * @param unknown_type $previous901 * @param string $format Link anchor format. 902 * @param string $link Link permalink format. 903 * @param bool $in_same_cat Optional. Whether link should be in same category. 904 * @param string $excluded_categories Optional. Excluded categories IDs. 905 * @param bool $previous Optional, default is true. Whether display link to previous post. 940 906 */ 941 907 function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) { 942 908 if ( $previous && is_attachment() ) … … 967 933 } 968 934 969 935 /** 970 * {@internal Missing Short Description}}936 * Retrieve get links for page numbers. 971 937 * 972 * {@internal Missing Long Description}}973 *974 938 * @since 1.5.0 975 939 * 976 * @param unknown_type $pagenum977 * @return unknown940 * @param int $pagenum Optional. Page ID. 941 * @return string 978 942 */ 979 943 function get_pagenum_link($pagenum = 1) { 980 944 global $wp_rewrite; … … 1031 995 } 1032 996 1033 997 /** 1034 * {@internal Missing Short Description}}998 * Retrieve next posts pages link. 1035 999 * 1036 * {@internal Missing Long Description}}1037 1000 * Backported from 2.1.3 to 2.0.10. 1038 1001 * 1039 1002 * @since 2.0.10 1040 1003 * 1041 * @param unknown_type $max_page1042 * @return unknown1004 * @param int $max_page Optional. Max pages. 1005 * @return string 1043 1006 */ 1044 1007 function get_next_posts_page_link($max_page = 0) { 1045 1008 global $paged; … … 1054 1017 } 1055 1018 1056 1019 /** 1057 * {@internal Missing Short Description}}1020 * Display the next posts pages link. 1058 1021 * 1059 * {@internal Missing Long Description}}1060 *1061 1022 * @since 0.71 1062 1023 * 1063 * @param unknown_type $max_page1024 * @param int $max_page Optional. Max pages. 1064 1025 */ 1065 1026 function next_posts($max_page = 0) { 1066 1027 echo clean_url(get_next_posts_page_link($max_page)); 1067 1028 } 1068 1029 1069 1030 /** 1070 * {@internal Missing Short Description}}1031 * Display the next posts pages link. 1071 1032 * 1072 * {@internal Missing Long Description}}1073 *1074 1033 * @since 0.71 1075 1034 * 1076 * @param unknown_type $label1077 * @param unknown_type $max_page1035 * @param string $label Content for link text. 1036 * @param int $max_page Optional. Max pages. 1078 1037 */ 1079 1038 function next_posts_link($label='Next Page »', $max_page=0) { 1080 1039 global $paged, $wp_query; … … 1093 1052 } 1094 1053 1095 1054 /** 1096 * {@internal Missing Short Description}}1055 * Retrieve previous post pages link. 1097 1056 * 1098 * {@internal Missing Long Description}}1057 * Will only return string, if not on a single page or post. 1099 1058 * 1100 * @since 2.0.10 Backported 1101 * @since 2.1.3 1059 * Backported to 2.0.10 from 2.1.3. 1102 1060 * 1103 * @return unknown 1061 * @since 2.0.10 1062 * 1063 * @return string|null 1104 1064 */ 1105 1065 function get_previous_posts_page_link() { 1106 1066 global $paged; … … 1114 1074 } 1115 1075 1116 1076 /** 1117 * {@internal Missing Short Description}}1077 * Display previous posts pages link. 1118 1078 * 1119 * {@internal Missing Long Description}}1120 *1121 1079 * @since 0.71 1122 *1123 1080 */ 1124 1081 function previous_posts() { 1125 1082 echo clean_url(get_previous_posts_page_link()); 1126 1083 } 1127 1084 1128 1085 /** 1129 * {@internal Missing Short Description}}1086 * Display previous posts page link. 1130 1087 * 1131 * {@internal Missing Long Description}}1132 *1133 1088 * @since 0.71 1134 1089 * 1135 * @param unknown_type $label1090 * @param string $label Optional. Previous page link text. 1136 1091 */ 1137 1092 function previous_posts_link($label='« Previous Page') { 1138 1093 global $paged; … … 1145 1100 } 1146 1101 1147 1102 /** 1148 * {@internal Missing Short Description}}1103 * Display post pages link navigation for previous and next pages. 1149 1104 * 1150 * {@internal Missing Long Description}}1151 *1152 1105 * @since 0.71 1153 1106 * 1154 * @param unknown_type $sep1155 * @param unknown_type $prelabel1156 * @param unknown_type $nxtlabel1107 * @param string $sep Optional. Separator for posts navigation links. 1108 * @param string $prelabel Optional. Label for previous pages. 1109 * @param string $nxtlabel Optional Label for next pages. 1157 1110 */ 1158 1111 function posts_nav_link($sep=' — ', $prelabel='« Previous Page', $nxtlabel='Next Page »') { 1159 1112 global $wp_query; … … 1174 1127 } 1175 1128 } 1176 1129 1130 /** 1131 * Retrieve page numbers links. 1132 * 1133 * @since 2.7.0 1134 * 1135 * @param int $pagenum Optional. Page number. 1136 * @return string 1137 */ 1177 1138 function get_comments_pagenum_link($pagenum = 1) { 1178 1139 global $wp_rewrite; 1179 1140 … … 1203 1164 return $result; 1204 1165 } 1205 1166 1167 /** 1168 * Display link to next comments pages. 1169 * 1170 * @since 2.7.0 1171 * 1172 * @param string $label Optional. Label for link text. 1173 * @param int $max_page Optional. Max page. 1174 */ 1206 1175 function next_comments_link($label='', $max_page = 0) { 1207 1176 global $wp_query; 1208 1177 … … 1230 1199 echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1231 1200 } 1232 1201 1202 /** 1203 * Display the previous comments page link. 1204 * 1205 * @since 2.7.0 1206 * 1207 * @param string $label Optional. Label for comments link text. 1208 */ 1233 1209 function previous_comments_link($label='') { 1234 1210 global $wp_query; 1235 1211 … … 1254 1230 echo "\" $attr>". preg_replace('/&([^#])(?![a-z]{1,8};)/', '&$1', $label) .'</a>'; 1255 1231 } 1256 1232 1257 /** Create pagination links for the comments on the current post 1233 /** 1234 * Create pagination links for the comments on the current post. 1258 1235 * 1259 * @package WordPress 1260 * @see paginate_links 1261 * @since 2.7 1236 * @see paginate_links() 1237 * @since 2.7.0 1262 1238 * 1263 1239 * @param string|array $args Optional args. See paginate_links. 1264 * @return string Markup for pagination links 1240 * @return string Markup for pagination links. 1265 1241 */ 1266 1242 function paginate_comments_links($args = array()) { 1267 1243 global $wp_query; … … 1291 1267 } 1292 1268 1293 1269 /** 1294 * {@internal Missing Short Description}}1270 * Retrieve shortcut link. 1295 1271 * 1296 * {@internal Missing Long Description}}1272 * Use this in 'a' element 'href' attribute. 1297 1273 * 1298 * @since unknown1274 * @since 2.6.0 1299 1275 * 1300 * @return unknown1276 * @return string 1301 1277 */ 1302 1278 function get_shortcut_link() { 1303 1279 $link = "javascript: … … 1335 1311 * is_ssl() and 'http' otherwise. If $scheme is 'http' or 'https', is_ssl() is 1336 1312 * overridden. 1337 1313 * 1314 * @package WordPress 1338 1315 * @since 2.6.0 1339 1316 * 1340 1317 * @param string $path Optional. Path relative to the site url.