Plugin packaging and docs
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?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">
|
||||
<div class="igny8-featured-header">
|
||||
<span class="igny8-featured-label">Featured Visual</span>
|
||||
</div>
|
||||
|
||||
<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_prompt): ?>
|
||||
<div class="igny8-image-prompt">
|
||||
<p class="igny8-prompt-label">AI Image Prompt</p>
|
||||
<p class="igny8-prompt-text"><?php echo esc_html($featured_image_prompt); ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user