From 87b0e68a3cdbb98974f6799418dfcc7da38b177a Mon Sep 17 00:00:00 2001 From: Linnea Huxford <7308162+mslinnea@users.noreply.github.com> Date: Thu, 30 Jan 2025 09:27:19 -0800 Subject: [PATCH 1/6] Prevent delete for autosave --- admin/class-admin-apple-post-sync.php | 1 + 1 file changed, 1 insertion(+) diff --git a/admin/class-admin-apple-post-sync.php b/admin/class-admin-apple-post-sync.php index 247c789f..ae6c6735 100644 --- a/admin/class-admin-apple-post-sync.php +++ b/admin/class-admin-apple-post-sync.php @@ -188,6 +188,7 @@ public function do_publish( $id, $post ) { public function do_delete( $id ) { $post = get_post( $id ); if ( empty( $post->post_type ) + || wp_is_post_autosave( $id ) || ! current_user_can( /** * Filters the delete capability required to delete posts from Apple News. From 5c154595dbcd909c160e00fe45400c368798ef4b Mon Sep 17 00:00:00 2001 From: Linnea Huxford <7308162+mslinnea@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:05:22 -0800 Subject: [PATCH 2/6] Bump version --- apple-news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apple-news.php b/apple-news.php index e93a5ad2..4d0f01a8 100644 --- a/apple-news.php +++ b/apple-news.php @@ -3,7 +3,7 @@ * Plugin Name: Publish To Apple News * Plugin URI: http://github.com/alleyinteractive/apple-news * Description: Export and sync posts to Apple format. - * Version: 2.6.2 + * Version: 2.6.3 * Author: Alley * Author URI: https://alley.com * Text Domain: apple-news From a464a8e41f0a8f489dab1d9b89e976d64c25439b Mon Sep 17 00:00:00 2001 From: Linnea Huxford <7308162+mslinnea@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:45:28 -0800 Subject: [PATCH 3/6] Prevent deletes for all post revisions, not just autosaves --- admin/class-admin-apple-post-sync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/class-admin-apple-post-sync.php b/admin/class-admin-apple-post-sync.php index ae6c6735..1ae6b8f3 100644 --- a/admin/class-admin-apple-post-sync.php +++ b/admin/class-admin-apple-post-sync.php @@ -188,7 +188,7 @@ public function do_publish( $id, $post ) { public function do_delete( $id ) { $post = get_post( $id ); if ( empty( $post->post_type ) - || wp_is_post_autosave( $id ) + || wp_is_post_revision( $id ) || ! current_user_can( /** * Filters the delete capability required to delete posts from Apple News. From 9add1a627897188830484aaee51530bafe90b405 Mon Sep 17 00:00:00 2001 From: Linnea Huxford <7308162+mslinnea@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:47:39 -0800 Subject: [PATCH 4/6] Update version --- includes/class-apple-news.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-apple-news.php b/includes/class-apple-news.php index 9aa688cd..7ff60458 100644 --- a/includes/class-apple-news.php +++ b/includes/class-apple-news.php @@ -50,7 +50,7 @@ class Apple_News { * @var string * @access public */ - public static string $version = '2.6.2'; + public static string $version = '2.6.3'; /** * Link to support for the plugin on WordPress.org. From 2144fc0c5ffd25002508cba83993df5377c305be Mon Sep 17 00:00:00 2001 From: Linnea Huxford <7308162+mslinnea@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:48:11 -0800 Subject: [PATCH 5/6] Update version --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 46d0c548..354164c9 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: publish, apple, news, iOS Requires at least: 6.3 Tested up to: 6.7 Requires PHP: 8.0 -Stable tag: 2.6.2 +Stable tag: 2.6.3 License: GPLv3 or later License URI: https://www.gnu.org/licenses/gpl.html From ab2aa575eab4dac7019682dcca6a39d112db13d4 Mon Sep 17 00:00:00 2001 From: Linnea Huxford <7308162+mslinnea@users.noreply.github.com> Date: Mon, 10 Feb 2025 09:41:46 -0800 Subject: [PATCH 6/6] Bump version to 2.6.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 266a627f..c82bf173 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "publish-to-apple-news", - "version": "2.6.2", + "version": "2.6.3", "license": "GPLv3", "main": "index.php", "engines": {