Changeset 31853
- Timestamp:
- 03/20/2015 07:56:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/post-thumbnail-template.php
r31048 r31853 36 36 37 37 /** 38 * Display Post Thumbnail. 38 * Display the post thumbnail. 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 via the 42 * Settings > Media screen. 43 * 44 * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image 45 * size is used by default, though a different size can be specified instead as needed. 39 46 * 40 47 * @since 2.9.0 41 48 * 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. 49 * @see get_the_post_thumbnail() 50 * 51 * @param string|array $size Optional. Registered image size to use, or flat array of height 52 * and width values. Default 'post-thumbnail'. 53 * @param string|array $attr Optional. Query string or array of attributes. Default empty. 44 54 */ 45 55 function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { … … 75 85 76 86 /** 77 * Retrieve Post Thumbnail. 87 * Retrieve the post thumbnail. 88 * 89 * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size 90 * is registered, which differs from the 'thumbnail' image size managed via the 91 * Settings > Media screen. 92 * 93 * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image 94 * size is used by default, though a different size can be specified instead as needed. 78 95 * 79 96 * @since 2.9.0 80 97 * 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. 98 * @param int $post_id Post ID. Default is the ID of the `$post` global. 99 * @param string|array $size Optional. Registered image size to use, or flat array of height 100 * and width values. Default 'post-thumbnail'. 101 * @param string|array $attr Optional. Query string or array of attributes. Default empty. 84 102 */ 85 103 function get_the_post_thumbnail( $post_id = null, $size = 'post-thumbnail', $attr = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.