Changeset 3100899
- Timestamp:
- 06/11/2024 06:00:15 AM (10 months ago)
- Location:
- content-update-scheduler/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
content-update-scheduler/trunk/content-update-scheduler.php
r3100758 r3100899 8 8 * Author: Infinitnet 9 9 * Author URI: https://infinitnet.io/ 10 * Version: 1. 710 * Version: 1.8 11 11 * License: GPLv3 12 12 * Text Domain: content-update-scheduler … … 40 40 } 41 41 42 } 42 add_filter('manage_edit-' . $post_type . '_columns', array( 'ContentUpdateScheduler', 'manage_pages_columns' )); 43 add_action('manage_' . $post_type . '_posts_custom_column', array( 'ContentUpdateScheduler', 'manage_pages_custom_column' ), 10, 2); 44 } 45 46 // Ensure the column is added for WooCommerce products 47 add_filter('manage_edit-product_columns', array( 'ContentUpdateScheduler', 'manage_pages_columns' )); 48 add_action('manage_product_posts_custom_column', array( 'ContentUpdateScheduler', 'manage_pages_custom_column' ), 10, 2); 43 49 44 50 // Oxygen plugin active. … … 705 711 delete_post_meta($destination_post->ID, $key); // Delete existing meta to avoid duplicates 706 712 foreach ($values as $value) { 707 if (is_serialized($value)) { 708 $value = preg_replace_callback('/O:\d+:"([^"]+)"/', function ($matches) { 709 return class_exists($matches[1]) ? $matches[0] : 'O:8:"stdClass"'; 710 }, $value); 713 foreach ($values as $value) { 714 if (is_serialized($value)) { 715 $value = preg_replace_callback('/O:\d+:"([^"]+)"/', function ($matches) { 716 return class_exists($matches[1]) ? $matches[0] : 'O:8:"stdClass"'; 717 }, $value); 718 719 $unserialized_value = maybe_unserialize($value); 720 721 if (is_string($unserialized_value) && strpos($unserialized_value, 'O:8:"stdClass"') !== false) { 722 // Skip this meta entry if it contains undefined objects 723 error_log('Skipping meta entry for key: ' . $key . '. Unserialized value contains undefined objects.'); 724 continue 2; 725 } 726 } else { 727 $unserialized_value = $value; 728 } 711 729 712 $unserialized_value = maybe_unserialize($value); 730 if ($restore_references && is_string($unserialized_value) && strpos($unserialized_value, (string)$source_post->ID) !== false) { 731 $unserialized_value = str_replace((string)$source_post->ID, (string)$destination_post->ID, $unserialized_value); 732 } 713 733 714 if (is_string($unserialized_value) && strpos($unserialized_value, 'O:8:"stdClass"') !== false) { 715 // Skip this meta entry if it contains undefined objects 716 error_log('Skipping meta entry for key: ' . $key . '. Unserialized value contains undefined objects.'); 717 continue 2; 718 } 719 } else { 720 $unserialized_value = $value; 734 add_post_meta($destination_post->ID, $key, maybe_serialize($unserialized_value)); 721 735 } 722 723 if ($restore_references && is_string($unserialized_value) && strpos($unserialized_value, (string)$source_post->ID) !== false) {724 $unserialized_value = str_replace((string)$source_post->ID, (string)$destination_post->ID, $unserialized_value);725 }726 727 add_post_meta($destination_post->ID, $key, $unserialized_value);728 736 } 729 737 } -
content-update-scheduler/trunk/readme.txt
r3100687 r3100899 4 4 Requires at least: 3.7.0 5 5 Tested up to: 6.5.4 6 Stable tag: 1. 76 Stable tag: 1.8 7 7 Requires PHP: 5.3 8 8 License: GPLv3 … … 51 51 == Changelog == 52 52 53 === 1.8 === 54 * Various bug fixes 55 53 56 === 1.7 === 54 57 * Fixed fatal error when class definition of metadata is missing and skip copying over metadata entries that fail to unserialize
Note: See TracChangeset
for help on using the changeset viewer.