1.3.1
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
* Plugin Name: IGNY8 WordPress Bridge
|
* Plugin Name: IGNY8 WordPress Bridge
|
||||||
* Plugin URI: https://igny8.com/igny8-wp-bridge
|
* Plugin URI: https://igny8.com/igny8-wp-bridge
|
||||||
* Description: Lightweight bridge plugin that connects WordPress to IGNY8 API for one-way content publishing.
|
* 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: IGNY8
|
||||||
* Author URI: https://igny8.com/
|
* Author URI: https://igny8.com/
|
||||||
* License: GPL v2 or later
|
* License: GPL v2 or later
|
||||||
@@ -22,7 +22,7 @@ if (!defined('ABSPATH')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define plugin constants
|
// 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_DIR', plugin_dir_path(__FILE__));
|
||||||
define('IGNY8_BRIDGE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
define('IGNY8_BRIDGE_PLUGIN_URL', plugin_dir_url(__FILE__));
|
||||||
define('IGNY8_BRIDGE_PLUGIN_FILE', __FILE__);
|
define('IGNY8_BRIDGE_PLUGIN_FILE', __FILE__);
|
||||||
|
|||||||
@@ -923,15 +923,73 @@
|
|||||||
|
|
||||||
/* === Landscape Image Card Fit === */
|
/* === Landscape Image Card Fit === */
|
||||||
.igny8-image-landscape-figure {
|
.igny8-image-landscape-figure {
|
||||||
width: fit-content;
|
width: 100%;
|
||||||
max-width: 100%;
|
max-width: none;
|
||||||
margin: 0 auto 2rem;
|
margin: 0 0 2rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.igny8-image-landscape-figure .igny8-image-landscape {
|
.igny8-image-landscape-figure .igny8-image-landscape {
|
||||||
max-width: 100%;
|
width: 100%;
|
||||||
width: auto;
|
max-width: none;
|
||||||
height: auto;
|
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) === */
|
/* === Blockquote Fix (prevent overlap with floated images) === */
|
||||||
|
|||||||
@@ -169,15 +169,16 @@ $reuse_pattern = [1, 0, 3, 2]; // Featured, Square1, Landscape2, Square2
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
// Square image (left or right aligned)
|
// Square image (left or right aligned) - 2 column layout
|
||||||
elseif ($img_url && $img_type === 'square') {
|
elseif ($img_url && $img_type === 'square') {
|
||||||
$img_class = 'igny8-image-square-' . $img_align;
|
$img_class = 'igny8-image-square-' . $img_align;
|
||||||
if (!$show_description) {
|
if (!$show_description) {
|
||||||
$img_class .= ' igny8-image-reuse';
|
$img_class .= ' igny8-image-reuse';
|
||||||
}
|
}
|
||||||
|
$section_class = 'igny8-section-content igny8-has-square-image igny8-image-' . $img_align;
|
||||||
?>
|
?>
|
||||||
<div class="igny8-section-content">
|
<div class="<?php echo esc_attr($section_class); ?>">
|
||||||
<figure class="igny8-image-figure <?php echo esc_attr($img_class); ?>">
|
<figure class="igny8-image-figure">
|
||||||
<img src="<?php echo esc_url($img_url); ?>"
|
<img src="<?php echo esc_url($img_url); ?>"
|
||||||
alt="<?php echo esc_attr($section['heading']); ?>"
|
alt="<?php echo esc_attr($section['heading']); ?>"
|
||||||
class="igny8-in-article-image"
|
class="igny8-in-article-image"
|
||||||
@@ -191,10 +192,6 @@ $reuse_pattern = [1, 0, 3, 2]; // Featured, Square1, Landscape2, Square2
|
|||||||
<div class="igny8-prose">
|
<div class="igny8-prose">
|
||||||
<?php echo $section['content']; ?>
|
<?php echo $section['content']; ?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
|
||||||
// Widget placeholder below square images
|
|
||||||
igny8_render_widget_placeholder($img_align, $index);
|
|
||||||
?>
|
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,14 +52,16 @@ if (!defined('ABSPATH')) {
|
|||||||
|
|
||||||
<!-- Topic (Cluster Name) -->
|
<!-- Topic (Cluster Name) -->
|
||||||
<?php if ($cluster_name):
|
<?php if ($cluster_name):
|
||||||
// Try to find a tag or category matching the cluster name for linking
|
// Create search URL for cluster name as fallback
|
||||||
$cluster_link = '';
|
$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');
|
$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);
|
$cluster_link = get_term_link($cluster_tag);
|
||||||
} else {
|
} else {
|
||||||
$cluster_cat = get_term_by('name', $cluster_name, 'category');
|
$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);
|
$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"/>
|
<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>
|
</svg>
|
||||||
<span class="igny8-meta-label">Topic:</span>
|
<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>
|
<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>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- Categories (with hierarchy) -->
|
<!-- Categories (each level separately clickable) -->
|
||||||
<?php if ($categories && !is_wp_error($categories)): ?>
|
<?php if ($categories && !is_wp_error($categories)): ?>
|
||||||
<div class="igny8-meta-item">
|
<div class="igny8-meta-item">
|
||||||
<svg class="igny8-icon" viewBox="0 0 20 20" fill="currentColor">
|
<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>
|
<span class="igny8-meta-label">Categories:</span>
|
||||||
<div class="igny8-meta-badges">
|
<div class="igny8-meta-badges">
|
||||||
<?php foreach ($categories as $cat):
|
<?php foreach ($categories as $cat):
|
||||||
// Build full hierarchy path
|
// Build full hierarchy path with each level clickable
|
||||||
$hierarchy = [];
|
$hierarchy = [];
|
||||||
$current_cat = $cat;
|
$current_cat = $cat;
|
||||||
while ($current_cat) {
|
while ($current_cat) {
|
||||||
array_unshift($hierarchy, $current_cat);
|
array_unshift($hierarchy, $current_cat);
|
||||||
$current_cat = $current_cat->parent ? get_category($current_cat->parent) : null;
|
$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">
|
<span class="igny8-category-badge">
|
||||||
<?php echo esc_html(implode(' › ', array_map(function($c) { return $c->name; }, $hierarchy))); ?>
|
<?php echo implode(' <span class="igny8-cat-separator">›</span> ', $hierarchy_links); ?>
|
||||||
</a>
|
</span>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -81,10 +81,7 @@ if (defined('WP_DEBUG') && WP_DEBUG) {
|
|||||||
include plugin_dir_path(__FILE__) . 'parts/igny8-featured-image.php';
|
include plugin_dir_path(__FILE__) . 'parts/igny8-featured-image.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Table of Contents
|
// Content sections (includes TOC in intro)
|
||||||
include plugin_dir_path(__FILE__) . 'parts/igny8-table-of-contents.php';
|
|
||||||
|
|
||||||
// Content sections
|
|
||||||
include plugin_dir_path(__FILE__) . 'parts/igny8-content-sections.php';
|
include plugin_dir_path(__FILE__) . 'parts/igny8-content-sections.php';
|
||||||
|
|
||||||
// Metadata footer
|
// Metadata footer
|
||||||
|
|||||||
Reference in New Issue
Block a user