Changeset 9273
- Timestamp:
- 10/22/2008 03:06:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post-template.php
r9254 r9273 93 93 94 94 /** 95 * {@internal Missing Short Description}} 96 * 97 * {@internal Missing Long Description}} 95 * Retrieve post title. 96 * 97 * If the post is protected and the visitor is not an admin, then "Protected" 98 * will be displayed before the post title. If the post is private, then 99 * "Private" will be located before the post title. 98 100 * 99 101 * @since 0.71 100 102 * 101 * @param int $id 102 * @return unknown103 * @param int $id Optional. Post ID. 104 * @return string 103 105 */ 104 106 function get_the_title( $id = 0 ) { … … 117 119 118 120 /** 119 * {@internal Missing Short Description}} 120 * 121 * {@internal Missing Long Description}} 121 * Display the Post Global Unique Identifier (guid). 122 * 123 * The guid will appear to be a link, but should not be used as an link to the 124 * post. The reason you should not use it as a link, is because of moving the 125 * blog across domains. 122 126 * 123 127 * @since 1.5.0 124 128 * 125 * @param unknown_type $id129 * @param int $id Optional. Post ID. 126 130 */ 127 131 function the_guid( $id = 0 ) { … … 130 134 131 135 /** 132 * {@internal Missing Short Description}} 133 * 134 * {@internal Missing Long Description}} 136 * Retrieve the Post Global Unique Identifier (guid). 137 * 138 * The guid will appear to be a link, but should not be used as an link to the 139 * post. The reason you should not use it as a link, is because of moving the 140 * blog across domains. 135 141 * 136 142 * @since 1.5.0 137 143 * 138 * @param unknown_type $id139 * @return unknown144 * @param int $id Optional. Post ID. 145 * @return string 140 146 */ 141 147 function get_the_guid( $id = 0 ) { … … 146 152 147 153 /** 148 * {@internal Missing Short Description}} 149 * 150 * {@internal Missing Long Description}} 154 * Display the post content. 151 155 * 152 156 * @since 0.71 153 157 * 154 * @param unknown_type $more_link_text155 * @param unknown_type $stripteaser156 * @param unknown_type $more_file158 * @param string $more_link_text Optional. Content for when there is more text. 159 * @param string $stripteaser Optional. Teaser content before the more text. 160 * @param string $more_file Optional. Not used. 157 161 */ 158 162 function the_content($more_link_text = null, $stripteaser = 0, $more_file = '') { … … 164 168 165 169 /** 166 * {@internal Missing Short Description}} 167 * 168 * {@internal Missing Long Description}} 170 * Retrieve the post content. 169 171 * 170 172 * @since 0.71 171 173 * 172 * @param unknown_type $more_link_text173 * @param unknown_type $stripteaser174 * @param unknown_type $more_file175 * @return unknown174 * @param string $more_link_text Optional. Content for when there is more text. 175 * @param string $stripteaser Optional. Teaser content before the more text. 176 * @param string $more_file Optional. Not used. 177 * @return string 176 178 */ 177 179 function get_the_content($more_link_text = null, $stripteaser = 0, $more_file = '') { … … 183 185 $output = ''; 184 186 185 if ( post_password_required($post) ) { // If post password required and it doesn't match the cookie 187 // If post password required and it doesn't match the cookie. 188 if ( post_password_required($post) ) { 186 189 $output = get_the_password_form(); 187 190 return $output; … … 227 230 228 231 /** 229 * {@internal Missing Short Description}} 230 * 231 * {@internal Missing Long Description}} 232 * Display the post excerpt. 232 233 * 233 234 * @since 0.71 234 * @uses apply_filters() -235 * @uses apply_filters() Calls 'the_excerpt' hook on post excerpt. 235 236 */ 236 237 function the_excerpt() { … … 239 240 240 241 /** 241 * {@internal Missing Short Description}} 242 * 243 * {@internal Missing Long Description}} 242 * Retrieve the post excerpt. 244 243 * 245 244 * @since 0.71 246 245 * 247 * @param unknown_type $deprecated248 * @return unknown246 * @param mixed $deprecated Not used. 247 * @return string 249 248 */ 250 249 function get_the_excerpt($deprecated = '') { … … 261 260 262 261 /** 263 * {@internal Missing Short Description}} 264 * 265 * {@internal Missing Long Description}} 262 * Whether post has excerpt. 266 263 * 267 264 * @since 2.3.0 268 265 * 269 * @param unknown_type $id270 * @return unknown266 * @param int $id Optional. Post ID. 267 * @return bool 271 268 */ 272 269 function has_excerpt( $id = 0 ) { … … 278 275 * Display the classes for the post div. 279 276 * 280 * {@internal Missing Long Description}}281 *282 277 * @since 2.7.0 283 278 * 284 * @param string|array $class One or more classes to add to the class list 279 * @param string|array $class One or more classes to add to the class list. 285 280 * @param int $post_id An optional post ID. 286 281 */ … … 293 288 * Retrieve the classes for the post div as an array. 294 289 * 295 * {@internal Missing Long Description}} 290 * The class names are add are many. If the post is a sticky, then the 'sticky' 291 * class name. The class 'hentry' is always added to each post. For each 292 * category, the class will be added with 'category-' with category slug is 293 * added. The tags are the same way as the categories with 'tag-' before the tag 294 * slug. All classes are passed through the filter, 'post_class' with the list 295 * of classes, followed by $class parameter value, with the post ID as the last 296 * parameter. 296 297 * 297 298 * @since 2.7.0 298 299 * 299 * @param string|array $class One or more classes to add to the class list 300 * @param int $post_id An optional post ID 301 * @return array Array of classes 300 * @param string|array $class One or more classes to add to the class list. 301 * @param int $post_id An optional post ID. 302 * @return array Array of classes. 302 303 */ 303 304 function get_post_class( $class = '', $post_id = null ) { … … 339 340 340 341 /** 341 * Determines if post requires a password and if the correct password has been provided. 342 * 343 * {@internal Missing Long Description}} 342 * Whether post requires password and correct password has been provided. 344 343 * 345 344 * @since 2.7.0 346 345 * 347 346 * @param int|object $post An optional post. Global $post used if not provided. 348 * @return bool false if a password is not required or the correct password cookie is present, true otherwise 347 * @return bool false if a password is not required or the correct password cookie is present, true otherwise. 349 348 */ 350 349 function post_password_required( $post = null ) { … … 368 367 * @since 2.7.0 369 368 * 370 * @param int $post_id An optional post ID 369 * @param int $post_id An optional post ID. 371 370 */ 372 371 function sticky_class( $post_id = null ) { … … 385 384 386 385 /** 387 * The formatted output of a list of Pages. 388 * 389 * Displays page-links for paginated posts (i.e. includes the <!--nextpage--> Quicktag one or 390 * more times). This works in much the same way as link_pages(), the difference being that 391 * arguments are given in query string format. This tag must be within The_Loop. 386 * The formatted output of a list of pages. 387 * 388 * Displays page links for paginated posts (i.e. includes the <!--nextpage-->. 389 * Quicktag one or more times). This works in much the same way as link_pages(), 390 * the difference being that arguments are given in query string format. This 391 * tag must be within The Loop. 392 392 * 393 393 * The defaults for overwriting are: 394 * 'next_or_number' - Default is 'number' (string). Indicates whether page numbers should be395 * used. Valid values are number and next.394 * 'next_or_number' - Default is 'number' (string). Indicates whether page 395 * numbers should be used. Valid values are number and next. 396 396 * 'nextpagelink' - Default is 'Next Page' (string). Text for link to next page. 397 * 398 * 'previouspagelink' - Default is 'Previous Page' (string). Text for link to previous page.399 * 400 * 'pagelink' - Default is '%' (String).Format string for page numbers. The % in the401 * parameter string will be replaced with the page number, so Page % generates402 * "Page 1", "Page 2", etc. Defaults to %, just the page number.403 * 'before' - Default is '<p> Pages:' (string). The html or text to prepend to each404 * 397 * of the bookmark. 398 * 'previouspagelink' - Default is 'Previous Page' (string). Text for link to 399 * previous page, if available. 400 * 'pagelink' - Default is '%' (String).Format string for page numbers. The % in 401 * the parameter string will be replaced with the page number, so Page % 402 * generates "Page 1", "Page 2", etc. Defaults to %, just the page number. 403 * 'before' - Default is '<p> Pages:' (string). The html or text to prepend to 404 * each bookmarks. 405 405 * 'after' - Default is '</p>' (string). The html or text to append to each 406 * 407 * 'more_file' - Default is '' (string) Page the links should point to. Defaults to408 * t he current page.406 * bookmarks. 407 * 'more_file' - Default is '' (string) Page the links should point to. Defaults 408 * to the current page. 409 409 * 'link_before' - Default is '' (string). The html or text to prepend to each 410 * 410 * Pages link inside the <a> tag. 411 411 * 'link_after' - Default is '' (string). The html or text to append to each 412 * 412 * Pages link inside the <a> tag. 413 413 * 414 414 * @since 1.2.0 415 415 * @access private 416 416 * 417 * @param array $bookmarks List of bookmarks to traverse418 417 * @param string|array $args Optional. Overwrite the defaults. 419 * @return string Formatted output in HTML 418 * @return string Formatted output in HTML. 420 419 */ 421 420 function wp_link_pages($args = '') { … … 542 541 } 543 542 544 545 543 // 546 544 // Pages … … 548 546 549 547 /** 550 * {@internal Missing Short Description}} 551 * 552 * {@internal Missing Long Description}} 548 * Retrieve or display list of pages as a dropdown (select list). 553 549 * 554 550 * @since 2.1.0 555 551 * 556 * @param unknown_type $args557 * @return unknown552 * @param array|string $args Optional. Override default arguments. 553 * @return string HTML content, if not displaying. 558 554 */ 559 555 function wp_dropdown_pages($args = '') { … … 587 583 588 584 /** 589 * {@internal Missing Short Description}} 590 * 591 * {@internal Missing Long Description}} 585 * Retrieve or display list of pages in list (li) format. 592 586 * 593 587 * @since 1.5.0 594 588 * 595 589 * @param array|string $args Optional. Override default arguments. 596 * @return unknown590 * @return string HTML content, if not displaying. 597 591 */ 598 592 function wp_list_pages($args = '') { … … 719 713 720 714 /** 721 * {@internal Missing Short Description}} 722 * 723 * {@internal Missing Long Description}} 715 * Display an attachment page link using an image or icon. 724 716 * 725 717 * @since 2.0.0 726 718 * 727 * @param unknown_type $id 728 * @param unknown_type $fullsize 729 * @param unknown_type $max_dims 719 * @param int $id Optional. Post ID. 720 * @param bool $fullsize Optional, default is false. Whether to use full size. 721 * @param bool $deprecated Deprecated. Not used. 722 * @param bool $permalink Optional, default is false. Whether to include permalink. 730 723 */ 731 724 function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false) { … … 739 732 * Retrieve an attachment page link using an image or icon, if possible. 740 733 * 741 * {@internal Missing Long Description}} 742 * 743 * @since unknown 744 * 745 * @param unknown_type $id 746 * @param unknown_type $size 747 * @param unknown_type $permalink 748 * @param unknown_type $icon 749 * @return unknown 734 * @since 2.5.0 735 * @uses apply_filters() Calls 'wp_get_attachment_link' filter on HTML content with same parameters as function. 736 * 737 * @param int $id Optional. Post ID. 738 * @param string $size Optional. Image size. 739 * @param bool $permalink Optional, default is false. Whether to add permalink to image. 740 * @param bool $icon Optional, default is false. Whether to include icon. 741 * @return string HTML content. 750 742 */ 751 743 function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false) { … … 769 761 770 762 /** 771 * {@internal Missing Short Description}} 772 * 773 * {@internal Missing Long Description}} 774 * 775 * @since unknown 763 * Retrieve HTML content of attachment image with link. 764 * 765 * @since 2.0.0 776 766 * @deprecated Use {@link wp_get_attachment_link()} 777 767 * @see wp_get_attachment_link() Use instead. 778 768 * 779 * @param unknown_type $id780 * @param unknown_type $fullsize781 * @param unknown_type $max_dims782 * @param unknown_type $permalink783 * @return unknown769 * @param int $id Optional. Post ID. 770 * @param bool $fullsize Optional, default is false. Whether to use full size image. 771 * @param array $max_dims Optional. Max image dimensions. 772 * @param bool $permalink Optional, default is false. Whether to include permalink to image. 773 * @return string 784 774 */ 785 775 function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) { … … 800 790 801 791 /** 802 * {@internal Missing Short Description}} 803 * 804 * {@internal Missing Long Description}} 792 * Retrieve icon URL and Path. 805 793 * 806 794 * @since 2.1.0 … … 808 796 * @see wp_get_attachment_image_src() Use instead. 809 797 * 810 * @param unknown_type $id811 * @param unknown_type $fullsize812 * @return unknown798 * @param int $id Optional. Post ID. 799 * @param bool $fullsize Optional, default to false. Whether to have full image. 800 * @return array Icon URL and full path to file, respectively. 813 801 */ 814 802 function get_attachment_icon_src( $id = 0, $fullsize = false ) { … … 844 832 845 833 /** 846 * {@internal Missing Short Description}} 847 * 848 * {@internal Missing Long Description}} 834 * Retrieve HTML content of icon attachment image element. 849 835 * 850 836 * @since 2.0.0 … … 852 838 * @see wp_get_attachment_image() Use instead of. 853 839 * 854 * @param unknown_type $id855 * @param unknown_type $fullsize856 * @param unknown_type $max_dims857 * @return unknown840 * @param int $id Optional. Post ID. 841 * @param bool $fullsize Optional, default to false. Whether to have full size image. 842 * @param array $max_dims Optional. Dimensions of image. 843 * @return string HTML content. 858 844 */ 859 845 function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) { … … 901 887 902 888 /** 903 * {@internal Missing Short Description}} 904 * 905 * {@internal Missing Long Description}} 889 * Retrieve HTML content of image element. 906 890 * 907 891 * @since 2.0.0 … … 909 893 * @see wp_get_attachment_image() Use instead. 910 894 * 911 * @param unknown_type $id912 * @param unknown_type $fullsize913 * @param unknown_type $max_dims914 * @return unknown895 * @param int $id Optional. Post ID. 896 * @param bool $fullsize Optional, default to false. Whether to have full size image. 897 * @param array $max_dims Optional. Dimensions of image. 898 * @return string 915 899 */ 916 900 function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) { … … 929 913 930 914 /** 931 * {@internal Missing Short Description}} 932 * 933 * {@internal Missing Long Description}} 915 * Wrap attachment in <<p>> element before content. 934 916 * 935 917 * @since 2.0.0 936 * 937 * @param unknown_type $content 938 * @return unknown 918 * @uses apply_filters() Calls 'prepend_attachment' hook on HTML content. 919 * 920 * @param string $content 921 * @return string 939 922 */ 940 923 function prepend_attachment($content) {
Note: See TracChangeset
for help on using the changeset viewer.