Ticket #31351: 31351.diff
File 31351.diff, 2.4 KB (added by , 10 years ago) |
---|
-
src/wp-includes/post-thumbnail-template.php
37 37 /** 38 38 * Display Post Thumbnail. 39 39 * 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 * 40 46 * @since 2.9.0 41 47 * 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. 44 53 */ 45 54 function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { 46 55 echo get_the_post_thumbnail( null, $size, $attr ); … … 76 85 /** 77 86 * Retrieve Post Thumbnail. 78 87 * 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 * 79 94 * @since 2.9.0 80 95 * 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. 84 100 */ 85 101 function get_the_post_thumbnail( $post_id = null, $size = 'post-thumbnail', $attr = '' ) { 86 102 $post_id = ( null === $post_id ) ? get_the_ID() : $post_id;