Changeset 3125360
- Timestamp:
- 07/25/2024 02:38:52 PM (19 months ago)
- Location:
- schema-app-structured-data-for-schemaorg/trunk
- Files:
-
- 3 edited
-
hunch-schema.php (modified) (1 diff)
-
lib/SchemaEditor.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
schema-app-structured-data-for-schemaorg/trunk/hunch-schema.php
r3119424 r3125360 5 5 * Plugin URI: http://www.schemaapp.com 6 6 * Description: This plugin adds http://schema.org structured data to your website 7 * Version: 2.2. 27 * Version: 2.2.3 8 8 * Author: Schema App 9 9 * Author URI: https://www.schemaapp.com -
schema-app-structured-data-for-schemaorg/trunk/lib/SchemaEditor.php
r3119424 r3125360 49 49 if (current_user_can('edit_posts') || current_user_can('edit_pages')) { 50 50 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); 52 52 } 53 53 } … … 279 279 } 280 280 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) { 282 292 if (( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) || wp_is_post_revision($PostId)) { 283 293 return $PostId; 284 294 } 285 295 286 $PostType = $Post ->post_type;296 $PostType = $PostAfter->post_type; 287 297 $PostTypes = $this->PostTypes; 288 298 $PostTypes = apply_filters( 'hunch_schema_meta_box_post_types', $PostTypes, $PostType ); 289 299 300 // If this is a trash or untrash action we ignore this 301 $TrashOrUnTrash = ( $PostAfter->post_status == 'trash' || $PostBefore->post_status == 'trash' ); 302 290 303 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 ) { 292 308 print wp_json_encode([ 293 309 'Status' => 'Error', -
schema-app-structured-data-for-schemaorg/trunk/readme.txt
r3119424 r3125360 8 8 Requires at least: 4.4 9 9 Requires PHP: 5.4 10 Tested up to: 6. 511 Stable tag: 2.2. 210 Tested up to: 6.6 11 Stable tag: 2.2.3 12 12 License: GPL2 13 13 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 81 81 == Changelog == 82 82 83 = 2.2.3 = 84 Release 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 83 88 = 2.2.2 = 84 89 Release Date - 16 July 2024
Note: See TracChangeset
for help on using the changeset viewer.