Submit
Path:
~
/
home
/
bfxleof
/
www
/
wp-includes
/
css
/
File Content:
post-thumbnail-template.php
<?php /** * WordPress Post Thumbnail Template Functions. * * Support for post thumbnails. * Theme's functions.php must call add_theme_support( 'post-thumbnails' ) to use these. * * @package WordPress * @subpackage Template */ /** * Determines whether a post has an image attached. * * For more information on this and similar theme functions, check out * the {@link https://developer.wordpress.org/themes/basics/conditional-tags/ * Conditional Tags} article in the Theme Developer Handbook. * * @since 2.9.0 * @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`. * @return bool Whether the post has an image attached. */ function has_post_thumbnail( $post = null ) { $thumbnail_id = get_post_thumbnail_id( $post ); $has_thumbnail = (bool) $thumbnail_id; /** * Filters whether a post has a post thumbnail. * * @since 5.1.0 * * @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|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 ); } /** * Retrieve post thumbnail ID. * * @since 2.9.0 * @since 4.4.0 `$post` can be a post ID or WP_Post object. * @since 5.5.0 The return value for a non-existing post * was changed to false instead of an empty string. * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. * @return int|false Post thumbnail ID (which can be 0 if the thumbnail is not set), * or false if the post does not exist. */ function get_post_thumbnail_id( $post = null ) { $post = get_post( $post ); if ( ! $post ) { return false; } return (int) get_post_meta( $post->ID, '_thumbnail_id', true ); } /** * Display the post thumbnail. * * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size * is registered, which differs from the 'thumbnail' image size managed via the * Settings > Media screen. * * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image * size is used by default, though a different size can be specified instead as needed. * * @since 2.9.0 * * @see get_the_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 = '' ) { echo get_the_post_thumbnail( null, $size, $attr ); } /** * Update cache for thumbnails in the current loop. * * @since 3.2.0 * * @global WP_Query $wp_query WordPress Query object. * * @param WP_Query $wp_query Optional. A WP_Query instance. Defaults to the $wp_query global. */ function update_post_thumbnail_cache( $wp_query = null ) { if ( ! $wp_query ) { $wp_query = $GLOBALS['wp_query']; } if ( $wp_query->thumbnails_cached ) { return; } $thumb_ids = array(); foreach ( $wp_query->posts as $post ) { $id = get_post_thumbnail_id( $post->ID ); if ( $id ) { $thumb_ids[] = $id; } } if ( ! empty( $thumb_ids ) ) { _prime_post_caches( $thumb_ids, false, true ); } $wp_query->thumbnails_cached = true; } /** * Retrieve the post thumbnail. * * When a theme adds 'post-thumbnail' support, a special 'post-thumbnail' image size * is registered, which differs from the 'thumbnail' image size managed via the * Settings > Media screen. * * When using the_post_thumbnail() or related functions, the 'post-thumbnail' image * size is used by default, though a different size can be specified instead as needed. * * @since 2.9.0 * @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|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. */ function get_the_post_thumbnail( $post = null, $size = 'post-thumbnail', $attr = '' ) { $post = get_post( $post ); if ( ! $post ) { return ''; } $post_thumbnail_id = get_post_thumbnail_id( $post ); /** * Filters the post thumbnail size. * * @since 2.9.0 * @since 4.9.0 Added the `$post_id` parameter. * * @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 ); if ( $post_thumbnail_id ) { /** * Fires before fetching the post thumbnail HTML. * * Provides "just in time" filtering of all filters in wp_get_attachment_image(). * * @since 2.9.0 * * @param int $post_id The post ID. * @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 ); if ( in_the_loop() ) { update_post_thumbnail_cache(); } $html = wp_get_attachment_image( $post_thumbnail_id, $size, false, $attr ); /** * Fires after fetching the post thumbnail HTML. * * @since 2.9.0 * * @param int $post_id The post ID. * @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 ); } else { $html = ''; } /** * Filters the post thumbnail HTML. * * @since 2.9.0 * * @param string $html The post thumbnail HTML. * @param int $post_id The post ID. * @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 ); } /** * Return the post thumbnail URL. * * @since 4.4.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. * @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 ); if ( ! $post_thumbnail_id ) { return false; } return wp_get_attachment_image_url( $post_thumbnail_id, $size ); } /** * Display the post thumbnail URL. * * @since 4.4.0 * * @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'. */ function the_post_thumbnail_url( $size = 'post-thumbnail' ) { $url = get_the_post_thumbnail_url( null, $size ); if ( $url ) { echo esc_url( $url ); } } /** * Returns the post thumbnail caption. * * @since 4.6.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. * @return string Post thumbnail caption. */ function get_the_post_thumbnail_caption( $post = null ) { $post_thumbnail_id = get_post_thumbnail_id( $post ); if ( ! $post_thumbnail_id ) { return ''; } $caption = wp_get_attachment_caption( $post_thumbnail_id ); if ( ! $caption ) { $caption = ''; } return $caption; } /** * Displays the post thumbnail caption. * * @since 4.6.0 * * @param int|WP_Post $post Optional. Post ID or WP_Post object. Default is global `$post`. */ function the_post_thumbnail_caption( $post = null ) { /** * Filters the displayed post thumbnail caption. * * @since 4.6.0 * * @param string $caption Caption for the given attachment. */ echo apply_filters( 'the_post_thumbnail_caption', get_the_post_thumbnail_caption( $post ) ); }
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
dist
---
0755
418-20260707051743.php
478 bytes
0644
418.php
478 bytes
0644
ChaCha20.php
12934 bytes
0644
Exception.php
1214 bytes
0644
Hooks.php
1510 bytes
0644
SMTP.php
47285 bytes
0644
admin-bar-rtl.min-20260621190127.css
19600 bytes
0644
admin-bar-rtl.min.css
19600 bytes
0644
admin-bar.css
23876 bytes
0644
archives.php
2768 bytes
0644
autoload.php
2731 bytes
0644
block-20260704150646.json
458 bytes
0644
block-serialization-default-parser.min.js
4516 bytes
0644
block.json
458 bytes
0644
buttons-rtl.min.css
5856 bytes
0644
calendar.php
1569 bytes
0644
category-template.php
55563 bytes
0644
class-json.php
43441 bytes
0644
class-wp-customize-nav-menus-20260707074719.php
57019 bytes
0644
class-wp-customize-nav-menus.php
57019 bytes
0644
class-wp-embed.php
15791 bytes
0644
class-wp-http-streams-20260706233436.php
16117 bytes
0644
class-wp-http-streams.php
16117 bytes
0644
class-wp-locale.php
13982 bytes
0644
class-wp-network-20260705112520.php
12379 bytes
0644
class-wp-network-query.php
19169 bytes
0644
class-wp-network.php
12379 bytes
0644
class-wp-oembed-controller-20260621150705.php
6793 bytes
0644
class-wp-oembed-controller.php
6793 bytes
0644
class-wp-site-20260705053036.php
7428 bytes
0644
class-wp-site-query.php
29308 bytes
0644
class-wp-site.php
7428 bytes
0644
class-wp-sitemaps-posts.php
5875 bytes
0644
class-wp-sitemaps-provider-20260705040634.php
4366 bytes
0644
class-wp-sitemaps-provider.php
4366 bytes
0644
class-wp-sitemaps.php
6290 bytes
0644
class-wp-theme-20260622114043.php
51601 bytes
0644
class-wp-theme.php
51601 bytes
0644
class-wp-widget-calendar.php
2871 bytes
0644
class-wp-widget-media-image.php
12037 bytes
0644
class-wp-widget-recent-posts-20260621162217.php
5914 bytes
0644
comment-20260621221544.php
126193 bytes
0644
common-rtl-20260705020209.css
6510 bytes
0644
common-rtl.css
6510 bytes
0644
core-20260705060928.js
48955 bytes
0644
core.js
48955 bytes
0644
customize-base.js
25766 bytes
0644
customize-preview-20260621173414.css
3629 bytes
0644
customize-preview.min-20260622022914.css
2870 bytes
0644
customize-selective-refresh.js
33332 bytes
0644
dashicons.min.css
59016 bytes
0644
data.js
147192 bytes
0644
editor-rtl.min-20260621163121.css
27212 bytes
0644
editor-styles-rtl-20260704171503.css
3470 bytes
0644
editor-styles-rtl.css
3470 bytes
0644
effect-puff.js
943 bytes
0644
effect-transfer.js
836 bytes
0644
footer-embed.php
438 bytes
0644
fsockopen.php
12436 bytes
0644
getid3.php
75114 bytes
0644
https-detection-20260623211809-20260705134447.php
6871 bytes
0644
https-detection-20260623211809-20260706072306.php
6871 bytes
0644
https-detection-20260623211809.php
6871 bytes
0644
https-detection.php
6871 bytes
0644
https-migration-20260621215951.php
4730 bytes
0644
https-migration-20260621222700-20260622020253-20260705051210.php
4730 bytes
0644
https-migration-20260621222700-20260622020253.php
4730 bytes
0644
https-migration-20260621222700-20260623080551.php
4730 bytes
0644
https-migration-20260622015718-20260623112023.php
4730 bytes
0644
https-migration-20260622015741-20260624164442.php
4730 bytes
0644
https-migration-20260622015741.php
4730 bytes
0644
https-migration-20260622015815-20260623130729.php
4730 bytes
0644
https-migration-20260622015815.php
4730 bytes
0644
https-migration-20260622055634.php
4730 bytes
0644
https-migration-20260622145328-20260624065813.php
4730 bytes
0644
https-migration-20260622145328.php
4730 bytes
0644
https-migration-20260622165410-20260624025941.php
4730 bytes
0644
https-migration-20260622194220.php
4730 bytes
0644
https-migration-20260622204948.php
4730 bytes
0644
https-migration-20260622210714.php
4730 bytes
0644
https-migration-20260622211332-20260624144153.php
4730 bytes
0644
https-migration-20260622211332.php
4730 bytes
0644
https-migration.php
4730 bytes
0644
jquery-ui-dialog-20260621190135.css
5928 bytes
0644
jquery-ui-dialog-rtl.css
5967 bytes
0644
jquery-ui-dialog-rtl.min.css
4552 bytes
0644
jquery-ui-dialog.min.css
4548 bytes
0644
json2.js
18422 bytes
0644
latest-comments.php
4999 bytes
0644
locale-20260707074821.php
162 bytes
0644
locale.php
162 bytes
0644
media-views-rtl.css
56076 bytes
0644
media-views-rtl.min.css
45507 bytes
0644
media-views.css
56034 bytes
0644
media-views.min.css
45500 bytes
0644
ms-blogs.php
25174 bytes
0644
ms-site-20260705004413.php
43512 bytes
0644
ms-site.php
43512 bytes
0644
nav-menu-template.php
23296 bytes
0644
php72compat_const-20260705065845.php
4597 bytes
0644
php72compat_const-20260705195122.php
4597 bytes
0644
php72compat_const-20260705201332.php
4597 bytes
0644
php72compat_const-20260706081739.php
4597 bytes
0644
php72compat_const.php
4597 bytes
0644
post-thumbnail-template.php
9353 bytes
0644
progressbar.min.js
2514 bytes
0644
revision-20260705053011.php
22027 bytes
0644
revision.php
22027 bytes
0644
shortcode-20260622122648.php
697 bytes
0644
shortcode.min-20260705111012.js
4096 bytes
0644
shortcode.min.js
4096 bytes
0644
shortcode.php
697 bytes
0644
sitemaps-20260621162408.php
3236 bytes
0644
style-rtl.css
27819 bytes
0644
taxonomy.php
165888 bytes
0644
tiny_mce_popup.js
15988 bytes
0644
tinymce.min.js
365570 bytes
0644
utils.js
4665 bytes
0644
wp-auth-check-20260621163143.css
2508 bytes
0644
wp-auth-check-rtl.css
2545 bytes
0644
wp-auth-check-rtl.min.css
1918 bytes
0644
wp-content.css
8624 bytes
0644
wp-custom-header.js
10447 bytes
0644
wp-embed-template-20260621162209.css
7937 bytes
0644
wp-embed-template-ie.min.css
1473 bytes
0604
wp-embed.min.js
1478 bytes
0644
N4ST4R_ID | Naxtarrr