Make WordPress Core


Ignore:
Timestamp:
10/22/2008 03:06:53 AM (15 years ago)
Author:
ryan
Message:

post-template phpdoc from jacobsantos. fixes #7659

File:
1 edited

Legend:

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

    r9254 r9273  
    9393
    9494/**
    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.
    98100 *
    99101 * @since 0.71
    100102 *
    101  * @param int $id
    102  * @return unknown
     103 * @param int $id Optional. Post ID.
     104 * @return string
    103105 */
    104106function get_the_title( $id = 0 ) {
     
    117119
    118120/**
    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.
    122126 *
    123127 * @since 1.5.0
    124128 *
    125  * @param unknown_type $id
     129 * @param int $id Optional. Post ID.
    126130 */
    127131function the_guid( $id = 0 ) {
     
    130134
    131135/**
    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.
    135141 *
    136142 * @since 1.5.0
    137143 *
    138  * @param unknown_type $id
    139  * @return unknown
     144 * @param int $id Optional. Post ID.
     145 * @return string
    140146 */
    141147function get_the_guid( $id = 0 ) {
     
    146152
    147153/**
    148  * {@internal Missing Short Description}}
    149  *
    150  * {@internal Missing Long Description}}
     154 * Display the post content.
    151155 *
    152156 * @since 0.71
    153157 *
    154  * @param unknown_type $more_link_text
    155  * @param unknown_type $stripteaser
    156  * @param unknown_type $more_file
     158 * @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.
    157161 */
    158162function the_content($more_link_text = null, $stripteaser = 0, $more_file = '') {
     
    164168
    165169/**
    166  * {@internal Missing Short Description}}
    167  *
    168  * {@internal Missing Long Description}}
     170 * Retrieve the post content.
    169171 *
    170172 * @since 0.71
    171173 *
    172  * @param unknown_type $more_link_text
    173  * @param unknown_type $stripteaser
    174  * @param unknown_type $more_file
    175  * @return unknown
     174 * @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
    176178 */
    177179function get_the_content($more_link_text = null, $stripteaser = 0, $more_file = '') {
     
    183185    $output = '';
    184186
    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) ) {
    186189        $output = get_the_password_form();
    187190        return $output;
     
    227230
    228231/**
    229  * {@internal Missing Short Description}}
    230  *
    231  * {@internal Missing Long Description}}
     232 * Display the post excerpt.
    232233 *
    233234 * @since 0.71
    234  * @uses apply_filters() -
     235 * @uses apply_filters() Calls 'the_excerpt' hook on post excerpt.
    235236 */
    236237function the_excerpt() {
     
    239240
    240241/**
    241  * {@internal Missing Short Description}}
    242  *
    243  * {@internal Missing Long Description}}
     242 * Retrieve the post excerpt.
    244243 *
    245244 * @since 0.71
    246245 *
    247  * @param unknown_type $deprecated
    248  * @return unknown
     246 * @param mixed $deprecated Not used.
     247 * @return string
    249248 */
    250249function get_the_excerpt($deprecated = '') {
     
    261260
    262261/**
    263  * {@internal Missing Short Description}}
    264  *
    265  * {@internal Missing Long Description}}
     262 * Whether post has excerpt.
    266263 *
    267264 * @since 2.3.0
    268265 *
    269  * @param unknown_type $id
    270  * @return unknown
     266 * @param int $id Optional. Post ID.
     267 * @return bool
    271268 */
    272269function has_excerpt( $id = 0 ) {
     
    278275 * Display the classes for the post div.
    279276 *
    280  * {@internal Missing Long Description}}
    281  *
    282277 * @since 2.7.0
    283278 *
    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.
    285280 * @param int $post_id An optional post ID.
    286281 */
     
    293288 * Retrieve the classes for the post div as an array.
    294289 *
    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.
    296297 *
    297298 * @since 2.7.0
    298299 *
    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.
    302303 */
    303304function get_post_class( $class = '', $post_id = null ) {
     
    339340
    340341/**
    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.
    344343 *
    345344 * @since 2.7.0
    346345 *
    347346 * @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.
    349348 */
    350349function post_password_required( $post = null ) {
     
    368367 * @since 2.7.0
    369368 *
    370  * @param int $post_id An optional post ID
     369 * @param int $post_id An optional post ID.
    371370 */
    372371function sticky_class( $post_id = null ) {
     
    385384
    386385/**
    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.
    392392 *
    393393 * The defaults for overwriting are:
    394  * 'next_or_number' - Default is 'number' (string). Indicates whether page numbers should be
    395  *      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.
    396396 * 'nextpagelink' - Default is 'Next Page' (string). Text for link to next page.
    397  *      of the bookmark.
    398  * 'previouspagelink' - Default is 'Previous Page' (string). Text for link to previous page.
    399  *      available.
    400  * 'pagelink' - Default is '%' (String).Format string for page numbers. The  %  in the
    401  *      parameter string will be replaced with the page number, so Page % generates
    402  *      "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 each
    404  *      bookmarks.
     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.
    405405 * 'after' - Default is '</p>' (string). The html or text to append to each
    406  *      bookmarks.
    407  * 'more_file' - Default is '' (string) Page the links should point to. Defaults to
    408  *      the current page.
     406 *      bookmarks.
     407 * 'more_file' - Default is '' (string) Page the links should point to. Defaults
     408 *      to the current page.
    409409 * 'link_before' - Default is '' (string). The html or text to prepend to each
    410  *      Pages link inside the <a> tag.
     410 *      Pages link inside the <a> tag.
    411411 * 'link_after' - Default is '' (string). The html or text to append to each
    412  *      Pages link inside the <a> tag.
     412 *      Pages link inside the <a> tag.
    413413 *
    414414 * @since 1.2.0
    415415 * @access private
    416416 *
    417  * @param array $bookmarks List of bookmarks to traverse
    418417 * @param string|array $args Optional. Overwrite the defaults.
    419  * @return string Formatted output in HTML
     418 * @return string Formatted output in HTML.
    420419 */
    421420function wp_link_pages($args = '') {
     
    542541}
    543542
    544 
    545543//
    546544// Pages
     
    548546
    549547/**
    550  * {@internal Missing Short Description}}
    551  *
    552  * {@internal Missing Long Description}}
     548 * Retrieve or display list of pages as a dropdown (select list).
    553549 *
    554550 * @since 2.1.0
    555551 *
    556  * @param unknown_type $args
    557  * @return unknown
     552 * @param array|string $args Optional. Override default arguments.
     553 * @return string HTML content, if not displaying.
    558554 */
    559555function wp_dropdown_pages($args = '') {
     
    587583
    588584/**
    589  * {@internal Missing Short Description}}
    590  *
    591  * {@internal Missing Long Description}}
     585 * Retrieve or display list of pages in list (li) format.
    592586 *
    593587 * @since 1.5.0
    594588 *
    595589 * @param array|string $args Optional. Override default arguments.
    596  * @return unknown
     590 * @return string HTML content, if not displaying.
    597591 */
    598592function wp_list_pages($args = '') {
     
    719713
    720714/**
    721  * {@internal Missing Short Description}}
    722  *
    723  * {@internal Missing Long Description}}
     715 * Display an attachment page link using an image or icon.
    724716 *
    725717 * @since 2.0.0
    726718 *
    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.
    730723 */
    731724function the_attachment_link($id = 0, $fullsize = false, $deprecated = false, $permalink = false) {
     
    739732 * Retrieve an attachment page link using an image or icon, if possible.
    740733 *
    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.
    750742 */
    751743function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false, $icon = false) {
     
    769761
    770762/**
    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
    776766 * @deprecated Use {@link wp_get_attachment_link()}
    777767 * @see wp_get_attachment_link() Use instead.
    778768 *
    779  * @param unknown_type $id
    780  * @param unknown_type $fullsize
    781  * @param unknown_type $max_dims
    782  * @param unknown_type $permalink
    783  * @return unknown
     769 * @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
    784774 */
    785775function get_the_attachment_link($id = 0, $fullsize = false, $max_dims = false, $permalink = false) {
     
    800790
    801791/**
    802  * {@internal Missing Short Description}}
    803  *
    804  * {@internal Missing Long Description}}
     792 * Retrieve icon URL and Path.
    805793 *
    806794 * @since 2.1.0
     
    808796 * @see wp_get_attachment_image_src() Use instead.
    809797 *
    810  * @param unknown_type $id
    811  * @param unknown_type $fullsize
    812  * @return unknown
     798 * @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.
    813801 */
    814802function get_attachment_icon_src( $id = 0, $fullsize = false ) {
     
    844832
    845833/**
    846  * {@internal Missing Short Description}}
    847  *
    848  * {@internal Missing Long Description}}
     834 * Retrieve HTML content of icon attachment image element.
    849835 *
    850836 * @since 2.0.0
     
    852838 * @see wp_get_attachment_image() Use instead of.
    853839 *
    854  * @param unknown_type $id
    855  * @param unknown_type $fullsize
    856  * @param unknown_type $max_dims
    857  * @return unknown
     840 * @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.
    858844 */
    859845function get_attachment_icon( $id = 0, $fullsize = false, $max_dims = false ) {
     
    901887
    902888/**
    903  * {@internal Missing Short Description}}
    904  *
    905  * {@internal Missing Long Description}}
     889 * Retrieve HTML content of image element.
    906890 *
    907891 * @since 2.0.0
     
    909893 * @see wp_get_attachment_image() Use instead.
    910894 *
    911  * @param unknown_type $id
    912  * @param unknown_type $fullsize
    913  * @param unknown_type $max_dims
    914  * @return unknown
     895 * @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
    915899 */
    916900function get_attachment_innerHTML($id = 0, $fullsize = false, $max_dims = false) {
     
    929913
    930914/**
    931  * {@internal Missing Short Description}}
    932  *
    933  * {@internal Missing Long Description}}
     915 * Wrap attachment in <<p>> element before content.
    934916 *
    935917 * @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
    939922 */
    940923function prepend_attachment($content) {
Note: See TracChangeset for help on using the changeset viewer.