Plugin Directory

Changeset 3125360


Ignore:
Timestamp:
07/25/2024 02:38:52 PM (19 months ago)
Author:
schemaappnick
Message:

Release 2.2.3

Location:
schema-app-structured-data-for-schemaorg/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • schema-app-structured-data-for-schemaorg/trunk/hunch-schema.php

    r3119424 r3125360  
    55 * Plugin URI: http://www.schemaapp.com
    66 * Description: This plugin adds http://schema.org structured data to your website
    7  * Version: 2.2.2
     7 * Version: 2.2.3
    88 * Author: Schema App
    99 * Author URI: https://www.schemaapp.com
  • schema-app-structured-data-for-schemaorg/trunk/lib/SchemaEditor.php

    r3119424 r3125360  
    4949        if (current_user_can('edit_posts') || current_user_can('edit_pages')) {
    5050            add_action('add_meta_boxes', array($this, 'add_meta_box'));
    51             add_action('save_post', array($this, 'ActionSavePost'), 10, 3);
     51            add_action('post_updated', array($this, 'ActionPostUpdated'), 10, 3);
    5252        }
    5353    }
     
    279279    }
    280280
    281     public function ActionSavePost($PostId, $Post, $Update) {
     281    /**
     282     * This post_updated hook updates or deletes post-specific markup settings such as the Schema Type, and whether to
     283     * enable or disable the markup. It will not modify these settings for posts that are being put in the trash, or
     284     * posts that are being removed from the trash.
     285     *
     286     * @param int $PostId Post ID for the post
     287     * @param WP_Post $PostAfter The post after the update
     288     * @param WP_Post $PostBefore The post before the update
     289     * @return int|void
     290     */
     291    public function ActionPostUpdated($PostId, $PostAfter, $PostBefore) {
    282292        if (( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || wp_is_post_revision($PostId)) {
    283293            return $PostId;
    284294        }
    285295
    286         $PostType = $Post->post_type;
     296        $PostType = $PostAfter->post_type;
    287297        $PostTypes = $this->PostTypes;
    288298        $PostTypes = apply_filters( 'hunch_schema_meta_box_post_types', $PostTypes, $PostType );
    289299
     300        // If this is a trash or untrash action we ignore this
     301        $TrashOrUnTrash = ( $PostAfter->post_status == 'trash' || $PostBefore->post_status == 'trash' );
     302
    290303        if (in_array($PostType, $PostTypes)) {
    291             if ( $Update && !wp_verify_nonce($_POST['schema_inner_custom_box_nonce'], 'schema_inner_custom_box') ) {
     304            if (
     305                !wp_verify_nonce($_POST['schema_inner_custom_box_nonce'], 'schema_inner_custom_box') &&
     306                !$TrashOrUnTrash
     307            ) {
    292308                print wp_json_encode([
    293309                    'Status' => 'Error',
  • schema-app-structured-data-for-schemaorg/trunk/readme.txt

    r3119424 r3125360  
    88Requires at least: 4.4
    99Requires PHP: 5.4
    10 Tested up to: 6.5
    11 Stable tag: 2.2.2
     10Tested up to: 6.6
     11Stable tag: 2.2.3
    1212License: GPL2
    1313License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8181== Changelog ==
    8282
     83= 2.2.3 =
     84Release Date - 25 July 2024
     85
     86- Fix, Resolved issue with Editor meta box nonce check showing error when moving posts to or from trash
     87
    8388= 2.2.2 =
    8489Release Date - 16 July 2024
Note: See TracChangeset for help on using the changeset viewer.