Skip to content

Commit c725cae

Browse files
authored
Merge pull request #1216 from alleyinteractive/delete-issue
Prevent delete for revisions
2 parents e12365a + ab2aa57 commit c725cae

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

admin/class-admin-apple-post-sync.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ public function do_publish( $id, $post ) {
188188
public function do_delete( $id ) {
189189
$post = get_post( $id );
190190
if ( empty( $post->post_type )
191+
|| wp_is_post_revision( $id )
191192
|| ! current_user_can(
192193
/**
193194
* Filters the delete capability required to delete posts from Apple News.

apple-news.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Publish To Apple News
44
* Plugin URI: http://github.com/alleyinteractive/apple-news
55
* Description: Export and sync posts to Apple format.
6-
* Version: 2.6.2
6+
* Version: 2.6.3
77
* Author: Alley
88
* Author URI: https://alley.com
99
* Text Domain: apple-news

includes/class-apple-news.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Apple_News {
5050
* @var string
5151
* @access public
5252
*/
53-
public static string $version = '2.6.2';
53+
public static string $version = '2.6.3';
5454

5555
/**
5656
* Link to support for the plugin on WordPress.org.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "publish-to-apple-news",
3-
"version": "2.6.2",
3+
"version": "2.6.3",
44
"license": "GPLv3",
55
"main": "index.php",
66
"engines": {

readme.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Tags: publish, apple, news, iOS
55
Requires at least: 6.3
66
Tested up to: 6.7
77
Requires PHP: 8.0
8-
Stable tag: 2.6.2
8+
Stable tag: 2.6.3
99
License: GPLv3 or later
1010
License URI: https://www.gnu.org/licenses/gpl.html
1111

0 commit comments

Comments
 (0)