Skip to content

Commit

Permalink
Merge pull request #1228 from publishpress/release-3.5.8.2
Browse files Browse the repository at this point in the history
Release 3.5.8.2
  • Loading branch information
agapetry authored Apr 25, 2024
2 parents 311f15a + 9e1bbe0 commit cac2929
Show file tree
Hide file tree
Showing 13 changed files with 477 additions and 445 deletions.
17 changes: 12 additions & 5 deletions admin/admin-init_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,14 @@ function rvy_admin_init() {
|| (isset($_REQUEST['action']) && in_array($_REQUEST['action'], ['decline_revision']))
) {
$doaction = (!empty($_REQUEST['action']) && !is_numeric($_REQUEST['action'])) ? sanitize_key($_REQUEST['action']) : sanitize_key($_REQUEST['action2']);

if (isset($_REQUEST['action']) && in_array($_REQUEST['action'], ['decline_revision'])) {
check_admin_referer('bulk-revision-queue');
}

check_admin_referer('bulk-revision-queue');

if (!$url = str_replace('#038;', '&', wp_get_referer())) {
$url = admin_url("admin.php?page=revisionary-q");
}

$sendback = remove_query_arg( array('trashed', 'untrashed', 'submitted_count', 'declined_count', 'approved_count', 'published_count', 'deleted', 'locked', 'ids', 'posts', '_wp_nonce', '_wp_http_referer'), $url);
$sendback = remove_query_arg( array('trashed', 'untrashed', 'submitted_count', 'declined_count', 'approved_count', 'published_count', 'scheduled_count', 'unscheduled_count', 'deleted', 'locked', 'ids', 'posts', '_wp_nonce', '_wp_http_referer'), $url);

if ( 'delete_all' == $doaction ) {
// Prepare for deletion of all posts with a specified post status (i.e. Empty trash).
Expand Down Expand Up @@ -338,6 +336,15 @@ function rvy_admin_init() {
}
}

// Work around Nested Pages plugin assuming get_current_screen() function declaration
if (class_exists('NestedPages')) {
if (!function_exists('get_current_screen')) {
function get_current_screen() {
return false;
}
}
}

if ( !wp_delete_post($post_id, true) )
wp_die( esc_html__('Error in deleting.') );

Expand Down
8 changes: 4 additions & 4 deletions admin/post-editor-workflow-ui_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ public static function postLinkParams($args = []) {
'creatingCaption' => pp_revisions_status_label('draft-revision', 'submitting'),
'completedCaption' => pp_revisions_status_label('draft-revision', 'submitted'),
'completedLinkCaption' => (!empty($type_obj->public)) ? $preview_caption : '',
'completedURL' => (!empty($type_obj->public)) ? rvy_nc_url( add_query_arg('get_new_revision', $post->ID, get_permalink($post->ID))) : '',
'completedURL' => (!empty($type_obj->public)) ? rvy_nc_url( add_query_arg('get_new_revision', $post->ID, admin_url(''))) : '',
'completedEditLinkCaption' => $edit_caption,
'completedEditURL' => rvy_nc_url( add_query_arg('edit_new_revision', $post->ID, get_permalink($post->ID))),
'completedEditURL' => rvy_nc_url( add_query_arg(['edit_new_revision' => $post->ID, 'published_post' => $post->ID], admin_url('admin.php?page=revisionary-q'))),
'errorCaption' => esc_html__('Error Creating Revision', 'revisionary'),
'ajaxurl' => rvy_admin_url(''),
'update' => esc_html__('Update', 'revisionary'),
Expand All @@ -229,9 +229,9 @@ public static function postLinkParams($args = []) {
'scheduleDisabledTitle' => esc_attr(sprintf(esc_html__('For custom field changes, edit a scheduled %s.', 'revisionary'), strtolower(pp_revisions_status_label('draft-revision', 'basic')))),
'scheduledCaption' => pp_revisions_status_label('future-revision', 'submitted'),
'scheduledLinkCaption' => (!empty($type_obj->public)) ? $preview_caption : '',
'scheduledURL' => (!empty($type_obj->public)) ? rvy_nc_url( add_query_arg('get_new_revision', $post->ID, get_permalink($post->ID))) : '',
'scheduledURL' => (!empty($type_obj->public)) ? rvy_nc_url( add_query_arg('get_new_revision', $post->ID, admin_url(''))) : '',
'scheduledEditLinkCaption' => $edit_caption,
'scheduledEditURL' => rvy_nc_url( add_query_arg('edit_new_revision', $post->ID, get_permalink($post->ID))),
'scheduledEditURL' => rvy_nc_url( add_query_arg(['edit_new_revision' => $post->ID, 'published_post' => $post->ID], admin_url('admin.php?page=revisionary-q'))),
'update' => esc_html__('Update', 'revisionary'),
));

Expand Down
2 changes: 1 addition & 1 deletion admin/revision-action_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function rvy_revision_decline($revision_id = 0) {
}

if (!$batch_process) {
check_admin_referer( "submit-post_$post->ID|$revision->ID" );
check_admin_referer('decline-revision');
}

$status_obj = get_post_status_object( $revision->post_mime_type );
Expand Down
Binary file modified languages/revisionary-es_ES.mo
Binary file not shown.
Loading

0 comments on commit cac2929

Please sign in to comment.