30 lines
727 B
PHP
30 lines
727 B
PHP
<?php
|
|
/**
|
|
* IGNY8 Featured Image Block
|
|
* Displays featured image with AI prompt 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">
|
|
<figure class="igny8-image-figure igny8-image-card">
|
|
<img src="<?php echo esc_url($image_url); ?>"
|
|
alt="<?php echo esc_attr($image_alt ?: get_the_title()); ?>"
|
|
class="igny8-featured-image igny8-image-landscape"
|
|
loading="lazy">
|
|
</figure>
|
|
</div>
|