Files
igny8/plugins/wordpress/source/igny8-wp-bridge/templates/parts/igny8-featured-image.php
IGNY8 VPS (Salman) ceee9ba34d wp 1.3.0
2026-01-10 07:04:24 +00:00

36 lines
923 B
PHP

<?php
/**
* IGNY8 Featured Image Block
* Displays featured image with caption if available
*
* @package Igny8Bridge
*/
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
$image_url = wp_get_attachment_image_url($featured_image_id, 'full');
$image_alt = get_post_meta($featured_image_id, '_wp_attachment_image_alt', true);
if (!$image_url) {
return;
}
?>
<div class="igny8-featured-image-block igny8-featured-fullwidth">
<div class="igny8-featured-image-wrapper">
<img src="<?php echo esc_url($image_url); ?>"
alt="<?php echo esc_attr($image_alt ?: get_the_title()); ?>"
class="igny8-featured-image"
loading="lazy">
</div>
<?php if ($featured_image_caption): ?>
<div class="igny8-image-caption">
<p class="igny8-caption-text"><?php echo esc_html($featured_image_caption); ?></p>
</div>
<?php endif; ?>
</div>