Plugin Directory

Changeset 3441706


Ignore:
Timestamp:
01/17/2026 10:04:58 PM (3 months ago)
Author:
fahdi
Message:

Release CardCrafter v1.12.0 - Native WordPress Posts Integration with one-click blog post to card grid transformation

Location:
cardcrafter-data-grids
Files:
4 edited
23 copied

Legend:

Unmodified
Added
Removed
  • cardcrafter-data-grids/tags/1.12.0/CHANGELOG.md

    r3441236 r3441706  
    22
    33All notable changes to CardCrafter will be documented in this file.
     4
     5## [1.12.0] - 2026-01-17
     6
     7### 🆕 MAJOR: Native WordPress Posts Integration
     8- **NEW**: One-click WordPress Posts grid functionality with "Use WP Posts" button
     9- **NEW**: Automatic featured image, title, excerpt, and permalink extraction from WordPress posts
     10- **NEW**: Live preview of WordPress posts with all display options (search, filters, pagination)
     11- **NEW**: Enhanced AJAX endpoint `cardcrafter_wp_posts_preview` for real-time WordPress content
     12- **NEW**: Automatic cache clearing and debug mode for troubleshooting image issues
     13
     14### 🔧 Technical Improvements
     15- **IMPROVED**: Enhanced caching system with `cache_results => false` for fresh data
     16- **IMPROVED**: Fallback image handling (medium → full size → placeholder)
     17- **IMPROVED**: Debug information in AJAX responses for troubleshooting
     18- **PERFORMANCE**: Optimized WordPress queries with cache-busting mechanisms
     19- **ACCESSIBILITY**: WordPress posts include proper semantic structure and alt text
     20
     21### 🎯 User Experience
     22- **ENHANCED**: Admin interface now supports both JSON data and WordPress posts seamlessly
     23- **STREAMLINED**: Single-click integration for existing WordPress content
     24- **FLEXIBLE**: All existing display options work with WordPress posts (search, filters, export, etc.)
    425
    526## [1.9.0] - 2026-01-17
  • cardcrafter-data-grids/tags/1.12.0/assets/js/admin.js

    r3441692 r3441706  
    117117            container.innerHTML = `<div id="${cardId}" class="cardcrafter-container">${cardcrafterAdmin.i18n.loading}</div>`;
    118118
    119             // Use the secure proxy for admin previews too
    120             const proxyUrl = `${cardcrafterAdmin.ajaxurl}?action=cardcrafter_proxy_fetch&url=${encodeURIComponent(url)}&nonce=${cardcrafterAdmin.nonce}`;
    121 
    122119            // Get additional options
    123120            const enableSearch = document.getElementById('cc-enable-search');
     
    131128            const itemsPerPage = document.getElementById('cc-items-per-page');
    132129
     130            // Determine source URL based on whether it's wp_posts or external URL
     131            let sourceUrl;
     132            if (url === 'wp_posts') {
     133                // For WordPress posts, use a special AJAX endpoint
     134                sourceUrl = `${cardcrafterAdmin.ajaxurl}?action=cardcrafter_wp_posts_preview&nonce=${cardcrafterAdmin.nonce}`;
     135            } else {
     136                // For external URLs, use the secure proxy
     137                sourceUrl = `${cardcrafterAdmin.ajaxurl}?action=cardcrafter_proxy_fetch&url=${encodeURIComponent(url)}&nonce=${cardcrafterAdmin.nonce}`;
     138            }
     139
    133140            new CardCrafter({
    134141                selector: '#' + cardId,
    135                 source: proxyUrl,
     142                source: sourceUrl,
    136143                layout: layoutSelect.value,
    137144                columns: parseInt(columnsSelect.value),
     
    150157        }
    151158    });
     159
     160    // Use WP Posts functionality
     161    const wpPostsBtn = document.getElementById('cc-wp-posts-btn');
     162    if (wpPostsBtn) {
     163        wpPostsBtn.addEventListener('click', function() {
     164            // Set the source to use WordPress posts
     165            urlInput.value = 'wp_posts';
     166            updateShortcode();
     167           
     168            // Auto-trigger preview
     169            previewBtn.click();
     170        });
     171    }
    152172
    153173    // Copy shortcode functionality
  • cardcrafter-data-grids/tags/1.12.0/cardcrafter.php

    r3441692 r3441706  
    44 * Plugin URI: https://github.com/TableCrafter/cardcrafter-data-grids
    55 * Description: Transform JSON data into beautiful, responsive card grids. Perfect for team directories, product showcases, and portfolio displays.
    6  * Version: 1.11.0
     6 * Version: 1.12.0
    77 * Author: fahdi
    88 * Author URI: https://github.com/TableCrafter
     
    2121*/
    2222
    23 define('CARDCRAFTER_VERSION', '1.11.0');
     23define('CARDCRAFTER_VERSION', '1.12.0');
    2424define('CARDCRAFTER_URL', plugin_dir_url(__FILE__));
    2525define('CARDCRAFTER_PATH', plugin_dir_path(__FILE__));
     
    6464        add_action('wp_ajax_cardcrafter_proxy_fetch', array($this, 'ajax_proxy_fetch'));
    6565        add_action('wp_ajax_nopriv_cardcrafter_proxy_fetch', array($this, 'ajax_proxy_fetch'));
     66       
     67        // WordPress Posts Preview Handler
     68        add_action('wp_ajax_cardcrafter_wp_posts_preview', array($this, 'ajax_wp_posts_preview'));
    6669
    6770        // Background Caching
     
    953956
    954957    /**
     958     * AJAX handler for WordPress posts preview
     959     */
     960    public function ajax_wp_posts_preview()
     961    {
     962        // Verify nonce
     963        $nonce = isset($_REQUEST['nonce']) ? sanitize_text_field(wp_unslash($_REQUEST['nonce'])) : '';
     964        if (!wp_verify_nonce($nonce, 'cardcrafter_proxy_nonce')) {
     965            wp_send_json_error('Security check failed.');
     966        }
     967
     968        // Get recent posts (with cache busting)
     969        $posts = get_posts(array(
     970            'post_type' => 'post',
     971            'post_status' => 'publish',
     972            'posts_per_page' => 12,
     973            'orderby' => 'date',
     974            'order' => 'DESC',
     975            'cache_results' => false, // Disable caching for fresh results
     976            'no_found_rows' => true
     977        ));
     978
     979        if (empty($posts)) {
     980            wp_send_json_error('No WordPress posts found.');
     981        }
     982
     983        // Convert WordPress posts to CardCrafter data format
     984        $card_data = array();
     985        foreach ($posts as $post) {
     986            $featured_image = get_the_post_thumbnail_url($post->ID, 'medium');
     987           
     988            // Fallback to full size if medium doesn't exist
     989            if (!$featured_image) {
     990                $featured_image = get_the_post_thumbnail_url($post->ID, 'full');
     991            }
     992           
     993            $card_item = array(
     994                'id' => $post->ID,
     995                'title' => get_the_title($post->ID),
     996                'subtitle' => get_the_date('F j, Y', $post->ID),
     997                'description' => wp_trim_words(get_the_excerpt($post->ID), 20, '...'),
     998                'link' => get_permalink($post->ID),
     999                'image' => $featured_image ?: $this->get_placeholder_image(get_the_title($post->ID)),
     1000                'post_type' => $post->post_type,
     1001                'author' => get_the_author_meta('display_name', $post->post_author),
     1002                'debug_thumbnail_id' => get_post_thumbnail_id($post->ID), // Debug info
     1003                'debug_image_url' => $featured_image // Debug info
     1004            );
     1005
     1006            $card_data[] = $card_item;
     1007        }
     1008
     1009        wp_send_json_success($card_data);
     1010    }
     1011
     1012    /**
    9551013     * URL Analytics & Tracking.
    9561014     */
  • cardcrafter-data-grids/tags/1.12.0/readme.txt

    r3441692 r3441706  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.11.0
     7Stable tag: 1.12.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Transform JSON data into beautiful, responsive card grids. Perfect for team directories, product showcases, and portfolio displays.
     11Transform JSON data and WordPress posts into beautiful, responsive card grids. Perfect for team directories, product showcases, portfolio displays, and blog content.
    1212
    1313== Description ==
     
    1515Don't take our word for it, try CardCrafter live. **[Full-featured demo](https://tastewp.com/plugins/cardcrafter-data-grids)** on a real WordPress site. No signup, no download, no risk.
    1616
    17 **CardCrafter** is the #1 WordPress plugin for displaying data as beautiful card grids. Transform your WordPress posts, JSON data, and custom content into professional, responsive card layouts. No coding required.
     17**CardCrafter** is the #1 WordPress plugin for displaying data as beautiful card grids. Transform your **WordPress posts**, JSON data, and custom content into professional, responsive card layouts. No coding required.
     18
     19🆕 **NEW in v1.12.0:** Native WordPress Posts integration! Display your blog posts, pages, or custom post types as stunning card grids with featured images, excerpts, and automatic formatting.
    1820
    1921**Perfect for:**
     
    3840
    3941*   **🧱 Gutenberg Block:** Native WordPress block editor support with visual configuration.
     42*   **📝 WordPress Posts Grid:** Transform your blog posts into beautiful card layouts with one click.
    4043*   **Instant Search & Sort:** Users can filter and sort cards instantly (Client-side).
    4144*   **Multiple Layouts:** Grid, Masonry, and List views to suit your content.
     
    167170== Changelog ==
    168171
     172= 1.12.0 =
     173* MAJOR: Native WordPress Posts integration - display blog posts as beautiful card grids
     174* NEW: "Use WP Posts" button in admin for one-click WordPress content integration
     175* NEW: Automatic featured image, title, excerpt, and permalink extraction from WordPress posts
     176* NEW: Live preview of WordPress posts with all display options (search, filters, pagination)
     177* IMPROVED: Enhanced caching system with automatic cache clearing for fresh data
     178* IMPROVED: Debug mode for troubleshooting image and thumbnail issues
     179* ACCESSIBILITY: WordPress posts automatically include proper alt text and semantic structure
     180* PERFORMANCE: Optimized queries with cache-busting for real-time preview updates
     181
    169182= 1.11.0 =
    170183* MAJOR: Enhanced admin UI with modern design and comprehensive display options
  • cardcrafter-data-grids/trunk/CHANGELOG.md

    r3441236 r3441706  
    22
    33All notable changes to CardCrafter will be documented in this file.
     4
     5## [1.12.0] - 2026-01-17
     6
     7### 🆕 MAJOR: Native WordPress Posts Integration
     8- **NEW**: One-click WordPress Posts grid functionality with "Use WP Posts" button
     9- **NEW**: Automatic featured image, title, excerpt, and permalink extraction from WordPress posts
     10- **NEW**: Live preview of WordPress posts with all display options (search, filters, pagination)
     11- **NEW**: Enhanced AJAX endpoint `cardcrafter_wp_posts_preview` for real-time WordPress content
     12- **NEW**: Automatic cache clearing and debug mode for troubleshooting image issues
     13
     14### 🔧 Technical Improvements
     15- **IMPROVED**: Enhanced caching system with `cache_results => false` for fresh data
     16- **IMPROVED**: Fallback image handling (medium → full size → placeholder)
     17- **IMPROVED**: Debug information in AJAX responses for troubleshooting
     18- **PERFORMANCE**: Optimized WordPress queries with cache-busting mechanisms
     19- **ACCESSIBILITY**: WordPress posts include proper semantic structure and alt text
     20
     21### 🎯 User Experience
     22- **ENHANCED**: Admin interface now supports both JSON data and WordPress posts seamlessly
     23- **STREAMLINED**: Single-click integration for existing WordPress content
     24- **FLEXIBLE**: All existing display options work with WordPress posts (search, filters, export, etc.)
    425
    526## [1.9.0] - 2026-01-17
  • cardcrafter-data-grids/trunk/assets/js/admin.js

    r3441692 r3441706  
    117117            container.innerHTML = `<div id="${cardId}" class="cardcrafter-container">${cardcrafterAdmin.i18n.loading}</div>`;
    118118
    119             // Use the secure proxy for admin previews too
    120             const proxyUrl = `${cardcrafterAdmin.ajaxurl}?action=cardcrafter_proxy_fetch&url=${encodeURIComponent(url)}&nonce=${cardcrafterAdmin.nonce}`;
    121 
    122119            // Get additional options
    123120            const enableSearch = document.getElementById('cc-enable-search');
     
    131128            const itemsPerPage = document.getElementById('cc-items-per-page');
    132129
     130            // Determine source URL based on whether it's wp_posts or external URL
     131            let sourceUrl;
     132            if (url === 'wp_posts') {
     133                // For WordPress posts, use a special AJAX endpoint
     134                sourceUrl = `${cardcrafterAdmin.ajaxurl}?action=cardcrafter_wp_posts_preview&nonce=${cardcrafterAdmin.nonce}`;
     135            } else {
     136                // For external URLs, use the secure proxy
     137                sourceUrl = `${cardcrafterAdmin.ajaxurl}?action=cardcrafter_proxy_fetch&url=${encodeURIComponent(url)}&nonce=${cardcrafterAdmin.nonce}`;
     138            }
     139
    133140            new CardCrafter({
    134141                selector: '#' + cardId,
    135                 source: proxyUrl,
     142                source: sourceUrl,
    136143                layout: layoutSelect.value,
    137144                columns: parseInt(columnsSelect.value),
     
    150157        }
    151158    });
     159
     160    // Use WP Posts functionality
     161    const wpPostsBtn = document.getElementById('cc-wp-posts-btn');
     162    if (wpPostsBtn) {
     163        wpPostsBtn.addEventListener('click', function() {
     164            // Set the source to use WordPress posts
     165            urlInput.value = 'wp_posts';
     166            updateShortcode();
     167           
     168            // Auto-trigger preview
     169            previewBtn.click();
     170        });
     171    }
    152172
    153173    // Copy shortcode functionality
  • cardcrafter-data-grids/trunk/cardcrafter.php

    r3441692 r3441706  
    44 * Plugin URI: https://github.com/TableCrafter/cardcrafter-data-grids
    55 * Description: Transform JSON data into beautiful, responsive card grids. Perfect for team directories, product showcases, and portfolio displays.
    6  * Version: 1.11.0
     6 * Version: 1.12.0
    77 * Author: fahdi
    88 * Author URI: https://github.com/TableCrafter
     
    2121*/
    2222
    23 define('CARDCRAFTER_VERSION', '1.11.0');
     23define('CARDCRAFTER_VERSION', '1.12.0');
    2424define('CARDCRAFTER_URL', plugin_dir_url(__FILE__));
    2525define('CARDCRAFTER_PATH', plugin_dir_path(__FILE__));
     
    6464        add_action('wp_ajax_cardcrafter_proxy_fetch', array($this, 'ajax_proxy_fetch'));
    6565        add_action('wp_ajax_nopriv_cardcrafter_proxy_fetch', array($this, 'ajax_proxy_fetch'));
     66       
     67        // WordPress Posts Preview Handler
     68        add_action('wp_ajax_cardcrafter_wp_posts_preview', array($this, 'ajax_wp_posts_preview'));
    6669
    6770        // Background Caching
     
    953956
    954957    /**
     958     * AJAX handler for WordPress posts preview
     959     */
     960    public function ajax_wp_posts_preview()
     961    {
     962        // Verify nonce
     963        $nonce = isset($_REQUEST['nonce']) ? sanitize_text_field(wp_unslash($_REQUEST['nonce'])) : '';
     964        if (!wp_verify_nonce($nonce, 'cardcrafter_proxy_nonce')) {
     965            wp_send_json_error('Security check failed.');
     966        }
     967
     968        // Get recent posts (with cache busting)
     969        $posts = get_posts(array(
     970            'post_type' => 'post',
     971            'post_status' => 'publish',
     972            'posts_per_page' => 12,
     973            'orderby' => 'date',
     974            'order' => 'DESC',
     975            'cache_results' => false, // Disable caching for fresh results
     976            'no_found_rows' => true
     977        ));
     978
     979        if (empty($posts)) {
     980            wp_send_json_error('No WordPress posts found.');
     981        }
     982
     983        // Convert WordPress posts to CardCrafter data format
     984        $card_data = array();
     985        foreach ($posts as $post) {
     986            $featured_image = get_the_post_thumbnail_url($post->ID, 'medium');
     987           
     988            // Fallback to full size if medium doesn't exist
     989            if (!$featured_image) {
     990                $featured_image = get_the_post_thumbnail_url($post->ID, 'full');
     991            }
     992           
     993            $card_item = array(
     994                'id' => $post->ID,
     995                'title' => get_the_title($post->ID),
     996                'subtitle' => get_the_date('F j, Y', $post->ID),
     997                'description' => wp_trim_words(get_the_excerpt($post->ID), 20, '...'),
     998                'link' => get_permalink($post->ID),
     999                'image' => $featured_image ?: $this->get_placeholder_image(get_the_title($post->ID)),
     1000                'post_type' => $post->post_type,
     1001                'author' => get_the_author_meta('display_name', $post->post_author),
     1002                'debug_thumbnail_id' => get_post_thumbnail_id($post->ID), // Debug info
     1003                'debug_image_url' => $featured_image // Debug info
     1004            );
     1005
     1006            $card_data[] = $card_item;
     1007        }
     1008
     1009        wp_send_json_success($card_data);
     1010    }
     1011
     1012    /**
    9551013     * URL Analytics & Tracking.
    9561014     */
  • cardcrafter-data-grids/trunk/readme.txt

    r3441692 r3441706  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.11.0
     7Stable tag: 1.12.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Transform JSON data into beautiful, responsive card grids. Perfect for team directories, product showcases, and portfolio displays.
     11Transform JSON data and WordPress posts into beautiful, responsive card grids. Perfect for team directories, product showcases, portfolio displays, and blog content.
    1212
    1313== Description ==
     
    1515Don't take our word for it, try CardCrafter live. **[Full-featured demo](https://tastewp.com/plugins/cardcrafter-data-grids)** on a real WordPress site. No signup, no download, no risk.
    1616
    17 **CardCrafter** is the #1 WordPress plugin for displaying data as beautiful card grids. Transform your WordPress posts, JSON data, and custom content into professional, responsive card layouts. No coding required.
     17**CardCrafter** is the #1 WordPress plugin for displaying data as beautiful card grids. Transform your **WordPress posts**, JSON data, and custom content into professional, responsive card layouts. No coding required.
     18
     19🆕 **NEW in v1.12.0:** Native WordPress Posts integration! Display your blog posts, pages, or custom post types as stunning card grids with featured images, excerpts, and automatic formatting.
    1820
    1921**Perfect for:**
     
    3840
    3941*   **🧱 Gutenberg Block:** Native WordPress block editor support with visual configuration.
     42*   **📝 WordPress Posts Grid:** Transform your blog posts into beautiful card layouts with one click.
    4043*   **Instant Search & Sort:** Users can filter and sort cards instantly (Client-side).
    4144*   **Multiple Layouts:** Grid, Masonry, and List views to suit your content.
     
    167170== Changelog ==
    168171
     172= 1.12.0 =
     173* MAJOR: Native WordPress Posts integration - display blog posts as beautiful card grids
     174* NEW: "Use WP Posts" button in admin for one-click WordPress content integration
     175* NEW: Automatic featured image, title, excerpt, and permalink extraction from WordPress posts
     176* NEW: Live preview of WordPress posts with all display options (search, filters, pagination)
     177* IMPROVED: Enhanced caching system with automatic cache clearing for fresh data
     178* IMPROVED: Debug mode for troubleshooting image and thumbnail issues
     179* ACCESSIBILITY: WordPress posts automatically include proper alt text and semantic structure
     180* PERFORMANCE: Optimized queries with cache-busting for real-time preview updates
     181
    169182= 1.11.0 =
    170183* MAJOR: Enhanced admin UI with modern design and comprehensive display options
Note: See TracChangeset for help on using the changeset viewer.