Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Update publish/update action language to clarify its use #1204

Merged
merged 5 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions admin/apple-actions/index/class-push.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 5 additions & 3 deletions admin/class-admin-apple-news-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down Expand Up @@ -202,7 +204,7 @@ public function column_title( $item ) {
$actions['push'] = sprintf(
"<a href='%s'>%s</a>",
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' )
);
}

Expand All @@ -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(
"<a title='%s' href='%s' class='delete-button'>%s</a>",
esc_html__( 'Delete from Apple News', 'apple-news' ),
Expand Down Expand Up @@ -328,7 +330,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' ),
]
);
}
Expand Down
4 changes: 2 additions & 2 deletions admin/partials/page-bulk-export.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

?>
<div class="wrap">
<h1><?php esc_html_e( 'Bulk Export Articles', 'apple-news' ); ?></h1>
<p><?php esc_html_e( "The following articles will be published to Apple News. Once started, it might take a while, please don't close the browser window.", 'apple-news' ); ?></p>
<h1><?php esc_html_e( 'Bulk Publish/Update Articles', 'apple-news' ); ?></h1>
<p><?php esc_html_e( "The following articles will be published to Apple News. Articles which are already published will be updated. Once started, it might take a while to complete. Please don't close the browser window or navigate away from this page.", 'apple-news' ); ?></p>
<?php
/**
* Allows for custom HTML to be printed before the bulk export table.
Expand Down
Loading