WordPress.org

Make WordPress Core

Changeset 12320


Ignore:
Timestamp:
12/03/2009 03:59:27 PM (12 years ago)
Author:
ryan
Message:

phpdoc for post thumbnail template functions. Props ramiy. fixes #11310

File:
1 edited

Legend:

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

    r12211 r12320  
    1010 */
    1111
     12/**
     13 * Check if post has an image attached.
     14 *
     15 * @since 2.9.0
     16 *
     17 * @param int $post_id Optional. Post ID.
     18 * @return bool Whether post has an image attached (true) or not (false).
     19 */
    1220function has_post_image( $post_id = NULL ) {
    1321    global $id;
     
    1624}
    1725
     26/**
     27 * Retrieve Post Image ID.
     28 *
     29 * @since 2.9.0
     30 *
     31 * @param int $post_id Optional. Post ID.
     32 * @return int
     33 */
    1834function get_post_image_id( $post_id = NULL ) {
    1935    global $id;
     
    2238}
    2339
     40/**
     41 * Display Post Image.
     42 *
     43 * @since 2.9.0
     44 *
     45 * @param int $size Optional. Image size.  Defaults to 'thumbnail'.
     46 * @param string|array $attr Optional. Query string or array of attributes.
     47 */
    2448function the_post_image( $size = 'thumbnail', $attr = '' ) {
    2549    echo get_the_post_image( NULL, $size, $attr );
    2650}
    2751
     52/**
     53 * Retrieve Post Image.
     54 *
     55 * @since 2.9.0
     56 *
     57 * @param int $post_id Optional. Post ID.
     58 * @param string $size Optional. Image size.  Defaults to 'thumbnail'.
     59 * @param string|array $attr Optional. Query string or array of attributes.
     60  */
    2861function get_the_post_image( $post_id = NULL, $size = 'thumbnail', $attr = '' ) {
    2962    global $id;
Note: See TracChangeset for help on using the changeset viewer.