This commit is contained in:
IGNY8 VPS (Salman)
2026-01-10 07:28:11 +00:00
parent ceee9ba34d
commit af95454049
5 changed files with 88 additions and 32 deletions

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.3.0
* Version: 1.3.1
* 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.3.0');
define('IGNY8_BRIDGE_VERSION', '1.3.1');
define('IGNY8_BRIDGE_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('IGNY8_BRIDGE_PLUGIN_URL', plugin_dir_url(__FILE__));
define('IGNY8_BRIDGE_PLUGIN_FILE', __FILE__);

View File

@@ -923,15 +923,73 @@
/* === Landscape Image Card Fit === */
.igny8-image-landscape-figure {
width: fit-content;
max-width: 100%;
margin: 0 auto 2rem;
width: 100%;
max-width: none;
margin: 0 0 2rem 0;
}
.igny8-image-landscape-figure .igny8-image-landscape {
max-width: 100%;
width: auto;
width: 100%;
max-width: none;
height: auto;
display: block;
}
/* === Square Image Two-Column Layout === */
.igny8-section-content.igny8-has-square-image {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 2rem;
align-items: start;
}
.igny8-section-content.igny8-has-square-image .igny8-image-figure {
max-width: none;
float: none;
margin: 0;
}
.igny8-section-content.igny8-has-square-image.igny8-image-left .igny8-image-figure {
order: 1;
}
.igny8-section-content.igny8-has-square-image.igny8-image-left .igny8-prose {
order: 2;
}
.igny8-section-content.igny8-has-square-image.igny8-image-right .igny8-image-figure {
order: 2;
}
.igny8-section-content.igny8-has-square-image.igny8-image-right .igny8-prose {
order: 1;
}
@media (max-width: 768px) {
.igny8-section-content.igny8-has-square-image {
grid-template-columns: 1fr;
}
.igny8-section-content.igny8-has-square-image .igny8-image-figure,
.igny8-section-content.igny8-has-square-image .igny8-prose {
order: unset;
}
}
/* === Category Link Styles === */
.igny8-category-link {
text-decoration: none;
color: inherit;
transition: color 0.2s ease;
}
.igny8-category-link:hover {
color: var(--igny8-theme-color);
}
.igny8-cat-separator {
opacity: 0.5;
margin: 0 0.25rem;
}
/* === Blockquote Fix (prevent overlap with floated images) === */

View File

@@ -169,15 +169,16 @@ $reuse_pattern = [1, 0, 3, 2]; // Featured, Square1, Landscape2, Square2
</div>
<?php
}
// Square image (left or right aligned)
// Square image (left or right aligned) - 2 column layout
elseif ($img_url && $img_type === 'square') {
$img_class = 'igny8-image-square-' . $img_align;
if (!$show_description) {
$img_class .= ' igny8-image-reuse';
}
$section_class = 'igny8-section-content igny8-has-square-image igny8-image-' . $img_align;
?>
<div class="igny8-section-content">
<figure class="igny8-image-figure <?php echo esc_attr($img_class); ?>">
<div class="<?php echo esc_attr($section_class); ?>">
<figure class="igny8-image-figure">
<img src="<?php echo esc_url($img_url); ?>"
alt="<?php echo esc_attr($section['heading']); ?>"
class="igny8-in-article-image"
@@ -191,10 +192,6 @@ $reuse_pattern = [1, 0, 3, 2]; // Featured, Square1, Landscape2, Square2
<div class="igny8-prose">
<?php echo $section['content']; ?>
</div>
<?php
// Widget placeholder below square images
igny8_render_widget_placeholder($img_align, $index);
?>
</div>
<?php
}

View File

@@ -52,14 +52,16 @@ if (!defined('ABSPATH')) {
<!-- Topic (Cluster Name) -->
<?php if ($cluster_name):
// Try to find a tag or category matching the cluster name for linking
$cluster_link = '';
// Create search URL for cluster name as fallback
$cluster_link = add_query_arg('s', urlencode($cluster_name), home_url('/'));
// Try to find a tag or category matching the cluster name
$cluster_tag = get_term_by('name', $cluster_name, 'post_tag');
if ($cluster_tag) {
if ($cluster_tag && !is_wp_error($cluster_tag)) {
$cluster_link = get_term_link($cluster_tag);
} else {
$cluster_cat = get_term_by('name', $cluster_name, 'category');
if ($cluster_cat) {
if ($cluster_cat && !is_wp_error($cluster_cat)) {
$cluster_link = get_term_link($cluster_cat);
}
}
@@ -69,15 +71,11 @@ if (!defined('ABSPATH')) {
<path fill-rule="evenodd" d="M5.05 4.05a7 7 0 119.9 9.9L10 18.9l-4.95-4.95a7 7 0 010-9.9zM10 11a2 2 0 100-4 2 2 0 000 4z"/>
</svg>
<span class="igny8-meta-label">Topic:</span>
<?php if ($cluster_link && !is_wp_error($cluster_link)): ?>
<a href="<?php echo esc_url($cluster_link); ?>" class="igny8-meta-value igny8-clickable-link"><?php echo esc_html($cluster_name); ?></a>
<?php else: ?>
<span class="igny8-meta-value"><?php echo esc_html($cluster_name); ?></span>
<?php endif; ?>
</div>
<?php endif; ?>
<!-- Categories (with hierarchy) -->
<!-- Categories (each level separately clickable) -->
<?php if ($categories && !is_wp_error($categories)): ?>
<div class="igny8-meta-item">
<svg class="igny8-icon" viewBox="0 0 20 20" fill="currentColor">
@@ -86,17 +84,23 @@ if (!defined('ABSPATH')) {
<span class="igny8-meta-label">Categories:</span>
<div class="igny8-meta-badges">
<?php foreach ($categories as $cat):
// Build full hierarchy path
// Build full hierarchy path with each level clickable
$hierarchy = [];
$current_cat = $cat;
while ($current_cat) {
array_unshift($hierarchy, $current_cat);
$current_cat = $current_cat->parent ? get_category($current_cat->parent) : null;
}
// Output each category in hierarchy as separate clickable link
$hierarchy_links = [];
foreach ($hierarchy as $h_cat) {
$hierarchy_links[] = '<a href="' . esc_url(get_category_link($h_cat->term_id)) . '" class="igny8-category-link">' . esc_html($h_cat->name) . '</a>';
}
?>
<a href="<?php echo esc_url(get_category_link($cat->term_id)); ?>" class="igny8-category-badge igny8-clickable-badge">
<?php echo esc_html(implode(' ', array_map(function($c) { return $c->name; }, $hierarchy))); ?>
</a>
<span class="igny8-category-badge">
<?php echo implode(' <span class="igny8-cat-separator"></span> ', $hierarchy_links); ?>
</span>
<?php endforeach; ?>
</div>
</div>

View File

@@ -81,10 +81,7 @@ if (defined('WP_DEBUG') && WP_DEBUG) {
include plugin_dir_path(__FILE__) . 'parts/igny8-featured-image.php';
}
// Table of Contents
include plugin_dir_path(__FILE__) . 'parts/igny8-table-of-contents.php';
// Content sections
// Content sections (includes TOC in intro)
include plugin_dir_path(__FILE__) . 'parts/igny8-content-sections.php';
// Metadata footer