116 lines
4.3 KiB
PHP
116 lines
4.3 KiB
PHP
<?php
|
|
/**
|
|
* IGNY8 Metadata Footer
|
|
* Shows IGNY8-specific metadata in collapsible format
|
|
* Visible only to users with edit_posts capability (Editor, Administrator, Author for own posts)
|
|
*
|
|
* @package Igny8Bridge
|
|
*/
|
|
|
|
// Exit if accessed directly
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
// Only show if we have IGNY8 content ID and user has edit permissions
|
|
if (!$content_id || !current_user_can('edit_posts')) {
|
|
return;
|
|
}
|
|
?>
|
|
|
|
<div class="igny8-metadata-footer">
|
|
<details class="igny8-metadata-details">
|
|
<summary class="igny8-metadata-summary">
|
|
View IGNY8 Metadata
|
|
</summary>
|
|
<div class="igny8-metadata-content">
|
|
<table class="igny8-metadata-table">
|
|
<tbody>
|
|
<tr>
|
|
<th>Content ID:</th>
|
|
<td><?php echo esc_html($content_id); ?></td>
|
|
</tr>
|
|
<?php if ($task_id): ?>
|
|
<tr>
|
|
<th>Task ID:</th>
|
|
<td><?php echo esc_html($task_id); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($content_type): ?>
|
|
<tr>
|
|
<th>Content Type:</th>
|
|
<td><?php echo esc_html(ucfirst($content_type)); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($structure): ?>
|
|
<tr>
|
|
<th>Structure:</th>
|
|
<td><?php echo esc_html(ucfirst($structure)); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($source): ?>
|
|
<tr>
|
|
<th>Source:</th>
|
|
<td><?php echo esc_html(ucfirst($source)); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($cluster_name): ?>
|
|
<tr>
|
|
<th>Cluster Name:</th>
|
|
<td><?php echo esc_html($cluster_name); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($cluster_id): ?>
|
|
<tr>
|
|
<th>Cluster ID:</th>
|
|
<td><?php echo esc_html($cluster_id); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($sector_id): ?>
|
|
<tr>
|
|
<th>Sector ID:</th>
|
|
<td><?php echo esc_html($sector_id); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($meta_title): ?>
|
|
<tr>
|
|
<th>Meta Title:</th>
|
|
<td><?php echo esc_html($meta_title); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($meta_description): ?>
|
|
<tr>
|
|
<th>Meta Description:</th>
|
|
<td><?php echo esc_html($meta_description); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($primary_keyword): ?>
|
|
<tr>
|
|
<th>Primary Keyword:</th>
|
|
<td><?php echo esc_html($primary_keyword); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($keywords_array): ?>
|
|
<tr>
|
|
<th>Secondary Keywords:</th>
|
|
<td>
|
|
<div class="igny8-keywords-list">
|
|
<?php foreach ($keywords_array as $kw): ?>
|
|
<span class="igny8-keyword-tag"><?php echo esc_html($kw); ?></span>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
<?php if ($last_synced): ?>
|
|
<tr>
|
|
<th>Last Synced:</th>
|
|
<td><?php echo esc_html(date('F j, Y, g:i a', strtotime($last_synced))); ?></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</details>
|
|
</div>
|