Skip to content

Commit

Permalink
Make sure modal status label show the right label between Revision an…
Browse files Browse the repository at this point in the history
…d Post status
  • Loading branch information
olatechpro committed Jan 28, 2025
1 parent 43c8efb commit 564bd32
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion common/php/class-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -1078,11 +1078,12 @@ public function localize_post_data($localized_post_data, $post, $can_edit_post)
'filtered_title' => isset($post->filtered_title) ? $post->filtered_title : $post->post_title,
'post_status' => (function_exists('rvy_in_revision_workflow') && rvy_in_revision_workflow($post->ID)) ? $post->post_mime_type : $post->post_status,
'status_label' => $this->get_post_status_friendly_name($post->post_status),
'status_options' => $this->getUserAuthorizedPostStatusOptions($post->post_type, $post),
'status_field_label' => (function_exists('rvy_in_revision_workflow') && rvy_in_revision_workflow($post->ID)) ? esc_html__('Revision Status', 'publishpress') : esc_html__('Post Status', 'publishpress'),
'can_edit_post' => $can_edit_post ? 1 : 0,
'date_markup' => $can_edit_post ? $this->get_date_markup($post) : get_the_time(get_option("date_format"), $post->ID) . " " . get_the_time(get_option("time_format"), $post->ID),
'action_links' => $this->get_post_action_links($post, $can_edit_post),
'author_markup' => $this->get_author_markup($post, $can_edit_post),
'status_options' => $this->getUserAuthorizedPostStatusOptions($post->post_type, $post),
'post_content' => apply_filters('the_content', $post->post_content)
];

Expand Down
2 changes: 1 addition & 1 deletion modules/calendar/lib/async-calendar/js/Functions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export function openPostModal(post_id) {
// add post author meta
popup_content += '<div class="modal-taxonomy-info post-author"><span class="info-item">' + publishpressCalendarParams.strings.post_author + '</span><span class="info-item">' + post.author_markup + '</span></div>';
// add post status meta
popup_content += '<div class="modal-taxonomy-info post-modified"><span class="info-item">' + publishpressCalendarParams.strings.post_status_label + '</span>';
popup_content += '<div class="modal-taxonomy-info post-modified"><span class="info-item">' + post.status_field_label + '</span>';
popup_content += '<span class="info-item">';
if (can_edit_post) {
popup_content += '<select class="pp-modal-form-post-status">';
Expand Down
3 changes: 2 additions & 1 deletion modules/calendar/lib/async-calendar/js/index.min.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
2 changes: 1 addition & 1 deletion modules/efmigration/lib/js/efmigration.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 564bd32

Please sign in to comment.