Plugin Directory

Changeset 3485183


Ignore:
Timestamp:
03/18/2026 12:02:43 AM (2 weeks ago)
Author:
rankauthority
Message:

Release 1.0.35: return schema on put whether request contains schema or not

Location:
rank-authority
Files:
9 added
2 edited

Legend:

Unmodified
Added
Removed
  • rank-authority/trunk/rank-authority.php

    r3485164 r3485183  
    44 * Plugin URI: https://rankauthority.com/plugins/rankauthority
    55 * Description: Secure API connector to publish posts / overwrite posts from the RA Dashboard to WordPress. Token reset now available to all administrators.
    6  * Version: 1.0.34
     6 * Version: 1.0.35
    77 * Author: Rank Authority
    88 * Author URI: https://rankauthority.com
     
    21672167            'cleared_builder_meta' => $cleared_builder_meta,
    21682168        ];
    2169         if (isset($params['schema']) && !empty($params['schema'])) {
    2170             $stored_schema = get_post_meta($updated_id, '_rank_authority_schema', true);
    2171             $schema_type = get_post_meta($updated_id, '_rank_authority_schema_type', true);
    2172             if ($stored_schema) {
    2173                 if ($schema_type === 'json') {
    2174                     $decoded = json_decode($stored_schema, true);
    2175                     $response['schema'] = json_last_error() === JSON_ERROR_NONE ? $decoded : $stored_schema;
    2176                 } else {
    2177                     $response['schema'] = $stored_schema;
    2178                 }
    2179             }
     2169        $stored_schema = get_post_meta($updated_id, '_rank_authority_schema', true);
     2170        $schema_type = get_post_meta($updated_id, '_rank_authority_schema_type', true);
     2171        if ($stored_schema) {
     2172            if ($schema_type === 'json') {
     2173                $decoded = json_decode($stored_schema, true);
     2174                $response['schema'] = json_last_error() === JSON_ERROR_NONE ? $decoded : $stored_schema;
     2175            } else {
     2176                $response['schema'] = $stored_schema;
     2177            }
     2178        } else {
     2179            $response['schema'] = null;
    21802180        }
    21812181        return $response;
  • rank-authority/trunk/readme.txt

    r3485164 r3485183  
    55Tested up to: 6.9
    66Requires PHP: 7.4
    7 Stable tag: 1.0.34
     7Stable tag: 1.0.35
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    137137
    138138== Changelog ==
     139
     140= 1.0.35 =
     141* PUT response now always includes schema (stored schema or null)
     142* Previously schema was only included when schema was sent in the request
    139143
    140144= 1.0.34 =
     
    342346== Upgrade Notice ==
    343347
     348= 1.0.35 =
     349PUT response now always includes schema for consistency. Use the response to verify stored structured data regardless of whether schema was sent in the request.
     350
    344351= 1.0.34 =
    345352Schema enhancements: publisher name and author now use your WordPress site name and post author. Structured data will reflect your site's branding and authorship.
Note: See TracChangeset for help on using the changeset viewer.