From 3e539d2fdaf254105e51bcc0c289fd5aa49d4949 Mon Sep 17 00:00:00 2001 From: Scott Nelle Date: Wed, 27 Nov 2024 14:04:11 -0500 Subject: [PATCH 1/5] clarify that the bulk publish action can also be used to update settings --- admin/class-admin-apple-news-list-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/class-admin-apple-news-list-table.php b/admin/class-admin-apple-news-list-table.php index 676c878f..b73c0bd8 100644 --- a/admin/class-admin-apple-news-list-table.php +++ b/admin/class-admin-apple-news-list-table.php @@ -328,7 +328,7 @@ public function get_bulk_actions() { return apply_filters( 'apple_news_bulk_actions', [ - Admin_Apple_Index_Page::namespace_action( 'push' ) => __( 'Publish', 'apple-news' ), + Admin_Apple_Index_Page::namespace_action( 'push' ) => __( 'Publish/Update', 'apple-news' ), ] ); } From 5468f9afae03831cb6593919a2942f6c392cd37a Mon Sep 17 00:00:00 2001 From: Scott Nelle Date: Wed, 27 Nov 2024 14:04:50 -0500 Subject: [PATCH 2/5] clarify comment about how the plugin determines whether an article has changed since the last push --- admin/apple-actions/index/class-push.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/apple-actions/index/class-push.php b/admin/apple-actions/index/class-push.php index 6bed4414..9fa1d71c 100644 --- a/admin/apple-actions/index/class-push.php +++ b/admin/apple-actions/index/class-push.php @@ -169,9 +169,9 @@ private function is_post_in_sync( $json, $meta = [], $bundles = [] ) { /** * Allows for custom logic to determine if a post is in sync or not. * - * By default, the plugin simply compares the last modified time to the - * last time it was pushed to Apple News. If you want to apply custom - * logic, you can do that by modifying `$in_sync`. The most common use case + * By default, the plugin compares the checksum that is generated in this class + * with the checksum stored last time it was pushed to Apple News. If you want to apply + * custom logic, you can do that by modifying `$in_sync`. The most common use case * is to not update posts based on custom criteria. * * @param bool $in_sync Whether the current post is in sync or not. From af6c39f310f55509d2b2f331757d0a73a3e46f9e Mon Sep 17 00:00:00 2001 From: Scott Nelle Date: Tue, 10 Dec 2024 17:52:27 -0500 Subject: [PATCH 3/5] for articles with existing apple news ids display update instead of publish --- admin/class-admin-apple-news-list-table.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin/class-admin-apple-news-list-table.php b/admin/class-admin-apple-news-list-table.php index b73c0bd8..50345a28 100644 --- a/admin/class-admin-apple-news-list-table.php +++ b/admin/class-admin-apple-news-list-table.php @@ -172,6 +172,8 @@ public function column_title( $item ) { return; } + $apple_news_api_id = get_post_meta( $item->ID, 'apple_news_api_id', true ); + // Build the base URL. $base_url = add_query_arg( [ @@ -202,7 +204,7 @@ public function column_title( $item ) { $actions['push'] = sprintf( "%s", esc_url( Admin_Apple_Index_Page::action_query_params( 'push', $base_url ) ), - esc_html__( 'Publish', 'apple-news' ) + $apple_news_api_id ? esc_html__( 'Update', 'apple-news' ) : esc_html__( 'Publish', 'apple-news' ) ); } @@ -216,7 +218,7 @@ public function column_title( $item ) { } // Add the delete action, if required. - if ( get_post_meta( $item->ID, 'apple_news_api_id', true ) ) { + if ( $apple_news_api_id ) { $actions['delete'] = sprintf( "%s", esc_html__( 'Delete from Apple News', 'apple-news' ), From 42a7515b9e54dd8afbcc60ff6f4465a069ec8ad1 Mon Sep 17 00:00:00 2001 From: Scott Nelle Date: Tue, 10 Dec 2024 17:53:57 -0500 Subject: [PATCH 4/5] clarify language on bulk export page --- admin/partials/page-bulk-export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/partials/page-bulk-export.php b/admin/partials/page-bulk-export.php index de923e5d..df124637 100644 --- a/admin/partials/page-bulk-export.php +++ b/admin/partials/page-bulk-export.php @@ -12,7 +12,7 @@ ?>

-

+

Date: Tue, 10 Dec 2024 17:56:34 -0500 Subject: [PATCH 5/5] update bulk export page heading --- admin/partials/page-bulk-export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/partials/page-bulk-export.php b/admin/partials/page-bulk-export.php index df124637..790ca252 100644 --- a/admin/partials/page-bulk-export.php +++ b/admin/partials/page-bulk-export.php @@ -11,7 +11,7 @@ ?>
-

+