appa dn plugin udpates for integrationa dn final touches

This commit is contained in:
IGNY8 VPS (Salman)
2026-01-13 09:23:54 +00:00
parent e053655962
commit d2b733640c
13 changed files with 236 additions and 337 deletions

View File

@@ -79,15 +79,6 @@ class Igny8Admin {
array($this, 'render_page')
);
add_submenu_page(
'igny8-connection',
__('Data', 'igny8-bridge'),
__('Data', 'igny8-bridge'),
'manage_options',
'igny8-data',
array($this, 'render_page')
);
add_submenu_page(
'igny8-connection',
__('Logs', 'igny8-bridge'),
@@ -281,9 +272,6 @@ class Igny8Admin {
case 'igny8-settings':
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/settings.php';
break;
case 'igny8-data':
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/data.php';
break;
case 'igny8-logs':
$template_file = IGNY8_BRIDGE_PLUGIN_DIR . 'admin/pages/logs.php';
break;

View File

@@ -64,16 +64,6 @@ $is_connected = !empty($api_key);
</a>
</li>
<li>
<a href="<?php echo esc_url(admin_url('admin.php?page=igny8-data')); ?>"
class="<?php echo ($current_page === 'igny8-data') ? 'active' : ''; ?>">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"/>
</svg>
<?php _e('Data', 'igny8-bridge'); ?>
</a>
</li>
<li>
<a href="<?php echo esc_url(admin_url('admin.php?page=igny8-logs')); ?>"
class="<?php echo ($current_page === 'igny8-logs') ? 'active' : ''; ?>">

View File

@@ -41,7 +41,7 @@ $show_success = isset($_GET['connected']) && $_GET['connected'] === '1';
?>
<div class="igny8-page-header">
<div style="display: flex; justify-content: space-between; align-items: flex-start;">
<div style="display: flex; justify-content: space-between; align-items: flex-start; width: 100%;">
<div>
<h1><?php _e('Dashboard', 'igny8-bridge'); ?></h1>
<p><?php _e('Manage your IGNY8 connection and monitor content', 'igny8-bridge'); ?></p>

View File

@@ -1,156 +0,0 @@
<?php
/**
* Data Page
*
* @package Igny8Bridge
*/
// Prevent direct access
if (!defined('ABSPATH')) {
exit;
}
// Include layout header
include IGNY8_BRIDGE_PLUGIN_DIR . 'admin/layout-header.php';
// Get data statistics
$link_queue = get_option('igny8_link_queue', array());
$pending_links = array_filter($link_queue, function($item) {
return isset($item['status']) && $item['status'] === 'pending';
});
$total_links = count($link_queue);
$pending_count = count($pending_links);
$processed_count = $total_links - $pending_count;
?>
<div class="igny8-page-header">
<div style="display: flex; justify-content: space-between; align-items: flex-start;">
<div>
<h1><?php _e('Data', 'igny8-bridge'); ?></h1>
<p><?php _e('View synced data, queues, and content status', 'igny8-bridge'); ?></p>
</div>
<div style="text-align: right; font-size: 14px; color: rgba(255,255,255,0.9);">
<span style="display: block; font-weight: 500;">Plugin v<?php echo esc_html(IGNY8_BRIDGE_VERSION); ?></span>
<span style="display: block; opacity: 0.75; font-size: 13px;">PHP <?php echo esc_html(PHP_VERSION); ?></span>
</div>
</div>
</div>
<!-- Statistics -->
<div class="igny8-grid igny8-grid-3">
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"/>
</svg>
<?php _e('Total Links', 'igny8-bridge'); ?>
</h2>
</div>
<div style="padding: 16px 0;">
<p style="font-size: 32px; font-weight: 700; margin: 0; color: var(--igny8-primary);">
<?php echo esc_html($total_links); ?>
</p>
</div>
</div>
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<?php _e('Pending', 'igny8-bridge'); ?>
</h2>
</div>
<div style="padding: 16px 0;">
<p style="font-size: 32px; font-weight: 700; margin: 0; color: var(--igny8-warning);">
<?php echo esc_html($pending_count); ?>
</p>
</div>
</div>
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<?php _e('Processed', 'igny8-bridge'); ?>
</h2>
</div>
<div style="padding: 16px 0;">
<p style="font-size: 32px; font-weight: 700; margin: 0; color: var(--igny8-success);">
<?php echo esc_html($processed_count); ?>
</p>
</div>
</div>
</div>
<!-- Link Queue -->
<?php if (!empty($link_queue)): ?>
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"/>
</svg>
<?php _e('Link Queue', 'igny8-bridge'); ?>
</h2>
</div>
<table class="igny8-table">
<thead>
<tr>
<th><?php _e('Post Title', 'igny8-bridge'); ?></th>
<th><?php _e('Target URL', 'igny8-bridge'); ?></th>
<th><?php _e('Anchor', 'igny8-bridge'); ?></th>
<th><?php _e('Status', 'igny8-bridge'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach (array_slice($link_queue, 0, 10) as $item): ?>
<tr>
<td>
<?php
$post = get_post($item['post_id'] ?? 0);
echo $post ? esc_html($post->post_title) : __('Unknown Post', 'igny8-bridge');
?>
</td>
<td>
<a href="<?php echo esc_url($item['target_url'] ?? '#'); ?>" target="_blank" style="color: var(--igny8-primary);">
<?php echo esc_html(isset($item['target_url']) ? parse_url($item['target_url'], PHP_URL_HOST) : '—'); ?>
</a>
</td>
<td><?php echo esc_html($item['anchor'] ?? '—'); ?></td>
<td>
<?php if (($item['status'] ?? '') === 'pending'): ?>
<span class="igny8-status igny8-status-disconnected"><?php _e('Pending', 'igny8-bridge'); ?></span>
<?php else: ?>
<span class="igny8-status igny8-status-connected"><?php _e('Processed', 'igny8-bridge'); ?></span>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php if (count($link_queue) > 10): ?>
<p style="margin-top: 16px; color: var(--igny8-text-dim); font-size: 14px;">
<?php printf(__('Showing 10 of %d total items', 'igny8-bridge'), count($link_queue)); ?>
</p>
<?php endif; ?>
</div>
<?php else: ?>
<div class="igny8-alert igny8-alert-success">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<span><?php _e('No items in link queue. All links have been processed.', 'igny8-bridge'); ?></span>
</div>
<?php endif; ?>
<?php
// Include layout footer
include IGNY8_BRIDGE_PLUGIN_DIR . 'admin/layout-footer.php';
?>

View File

@@ -18,7 +18,7 @@ $webhook_logs = igny8_get_webhook_logs(array('limit' => 20));
?>
<div class="igny8-page-header">
<div style="display: flex; justify-content: space-between; align-items: flex-start;">
<div style="display: flex; justify-content: space-between; align-items: flex-start; width: 100%;">
<div>
<h1><?php _e('Logs', 'igny8-bridge'); ?></h1>
<p><?php _e('Review webhook activity and troubleshoot sync issues', 'igny8-bridge'); ?></p>

View File

@@ -1,7 +1,7 @@
<?php
/**
* Settings Page (Renamed from Controls)
* Simplified post type and taxonomy management
* Settings Page
* Configure post types, taxonomies, and sync settings
*
* @package Igny8Bridge
*/
@@ -34,7 +34,7 @@ foreach ($all_post_types as $pt) {
?>
<div class="igny8-page-header">
<div style="display: flex; justify-content: space-between; align-items: flex-start;">
<div style="display: flex; justify-content: space-between; align-items: flex-start; width: 100%;">
<div>
<h1><?php _e('Settings', 'igny8-bridge'); ?></h1>
<p><?php _e('Configure post types, taxonomies, and sync settings', 'igny8-bridge'); ?></p>
@@ -49,50 +49,130 @@ foreach ($all_post_types as $pt) {
<form method="post" action="options.php" id="igny8-settings-form">
<?php settings_fields('igny8_bridge_controls'); ?>
<!-- Post Types Section -->
<div class="igny8-card" style="margin-bottom: 24px;">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width: 20px; height: 20px;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
<?php _e('Post Types', 'igny8-bridge'); ?>
</h2>
</div>
<p style="margin-bottom: 16px; color: var(--igny8-text-dim);">
<?php _e('Enable post types to sync with IGNY8. Only enabled post types will show their taxonomy configuration below.', 'igny8-bridge'); ?>
</p>
<!-- Top Row: Post Types (1/3) + Default Settings (1/3) + IGNY8 Sync (1/3) -->
<div class="igny8-grid igny8-grid-3" style="margin-bottom: 24px;">
<div style="display: grid; gap: 12px;">
<?php foreach ($public_post_types as $slug => $pt) :
$is_posts = ($slug === 'post');
$is_enabled = in_array($slug, $enabled_post_types, true);
?>
<label class="igny8-post-type-toggle" style="display: flex; align-items: center; cursor: pointer; padding: 12px 16px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-base); background: var(--igny8-surface);">
<input
type="checkbox"
name="igny8_enabled_post_types[]"
value="<?php echo esc_attr($slug); ?>"
class="igny8-post-type-checkbox"
data-post-type="<?php echo esc_attr($slug); ?>"
<?php checked($is_enabled); ?>
style="margin-right: 12px;"
/>
<div style="flex: 1;">
<span style="font-weight: 600;">
<!-- Post Types Card (1/3) -->
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width: 20px; height: 20px;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
</svg>
<?php _e('Post Types', 'igny8-bridge'); ?>
</h2>
</div>
<p style="margin-bottom: 16px; color: var(--igny8-text-dim); font-size: 13px;">
<?php _e('Enable post types to sync with IGNY8.', 'igny8-bridge'); ?>
</p>
<div style="display: grid; gap: 8px;">
<?php foreach ($public_post_types as $slug => $pt) :
$is_posts = ($slug === 'post');
$is_enabled = in_array($slug, $enabled_post_types, true);
?>
<label class="igny8-post-type-toggle" style="display: flex; align-items: center; cursor: pointer; padding: 10px 12px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); background: var(--igny8-surface);">
<input
type="checkbox"
name="igny8_enabled_post_types[]"
value="<?php echo esc_attr($slug); ?>"
class="igny8-post-type-checkbox"
data-post-type="<?php echo esc_attr($slug); ?>"
<?php checked($is_enabled); ?>
style="margin-right: 10px;"
/>
<span style="flex: 1; font-weight: 500; font-size: 14px;">
<?php echo esc_html($pt->label); ?>
</span>
<?php if (!$is_posts) : ?>
<span class="igny8-badge igny8-badge-warning" style="margin-left: 8px;">
<span class="igny8-badge igny8-badge-warning">
<?php _e('Coming Soon', 'igny8-bridge'); ?>
</span>
<?php else: ?>
<span style="color: var(--igny8-text-dim); font-size: 12px;"><?php echo esc_html($slug); ?></span>
<?php endif; ?>
</label>
<?php endforeach; ?>
</div>
</div>
<!-- Default Post Status Card (1/3) -->
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width: 20px; height: 20px;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
</svg>
<?php _e('Default Post Status', 'igny8-bridge'); ?>
</h2>
</div>
<p style="margin-bottom: 16px; color: var(--igny8-text-dim); font-size: 13px;">
<?php _e('Set default status for published content.', 'igny8-bridge'); ?>
</p>
<div style="display: grid; gap: 8px;">
<label style="display: flex; align-items: center; cursor: pointer; padding: 12px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); <?php echo $default_post_status === 'draft' ? 'background: var(--igny8-primary-subtle); border-color: var(--igny8-primary);' : ''; ?>">
<input
type="radio"
name="igny8_default_post_status"
value="draft"
<?php checked($default_post_status, 'draft'); ?>
style="margin-right: 10px;"
/>
<div>
<strong style="font-size: 14px;"><?php _e('Draft', 'igny8-bridge'); ?></strong>
<span style="display: block; font-size: 12px; color: var(--igny8-text-dim);">
<?php _e('Review before publishing', 'igny8-bridge'); ?>
</span>
</div>
<span style="color: var(--igny8-text-dim); font-size: 13px;">
<?php echo esc_html($slug); ?>
</span>
</label>
<?php endforeach; ?>
<label style="display: flex; align-items: center; cursor: pointer; padding: 12px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); <?php echo $default_post_status === 'publish' ? 'background: var(--igny8-primary-subtle); border-color: var(--igny8-primary);' : ''; ?>">
<input
type="radio"
name="igny8_default_post_status"
value="publish"
<?php checked($default_post_status, 'publish'); ?>
style="margin-right: 10px;"
/>
<div>
<strong style="font-size: 14px;"><?php _e('Publish', 'igny8-bridge'); ?></strong>
<span style="display: block; font-size: 12px; color: var(--igny8-text-dim);">
<?php _e('Publish immediately', 'igny8-bridge'); ?>
</span>
</div>
</label>
</div>
</div>
<!-- IGNY8 Sync Card (1/3) -->
<div class="igny8-card">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width: 20px; height: 20px;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
</svg>
<?php _e('IGNY8 Sync', 'igny8-bridge'); ?>
</h2>
</div>
<p style="margin-bottom: 16px; color: var(--igny8-text-dim); font-size: 13px;">
<?php _e('Control content publishing from IGNY8.', 'igny8-bridge'); ?>
</p>
<label style="display: flex; align-items: flex-start; cursor: pointer; padding: 14px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); background: var(--igny8-surface);">
<input
type="checkbox"
name="igny8_sync_enabled"
value="1"
<?php checked($sync_enabled, 1); ?>
style="margin-right: 12px; margin-top: 2px; width: 18px; height: 18px;"
/>
<div>
<strong style="font-size: 14px; display: block;"><?php _e('Enable IGNY8 Sync', 'igny8-bridge'); ?></strong>
<span style="display: block; font-size: 12px; color: var(--igny8-text-dim); margin-top: 4px;">
<?php _e('Allow IGNY8 to publish content to this site', 'igny8-bridge'); ?>
</span>
</div>
</label>
</div>
</div>
@@ -133,7 +213,7 @@ foreach ($all_post_types as $pt) {
<?php else : ?>
<span style="font-size: 20px;">📁</span>
<?php endif; ?>
<?php echo esc_html(strtoupper($pt->label)); ?>
<?php echo esc_html(strtoupper($pt->label)); ?> <?php _e('Taxonomies', 'igny8-bridge'); ?>
</h2>
<?php if (!$is_posts) : ?>
<span class="igny8-badge igny8-badge-warning">
@@ -142,14 +222,8 @@ foreach ($all_post_types as $pt) {
<?php endif; ?>
</div>
<p style="margin-bottom: 16px; color: var(--igny8-text-dim); font-size: 14px;">
<?php printf(__('Taxonomies for %s:', 'igny8-bridge'), esc_html($pt->label)); ?>
</p>
<div style="display: grid; gap: 8px;">
<div style="display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px;">
<?php foreach ($public_taxonomies as $tax_slug => $tax) :
// Default enabled: category, post_tag, product_cat, product_tag, igny8_sectors, igny8_clusters
$default_enabled = in_array($tax_slug, array('category', 'post_tag', 'product_cat', 'product_tag', 'igny8_sectors', 'igny8_clusters'), true);
$is_tax_enabled = in_array($tax_slug, $enabled_taxonomies, true);
?>
<label style="display: flex; align-items: center; cursor: pointer; padding: 10px 14px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); background: var(--igny8-bg);">
@@ -160,90 +234,13 @@ foreach ($all_post_types as $pt) {
<?php checked($is_tax_enabled); ?>
style="margin-right: 10px;"
/>
<span style="flex: 1;"><?php echo esc_html($tax->label); ?></span>
<span style="color: var(--igny8-text-dim); font-size: 12px;"><?php echo esc_html($tax_slug); ?></span>
<span style="flex: 1; font-size: 14px;"><?php echo esc_html($tax->label); ?></span>
</label>
<?php endforeach; ?>
</div>
</div>
<?php endforeach; ?>
<!-- Default Settings -->
<div class="igny8-card" style="margin-bottom: 24px;">
<div class="igny8-card-header">
<h2>
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width: 20px; height: 20px;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"/>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg>
<?php _e('Default Settings', 'igny8-bridge'); ?>
</h2>
</div>
<div class="igny8-grid igny8-grid-2" style="gap: 24px;">
<!-- Default Post Status -->
<div>
<label style="display: block; font-weight: 600; margin-bottom: 12px;">
<?php _e('Default Post Status', 'igny8-bridge'); ?>
</label>
<div style="display: grid; gap: 8px;">
<label style="display: flex; align-items: center; cursor: pointer; padding: 12px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); <?php echo $default_post_status === 'draft' ? 'background: var(--igny8-primary-subtle); border-color: var(--igny8-primary);' : ''; ?>">
<input
type="radio"
name="igny8_default_post_status"
value="draft"
<?php checked($default_post_status, 'draft'); ?>
style="margin-right: 10px;"
/>
<div>
<strong><?php _e('Draft', 'igny8-bridge'); ?></strong>
<span style="display: block; font-size: 12px; color: var(--igny8-text-dim);">
<?php _e('Review before publishing', 'igny8-bridge'); ?>
</span>
</div>
</label>
<label style="display: flex; align-items: center; cursor: pointer; padding: 12px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); <?php echo $default_post_status === 'publish' ? 'background: var(--igny8-primary-subtle); border-color: var(--igny8-primary);' : ''; ?>">
<input
type="radio"
name="igny8_default_post_status"
value="publish"
<?php checked($default_post_status, 'publish'); ?>
style="margin-right: 10px;"
/>
<div>
<strong><?php _e('Publish', 'igny8-bridge'); ?></strong>
<span style="display: block; font-size: 12px; color: var(--igny8-text-dim);">
<?php _e('Publish immediately', 'igny8-bridge'); ?>
</span>
</div>
</label>
</div>
</div>
<!-- Enable Sync -->
<div>
<label style="display: block; font-weight: 600; margin-bottom: 12px;">
<?php _e('IGNY8 Sync', 'igny8-bridge'); ?>
</label>
<label style="display: flex; align-items: center; cursor: pointer; padding: 16px; border: 1px solid var(--igny8-stroke); border-radius: var(--igny8-radius-sm); background: var(--igny8-surface);">
<input
type="checkbox"
name="igny8_sync_enabled"
value="1"
<?php checked($sync_enabled, 1); ?>
style="margin-right: 12px; width: 20px; height: 20px;"
/>
<div>
<strong><?php _e('Enable IGNY8 Sync', 'igny8-bridge'); ?></strong>
<span style="display: block; font-size: 12px; color: var(--igny8-text-dim);">
<?php _e('Allow IGNY8 to publish content to this site', 'igny8-bridge'); ?>
</span>
</div>
</label>
</div>
</div>
</div>
<button type="submit" class="igny8-btn igny8-btn-primary">
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" style="width: 16px; height: 16px;">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"/>
@@ -266,10 +263,6 @@ foreach ($all_post_types as $pt) {
background: #fef3c7;
color: #92400e;
}
.igny8-badge-success {
background: #d1fae5;
color: #065f46;
}
.igny8-post-type-toggle:hover {
border-color: var(--igny8-primary);
}

View File

@@ -745,8 +745,9 @@ function igny8_map_wp_status_to_igny8($wp_status) {
@shared_task(bind=True, max_retries=3)
def publish_content_to_wordpress(self, content_id, ...):
try:
response = requests.post(wordpress_url, json=content_data, timeout=30)
if response.status_code == 201:
# Success
content.wordpress_sync_status = 'success'
content.save()

View File

@@ -3,7 +3,7 @@
* Plugin Name: IGNY8 WordPress Bridge
* Plugin URI: https://igny8.com/igny8-wp-bridge
* Description: Lightweight bridge plugin that connects WordPress to IGNY8 API for one-way content publishing.
* Version: 1.5.1
* Version: 1.5.2
* Author: IGNY8
* Author URI: https://igny8.com/
* License: GPL v2 or later
@@ -22,7 +22,7 @@ if (!defined('ABSPATH')) {
}
// Define plugin constants
define('IGNY8_BRIDGE_VERSION', '1.5.1');
define('IGNY8_BRIDGE_VERSION', '1.5.2');
define('IGNY8_BRIDGE_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('IGNY8_BRIDGE_PLUGIN_URL', plugin_dir_url(__FILE__));
define('IGNY8_BRIDGE_PLUGIN_FILE', __FILE__);