Plugin Directory

Changeset 3630405


Ignore:
Timestamp:
07/31/2026 07:18:01 PM (3 months ago)
Author:
growthnation
Message:

Release version 1.3.1

Location:
growthnation
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • growthnation/tags/1.3.1/growthnation.php

    r3630221 r3630405  
    1111 * Plugin Name:       GrowthNation
    1212 * Description:       Secure integration to create and publish blog posts from GrowthNation to your WordPress site.
    13  * Version:           1.3.0
     13 * Version:           1.3.1
    1414 * Author:            growthnation
    1515 * Author URI:        https://growthnation.ai
    … …  
    948948
    949949        // Save FAQ JSON-LD schema as post meta — output via wp_head (kses-safe).
    950         if (!empty($faq_schema) && is_string($faq_schema)) {
    951             $decoded = json_decode($faq_schema, true);
     950        // The value arrives as either a JSON string or a decoded array/object
     951        // (WordPress REST auto-decodes the request body), so handle both.
     952        if (!empty($faq_schema)) {
     953            $schema_string = is_string($faq_schema)
     954                ? $faq_schema
     955                : wp_json_encode($faq_schema, JSON_UNESCAPED_SLASHES);
     956            $decoded = json_decode($schema_string, true);
    952957            if (json_last_error() === JSON_ERROR_NONE) {
    953                 update_post_meta($created_post_id, '_gn_faq_schema', wp_slash($faq_schema));
     958                update_post_meta($created_post_id, '_gn_faq_schema', wp_slash($schema_string));
    954959            }
    955960        }
  • growthnation/tags/1.3.1/readme.txt

    r3630221 r3630405  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.3.0
     7Stable tag: 1.3.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
  • growthnation/trunk/growthnation.php

    r3630221 r3630405  
    1111 * Plugin Name:       GrowthNation
    1212 * Description:       Secure integration to create and publish blog posts from GrowthNation to your WordPress site.
    13  * Version:           1.3.0
     13 * Version:           1.3.1
    1414 * Author:            growthnation
    1515 * Author URI:        https://growthnation.ai
    … …  
    948948
    949949        // Save FAQ JSON-LD schema as post meta — output via wp_head (kses-safe).
    950         if (!empty($faq_schema) && is_string($faq_schema)) {
    951             $decoded = json_decode($faq_schema, true);
     950        // The value arrives as either a JSON string or a decoded array/object
     951        // (WordPress REST auto-decodes the request body), so handle both.
     952        if (!empty($faq_schema)) {
     953            $schema_string = is_string($faq_schema)
     954                ? $faq_schema
     955                : wp_json_encode($faq_schema, JSON_UNESCAPED_SLASHES);
     956            $decoded = json_decode($schema_string, true);
    952957            if (json_last_error() === JSON_ERROR_NONE) {
    953                 update_post_meta($created_post_id, '_gn_faq_schema', wp_slash($faq_schema));
     958                update_post_meta($created_post_id, '_gn_faq_schema', wp_slash($schema_string));
    954959            }
    955960        }
  • growthnation/trunk/readme.txt

    r3630221 r3630405  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.3.0
     7Stable tag: 1.3.1
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
Note: See TracChangeset for help on using the changeset viewer.