diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/post-thumbnail-template.php --- a/wp/wp-includes/post-thumbnail-template.php Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/post-thumbnail-template.php Wed Sep 21 18:19:35 2022 +0200 @@ -33,7 +33,7 @@ * * @param bool $has_thumbnail true if the post has a post thumbnail, otherwise false. * @param int|WP_Post|null $post Post ID or WP_Post object. Default is global `$post`. - * @param int|string $thumbnail_id Post thumbnail ID or empty string. + * @param int|false $thumbnail_id Post thumbnail ID or false if the post does not exist. */ return (bool) apply_filters( 'has_post_thumbnail', $has_thumbnail, $post, $thumbnail_id ); } @@ -74,9 +74,8 @@ * * @see get_the_post_thumbnail() * - * @param string|array $size Optional. Image size to use. Accepts any valid image size, or - * an array of width and height values in pixels (in that order). - * Default 'post-thumbnail'. + * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of + * width and height values in pixels (in that order). Default 'post-thumbnail'. * @param string|array $attr Optional. Query string or array of attributes. Default empty. */ function the_post_thumbnail( $size = 'post-thumbnail', $attr = '' ) { @@ -131,9 +130,8 @@ * @since 4.4.0 `$post` can be a post ID or WP_Post object. * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. - * @param string|array $size Optional. Image size to use. Accepts any valid image size, or - * an array of width and height values in pixels (in that order). - * Default 'post-thumbnail'. + * @param string|int[] $size Optional. Image size. Accepts any registered image size name, or an array of + * width and height values in pixels (in that order). Default 'post-thumbnail'. * @param string|array $attr Optional. Query string or array of attributes. Default empty. * @return string The post thumbnail image tag. */ @@ -152,8 +150,8 @@ * @since 2.9.0 * @since 4.9.0 Added the `$post_id` parameter. * - * @param string|array $size The post thumbnail size. Image size or array of width and height - * values (in that order). Default 'post-thumbnail'. + * @param string|int[] $size Requested image size. Can be any registered image size name, or + * an array of width and height values in pixels (in that order). * @param int $post_id The post ID. */ $size = apply_filters( 'post_thumbnail_size', $size, $post->ID ); @@ -168,9 +166,9 @@ * @since 2.9.0 * * @param int $post_id The post ID. - * @param string $post_thumbnail_id The post thumbnail ID. - * @param string|array $size The post thumbnail size. Image size or array of width - * and height values (in that order). Default 'post-thumbnail'. + * @param int $post_thumbnail_id The post thumbnail ID. + * @param string|int[] $size Requested image size. Can be any registered image size name, or + * an array of width and height values in pixels (in that order). */ do_action( 'begin_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size ); @@ -186,9 +184,9 @@ * @since 2.9.0 * * @param int $post_id The post ID. - * @param string $post_thumbnail_id The post thumbnail ID. - * @param string|array $size The post thumbnail size. Image size or array of width - * and height values (in that order). Default 'post-thumbnail'. + * @param int $post_thumbnail_id The post thumbnail ID. + * @param string|int[] $size Requested image size. Can be any registered image size name, or + * an array of width and height values in pixels (in that order). */ do_action( 'end_fetch_post_thumbnail_html', $post->ID, $post_thumbnail_id, $size ); @@ -203,9 +201,9 @@ * * @param string $html The post thumbnail HTML. * @param int $post_id The post ID. - * @param string $post_thumbnail_id The post thumbnail ID. - * @param string|array $size The post thumbnail size. Image size or array of width and height - * values (in that order). Default 'post-thumbnail'. + * @param int $post_thumbnail_id The post thumbnail ID. + * @param string|int[] $size Requested image size. Can be any registered image size name, or + * an array of width and height values in pixels (in that order). * @param string $attr Query string of attributes. */ return apply_filters( 'post_thumbnail_html', $html, $post->ID, $post_thumbnail_id, $size, $attr ); @@ -217,9 +215,10 @@ * @since 4.4.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. - * @param string|array $size Optional. Registered image size to retrieve the source for or a flat - * array of height and width dimensions. Default 'post-thumbnail'. - * @return string|false Post thumbnail URL or false if no URL is available. + * @param string|int[] $size Optional. Registered image size to retrieve the source for or a flat array + * of height and width dimensions. Default 'post-thumbnail'. + * @return string|false Post thumbnail URL or false if no image is available. If `$size` does not match + * any registered image size, the original image URL will be returned. */ function get_the_post_thumbnail_url( $post = null, $size = 'post-thumbnail' ) { $post_thumbnail_id = get_post_thumbnail_id( $post ); @@ -236,7 +235,7 @@ * * @since 4.4.0 * - * @param string|array $size Optional. Image size to use. Accepts any valid image size, + * @param string|int[] $size Optional. Image size to use. Accepts any valid image size, * or an array of width and height values in pixels (in that order). * Default 'post-thumbnail'. */