Make WordPress Core

Ticket #31351: 31351.diff

File 31351.diff, 2.4 KB (added by DrewAPicture, 10 years ago)
  • src/wp-includes/post-thumbnail-template.php

     
    3737/**
    3838 * Display Post Thumbnail.
    3939 *
     40 * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size
     41 * is registered, which differs from the 'thumbnail' image size managed in WordPress
     42 * via the Settings > Media screen. When using the_post_thumbnail() or related functions,
     43 * the 'post-thumbnail' image size is used by default, though a different size can be
     44 * specified instead as needed.
     45 *
    4046 * @since 2.9.0
    4147 *
    42  * @param string|array $size Optional. Image size. Defaults to 'post-thumbnail', which theme sets using set_post_thumbnail_size( $width, $height, $crop_flag );.
    43  * @param string|array $attr Optional. Query string or array of attributes.
     48 * @see get_the_post_thumbnail()
     49 *
     50 * @param string|array $size Optional. Registered image size to use, or flat array of height
     51 *                           and width values. Default 'post-thumbnail'.
     52 * @param string|array $attr Optional. Query string or array of attributes. Default empty.
    4453 */
    4554function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) {
    4655        echo get_the_post_thumbnail( null, $size, $attr );
     
    7685/**
    7786 * Retrieve Post Thumbnail.
    7887 *
     88 * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size
     89 * is registered, which differs from the 'thumbnail' image size managed in WordPress
     90 * via the Settings > Media screen. When using the_post_thumbnail() or related functions,
     91 * the 'post-thumbnail' image size is used by default, though a different size can be
     92 * specified instead as needed.
     93 *
    7994 * @since 2.9.0
    8095 *
    81  * @param int $post_id Optional. Post ID.
    82  * @param string $size Optional. Image size. Defaults to 'post-thumbnail'.
    83  * @param string|array $attr Optional. Query string or array of attributes.
     96 * @param int $post_id       Post ID.
     97 * @param string|array $size Optional. Registered image size to use, or flat array of height
     98 *                           and width values. Default 'post-thumbnail'.
     99 * @param string|array $attr Optional. Query string or array of attributes. Default empty.
    84100 */
    85101function get_the_post_thumbnail( $post_id = null, $size = 'post-thumbnail', $attr = '' ) {
    86102        $post_id = ( null === $post_id ) ? get_the_ID() : $post_id;