WordPress at a glance

the_post_thumbnail_url() WP 1.0

Display the post thumbnail URL.

Возвращает

Null. Ничего.

1 time = 0.002188s = very slow | 50000 times = 17.96s = slow | PHP 7.0.5, WP 4.4.2

No Hooks.

Usage

the_post_thumbnail_url( $size );
$size(string/array)
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'

Список изменений

С версии 4.4.0 Введена.

Code of the_post_thumbnail_url() WP 5.5.1

wp-includes/post-thumbnail-template.php
<?php
function the_post_thumbnail_url( $size = 'post-thumbnail' ) {
	$url = get_the_post_thumbnail_url( null, $size );

	if ( $url ) {
		echo esc_url( $url );
	}
}

Related Functions

From tag: Thumbnail (images)

More from tag: Link (URL)

More from category: Thumbnails

No comments
    Log In . Register