From ce3f08b20a9edb6ea209bdb38024126552f879a6 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 17:31:29 -0400 Subject: [PATCH 01/24] Revision Queue: PHP Notice PHP Notice "Undefined variable: post_id" when URL includes published_post argument Fixes #203 --- admin/class-list-table_rvy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/class-list-table_rvy.php b/admin/class-list-table_rvy.php index b89e2755..2d4b3c2f 100644 --- a/admin/class-list-table_rvy.php +++ b/admin/class-list-table_rvy.php @@ -34,7 +34,7 @@ public function __construct($args = []) { remove_action('the_post', [$multiple_authors_addon, 'fix_post'], 10); } - if (!empty($_REQUEST['published_post']) && !get_post_meta($post_id, '_rvy_has_revisions', true)) { + if (!empty($_REQUEST['published_post']) && !get_post_meta($_REQUEST['published_post'], '_rvy_has_revisions', true)) { revisionary_refresh_postmeta($_REQUEST['published_post']); } } From 64a8482378fe03cc94bca3697fd5bd9319eb8de2 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 17:43:54 -0400 Subject: [PATCH 02/24] Prevent plugin conflicts from excluding revisions from queue New "Revision Queue" settings section includes "Compatibility Mode". The only drawback is the possibility of a slower Revision Queue query on sites with a large number of posts. Closes #205 --- admin/class-list-table_rvy.php | 4 ++- admin/options.php | 50 ++++++++++++++++++++++++++-------- defaults_rvy.php | 2 ++ 3 files changed, 43 insertions(+), 13 deletions(-) diff --git a/admin/class-list-table_rvy.php b/admin/class-list-table_rvy.php index 2d4b3c2f..9a2ed2eb 100644 --- a/admin/class-list-table_rvy.php +++ b/admin/class-list-table_rvy.php @@ -62,7 +62,9 @@ function do_query( $q = false ) { $qp['posts_per_page'] = -1; $qp['fields'] = 'ids'; - $qp['meta_key'] = '_rvy_has_revisions'; + if (!rvy_get_option('queue_query_all_posts')) { // support defeat of performance enhancement in case _has_revisions flag is not being stored reliably due to plugin integration issues + $qp['meta_key'] = '_rvy_has_revisions'; + } if (!empty($q['post_author'])) { do_action('revisionary_queue_pre_query'); diff --git a/admin/options.php b/admin/options.php index c24ede54..da53c9f6 100644 --- a/admin/options.php +++ b/admin/options.php @@ -98,6 +98,7 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { 'role_definition' => __('Role Definition', 'revisionary'), 'scheduled_revisions' => __('Scheduled Revisions', 'revisionary'), 'pending_revisions' => __('Pending Revisions', 'revisionary'), + 'revision_queue' => __('Revision Queue', 'revisionary'), 'preview' => __('Preview / Approval', 'revisionary'), 'revisions' => __('Revision Options', 'revisionary'), 'notification' => __('Email Notification', 'revisionary') @@ -105,11 +106,13 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { ); // TODO: replace individual _e calls with these (and section, tab captions) -$this->option_captions = apply_filters('revisionary_option_captions', array( +$this->option_captions = apply_filters('revisionary_option_captions', + [ 'pending_revisions' => __('Enable Pending Revisions', 'revisionary'), 'scheduled_revisions' => __('Enable Scheduled Revisions', 'revisionary'), 'revisor_lock_others_revisions' => __("Prevent Revisors from editing others' revisions", 'revisionary'), 'revisor_hide_others_revisions' => __("Prevent Revisors from viewing others' revisions", 'revisionary'), + 'queue_query_all_posts' => __('Compatibility Mode', 'revisionary'), 'trigger_post_update_actions' => __('Revision publication triggers API actions to mimic post update', 'revisionary'), 'diff_display_strip_tags' => __('Strip html tags out of difference display', 'revisionary'), 'async_scheduled_publish' => __('Asynchronous Publishing', 'revisionary'), @@ -128,7 +131,8 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { 'preview_link_type' => __('Preview Link Type', 'revisionary'), 'compare_revisions_direct_approval' => __('Approve Button on Compare Revisions screen', 'revisionary'), 'copy_revision_comments_to_post' => __('Copy revision comments to published post', 'revisionary'), -)); + ] +); if ( defined('RVY_CONTENT_ROLES') ) { @@ -148,8 +152,9 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { 'role_definition' => array( 'revisor_role_add_custom_rolecaps', 'require_edit_others_drafts' ), 'scheduled_revisions' => array( 'scheduled_revisions', 'async_scheduled_publish', 'scheduled_revision_update_post_date', ), 'pending_revisions' => array( 'pending_revisions', 'pending_revision_update_post_date', ), + 'revision_queue' => ['revisor_lock_others_revisions', 'revisor_hide_others_revisions', 'queue_query_all_posts'], 'preview' => array( 'revision_preview_links', 'preview_link_type', 'compare_revisions_direct_approval'), - 'revisions' => array( 'revisor_lock_others_revisions', 'revisor_hide_others_revisions', 'trigger_post_update_actions', 'copy_revision_comments_to_post', 'diff_display_strip_tags', 'display_hints' ), + 'revisions' => ['trigger_post_update_actions', 'copy_revision_comments_to_post', 'diff_display_strip_tags', 'display_hints'], 'notification' => array( 'pending_rev_notify_admin', 'pending_rev_notify_author', 'rev_approval_notify_admin', 'rev_approval_notify_author', 'rev_approval_notify_revisor', 'publish_scheduled_notify_admin', 'publish_scheduled_notify_author', 'publish_scheduled_notify_revisor', 'use_notification_buffer' ) ] ]); @@ -374,6 +379,36 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { endif; +if ( // To avoid confusion, don't display any revision settings if pending revisions / scheduled revisions are unavailable + $pending_revisions_available || $scheduled_revisions_available ) : + + $section = 'revision_queue'; // --- REVISION QUEUE SECTION --- + + if ( ! empty( $this->form_options[$tab][$section] ) ) :?> + + section_captions[$tab][$section]; ?> + + + option_checkbox( 'revisor_lock_others_revisions', $tab, $section, $hint, '' ); + + $hint = __('This restriction applies to users who are not full editors for the post type. To enable a role, give it the list_others_revisions capability.', 'revisionary'); + $this->option_checkbox( 'revisor_hide_others_revisions', $tab, $section, $hint, '' ); + + $hint = __('If some revisions are missing from the queue, disable a performance enhancement for better compatibility with themes and plugins.', 'revisionary'); + $this->option_checkbox( 'queue_query_all_posts', $tab, $section, $hint, '' ); + ?> + +

+ +

+ + + form_options[$tab][$section] ) ) :?> @@ -444,12 +479,6 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { option_checkbox( 'revisor_lock_others_revisions', $tab, $section, $hint, '' ); - - $hint = __('This restriction applies to users who are not full editors for the post type. To enable a role, give it the list_others_revisions capability.', 'revisionary'); - $this->option_checkbox( 'revisor_hide_others_revisions', $tab, $section, $hint, '' ); - $hint = __('This may improve compatibility with some plugins.', 'revisionary'); $this->option_checkbox( 'trigger_post_update_actions', $tab, $section, $hint, '' ); @@ -463,9 +492,6 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { $this->option_checkbox( 'display_hints', $tab, $section, $hint, '' ); ?> -

- -

true, 'revisor_lock_others_revisions' => true, 'revisor_hide_others_revisions' => true, + 'queue_query_all_posts' => true, 'require_edit_others_drafts' => true, 'diff_display_strip_tags' => false, 'scheduled_revision_update_post_date' => true, @@ -68,6 +69,7 @@ function rvy_default_options() { 'revisor_role_add_custom_rolecaps' => 1, 'revisor_lock_others_revisions' => 1, 'revisor_hide_others_revisions' => 1, + 'queue_query_all_posts' => 0, 'require_edit_others_drafts' => 1, 'diff_display_strip_tags' => 0, 'scheduled_revision_update_post_date' => 1, From b75f017bb09471f088e91ee27c7261d0d452b003 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 17:48:17 -0400 Subject: [PATCH 03/24] Public Post Preview - Author selector hidden in post editor Fixes #207 --- admin/admin_rvy.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/admin/admin_rvy.php b/admin/admin_rvy.php index e53a8154..71523314 100644 --- a/admin/admin_rvy.php +++ b/admin/admin_rvy.php @@ -568,17 +568,19 @@ function admin_scripts() { function admin_print_scripts() { if (class_exists('DS_Public_Post_Preview')) { - ?> - - + + Date: Thu, 22 Oct 2020 18:20:01 -0400 Subject: [PATCH 04/24] Public Post Preview integration: published post redirect Public Post Preview plugin: Make previews of published revisions redirect to the published post. --- front_rvy.php | 18 ++++++++++++++++++ revisionary_main.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/front_rvy.php b/front_rvy.php index 296c6f22..e5af7ac0 100644 --- a/front_rvy.php +++ b/front_rvy.php @@ -12,6 +12,24 @@ function __construct() { if (defined('PUBLISHPRESS_MULTIPLE_AUTHORS_VERSION')) { add_filter('the_author', [$this, 'fltAuthor'], 20); } + + if (!empty($_REQUEST['_ppp'])) { + add_action('template_redirect', [$this, 'actRevisionPreviewRedirect'], 1); + } + } + + public function actRevisionPreviewRedirect() { + if (!class_exists('DS_Public_Post_Preview')) { + return; + } + + if ($_post = get_post(rvy_detect_post_id())) { + if (('revision' == $_post->post_type) && ('inherit' == $_post->post_status)) { + if ($url = get_permalink(rvy_post_id($_post->ID))) { + wp_redirect($url); + } + } + } } public function fltAuthor($display_name) { diff --git a/revisionary_main.php b/revisionary_main.php index ffa1d78c..95491711 100644 --- a/revisionary_main.php +++ b/revisionary_main.php @@ -55,7 +55,7 @@ function __construct() { rvy_refresh_options_sitewide(); // NOTE: $_GET['preview'] and $_GET['post_type'] arguments are set by rvy_init() at response to ?p= request when the requested post is a revision. - if (!is_admin() && (!defined('REST_REQUEST') || ! REST_REQUEST) && ((!empty($_GET['preview']) && empty($_REQUEST['preview_id'])) || !empty($_GET['mark_current_revision']))) { // preview_id indicates a regular preview via WP core, based on autosave revision + if (!is_admin() && (!defined('REST_REQUEST') || ! REST_REQUEST) && (((!empty($_GET['preview']) || !empty($_GET['_ppp'])) && empty($_REQUEST['preview_id'])) || !empty($_GET['mark_current_revision']))) { // preview_id indicates a regular preview via WP core, based on autosave revision require_once( dirname(__FILE__).'/front_rvy.php' ); $this->front = new RevisionaryFront(); } From 3593e73c9189f973fed804f46b00b689d4ee9ba8 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:22:03 -0400 Subject: [PATCH 05/24] Change arrays to short syntax near other recent changes --- admin/options.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/admin/options.php b/admin/options.php index da53c9f6..f1dc6f73 100644 --- a/admin/options.php +++ b/admin/options.php @@ -148,14 +148,14 @@ function options_ui( $sitewide = false, $customize_defaults = false ) { $this->form_options = apply_filters('revisionary_option_sections', [ 'features' => [ - 'license' => array( 'edd_key' ), - 'role_definition' => array( 'revisor_role_add_custom_rolecaps', 'require_edit_others_drafts' ), - 'scheduled_revisions' => array( 'scheduled_revisions', 'async_scheduled_publish', 'scheduled_revision_update_post_date', ), - 'pending_revisions' => array( 'pending_revisions', 'pending_revision_update_post_date', ), + 'license' => ['edd_key'], + 'role_definition' => ['revisor_role_add_custom_rolecaps', 'require_edit_others_drafts'], + 'scheduled_revisions' => ['scheduled_revisions', 'async_scheduled_publish', 'scheduled_revision_update_post_date'], + 'pending_revisions' => ['pending_revisions', 'pending_revision_update_post_date'], 'revision_queue' => ['revisor_lock_others_revisions', 'revisor_hide_others_revisions', 'queue_query_all_posts'], - 'preview' => array( 'revision_preview_links', 'preview_link_type', 'compare_revisions_direct_approval'), + 'preview' => ['revision_preview_links', 'preview_link_type', 'compare_revisions_direct_approval'], 'revisions' => ['trigger_post_update_actions', 'copy_revision_comments_to_post', 'diff_display_strip_tags', 'display_hints'], - 'notification' => array( 'pending_rev_notify_admin', 'pending_rev_notify_author', 'rev_approval_notify_admin', 'rev_approval_notify_author', 'rev_approval_notify_revisor', 'publish_scheduled_notify_admin', 'publish_scheduled_notify_author', 'publish_scheduled_notify_revisor', 'use_notification_buffer' ) + 'notification' => ['pending_rev_notify_admin', 'pending_rev_notify_author', 'rev_approval_notify_admin', 'rev_approval_notify_author', 'rev_approval_notify_revisor', 'publish_scheduled_notify_admin', 'publish_scheduled_notify_author', 'publish_scheduled_notify_revisor', 'use_notification_buffer'], ] ]); From 2fb6fdfa3ad0bb22de8f416203913f751e40113e Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:27:02 -0400 Subject: [PATCH 06/24] Provide a way to disable revision submission redirect Support constants REVISIONARY_DISABLE_SUBMISSION_REDIRECT, REVISIONARY_DISABLE_SCHEDULE_REDIRECT Add filters revisionary_do_submission_redirect, revisionary_do_schedule_redirect Closes #211 --- admin/post-edit-block-ui_rvy.php | 12 ++++++++++++ revision-creation_rvy.php | 11 ++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/admin/post-edit-block-ui_rvy.php b/admin/post-edit-block-ui_rvy.php index de487954..4317b817 100644 --- a/admin/post-edit-block-ui_rvy.php +++ b/admin/post-edit-block-ui_rvy.php @@ -127,6 +127,14 @@ public static function act_object_guten_scripts() { 'previewURL' => $preview_url, ); + if (defined('REVISIONARY_DISABLE_SUBMISSION_REDIRECT') || !apply_filters('revisionary_do_submission_redirect', true)) { + unset($args['redirectURLpending']); + } + + if (defined('REVISIONARY_DISABLE_SCHEDULE_REDIRECT') || !apply_filters('revisionary_do_schedule_redirect', true)) { + unset($args['redirectURLscheduled']); + } + if ($do_pending_revisions && $_revisions = rvy_get_post_revisions($post_id, 'pending-revision', ['orderby' => 'ID', 'order' => 'ASC'])) { $status_obj = get_post_status_object('pending-revision'); $args['pendingRevisionsCaption'] = sprintf(_n(' %s Pending Revision', ' %s Pending Revisions', count($_revisions), 'revisionary'), count($_revisions)); @@ -165,6 +173,10 @@ public static function act_object_guten_scripts() { 'redirectURL' => admin_url("edit.php?post_type={$post_type}&revision_submitted={$status}&post_id={$post_id}"), 'revisableStatuses' => rvy_filtered_statuses('names'), ); + + if (defined('REVISIONARY_DISABLE_SUBMISSION_REDIRECT') || !apply_filters('revisionary_do_submission_redirect', true)) { + unset($args['redirectURL']); + } } wp_localize_script( 'rvy_object_edit', 'rvyObjEdit', $args ); diff --git a/revision-creation_rvy.php b/revision-creation_rvy.php index e0a47d65..fe2d777c 100644 --- a/revision-creation_rvy.php +++ b/revision-creation_rvy.php @@ -383,7 +383,10 @@ function flt_pending_revision_data( $data, $postarr ) { $args['selected_recipients'] = array_map('intval', $_REQUEST['prev_cc_user']); } $revisionary->do_notifications( 'pending-revision', 'pending-revision', $postarr, $args ); - rvy_halt( $msg, __('Pending Revision Created', 'revisionary') ); + + if (apply_filters('revisionary_do_submission_redirect', true)) { + rvy_halt( $msg, __('Pending Revision Created', 'revisionary') ); + } } else { // return currently stored published post data $data = array_intersect_key((array) get_post($published_post->ID), $data); @@ -571,8 +574,10 @@ function flt_create_scheduled_rev( $data, $post_arr ) { $data = array_intersect_key( (array) $published_post, array_fill_keys( array( 'ID', 'post_name', 'post_status', 'post_parent', 'post_author' ), true ) ); rvy_update_post_meta( $published_post->ID, "_new_scheduled_revision_{$current_user->ID}", $revision_id ); } else { - $msg = $revisionary->get_revision_msg( $revision_id, array( 'post_id' => $published_post->ID ) ); - rvy_halt( $msg, __('Scheduled Revision Created', 'revisionary') ); + if (apply_filters('revisionary_do_schedule_redirect', true)) { + $msg = $revisionary->get_revision_msg( $revision_id, array( 'post_id' => $published_post->ID ) ); + rvy_halt( $msg, __('Scheduled Revision Created', 'revisionary') ); + } } return apply_filters('revisionary_future_rev_return_data', $data, $published_post, $revision_id); From 138ec5e5e6108d54838df9b35a2fd2e8d4fb3e15 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 18:30:01 -0400 Subject: [PATCH 07/24] Error when Revision submission includes a template setting Fixes #213 --- revisionary_main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/revisionary_main.php b/revisionary_main.php index 95491711..721ad032 100644 --- a/revisionary_main.php +++ b/revisionary_main.php @@ -536,7 +536,7 @@ function act_rest_insert( $post, $request, $unused ) { return _rvy_act_rest_insert($post, $request, $unused); } - private function handle_template( $template, $post_id, $validate = false ) { + public function handle_template( $template, $post_id, $validate = false ) { update_post_meta( $post_id, '_wp_page_template', $template ); } From b3e6437848bfeaf22172e1de4cd3f749c5319515 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:21:38 -0400 Subject: [PATCH 08/24] Permissions Pro + Status Control: invalid "Workflow" button PublishPress Permissions Pro + Status Control: Edit Revision screen had invalid "Workflow" button. This fix also requires Permissions Pro 3.3.8 Fixes #215 --- admin/admin_rvy.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/admin/admin_rvy.php b/admin/admin_rvy.php index 71523314..4d852e14 100644 --- a/admin/admin_rvy.php +++ b/admin/admin_rvy.php @@ -155,9 +155,23 @@ function __construct() { add_filter('presspermit_disable_exception_ui', [$this, 'fltDisableExceptionUI'], 10, 4); + add_filter('presspermit_status_control_scripts', [$this, 'fltDisableStatusControlScripts']); + add_action('admin_menu', [$this, 'actSettingsPageMaybeRedirect'], 999); } + public function fltDisableStatusControlScripts($enable_scripts) { + if ($post_id = rvy_detect_post_id()) { + if ($post = get_post($post_id)) { + if (!empty($post) && rvy_is_revision_status($post->post_status)) { + $enable_scripts = false; + } + } + } + + return $enable_scripts; + } + public function fltDisableExceptionUI($disable, $src_name, $post_id, $post_type = '') { if (!$post_id) { // Permissions version < 3.1.4 always passes zero value $post_id From 9905b750737315ea7e8ad1e1ac5d6eaec24c5dc4 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:23:49 -0400 Subject: [PATCH 09/24] Additional application of revisionary_do_submission_redirect filter --- admin/admin_rvy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/admin/admin_rvy.php b/admin/admin_rvy.php index 71523314..9adfbeeb 100644 --- a/admin/admin_rvy.php +++ b/admin/admin_rvy.php @@ -397,7 +397,9 @@ function handle_submission_redirect() { $revisionary->do_notifications( $status, $status, (array) $revised_post, $args ); } - rvy_halt( $revisionary->get_revision_msg( $revision, array( 'post_arr' => (array) $revision, 'post_id' => $revised_post->ID ) ) ); + if (apply_filters('revisionary_do_submission_redirect', true)) { + rvy_halt( $revisionary->get_revision_msg( $revision, array( 'post_arr' => (array) $revision, 'post_id' => $revised_post->ID ) ) ); + } } } } From 47928c0eba59385d1969e6406dc7859c35f38e84 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:30:27 -0400 Subject: [PATCH 10/24] PublishPress Permissions: Allow revision compare with Revise permissions PublishPress Permissions: Users with Revise permissions for specific pages couldn't compare Pending Revisions. Fixes #218 --- admin/history_rvy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/history_rvy.php b/admin/history_rvy.php index 2314ae1d..d9248a75 100644 --- a/admin/history_rvy.php +++ b/admin/history_rvy.php @@ -279,7 +279,7 @@ public function actAjaxRevisionDiffs() { return; } - if ( ! current_user_can( 'edit_post', $post->ID ) ) { + if ( ! current_user_can( 'read_post', $post->ID ) ) { return; } From 28109853901db060c864c87ab7a1bd35b8bbdfea Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:36:05 -0400 Subject: [PATCH 11/24] Pro: Error when comparing revisions of an unpublished post --- admin/history_rvy.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admin/history_rvy.php b/admin/history_rvy.php index d9248a75..68d73c57 100644 --- a/admin/history_rvy.php +++ b/admin/history_rvy.php @@ -1096,6 +1096,8 @@ function actRevisionDiffScripts() { } function actPastRevisionDiffScripts() { + global $revisionary; + if (did_action('rvy_compare_revisions')) { return; } From 5a4eb29fb10067a70d57d3000884d93759f27431 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:44:28 -0400 Subject: [PATCH 12/24] lock_others_revisions setting ignored This changeset also makes function rvy_is_full_editor() accept either on WP_Post object or an integer value (post id) as the $post argument. --- revisionary_main.php | 11 +++++++++-- rvy_init.php | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/revisionary_main.php b/revisionary_main.php index 721ad032..af99d449 100644 --- a/revisionary_main.php +++ b/revisionary_main.php @@ -897,13 +897,20 @@ private function filter_caps($wp_blogcaps, $reqd_caps, $args, $internal_args = a $this->skip_revision_allowance = true; } + $object_type_obj = get_post_type_object( $object_type ); + if (rvy_get_option('revisor_lock_others_revisions')) { - if ($post && !rvy_is_full_editor($post)) { + if ($post && !rvy_is_full_editor(rvy_post_id($post->ID))) { // Revisors are enabled to edit other users' posts for revision, but cannot edit other users' revisions unless cap is explicitly set sitewide - if ( rvy_is_revision_status($post->post_type) && ! $this->skip_revision_allowance ) { + if (rvy_is_revision_status($post->post_status) && !$this->skip_revision_allowance) { if (!rvy_is_post_author($post)) { if ( empty( $current_user->allcaps['edit_others_revisions'] ) ) { $this->skip_revision_allowance = 1; + + if ($object_type_obj && !empty($object_type_obj->cap->edit_others_posts)) { + $busy = false; + return array_diff_key($wp_blogcaps, [$object_type_obj->cap->edit_others_posts => true]); + } } } } diff --git a/rvy_init.php b/rvy_init.php index e95e424a..3d3ab20b 100644 --- a/rvy_init.php +++ b/rvy_init.php @@ -977,6 +977,10 @@ function rvy_init() { function rvy_is_full_editor($post, $args = []) { global $current_user, $revisionary; + if (is_numeric($post)) { + $post = get_post($post); + } + if (!$type_obj = get_post_type_object($post->post_type)) { return false; } From 156b4b1d4cb583b2e2b81bd8f73158eae2e3d3aa Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:47:00 -0400 Subject: [PATCH 13/24] Remove a post type object creation (now created earlier) Followup to previously committed changes. --- revisionary_main.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/revisionary_main.php b/revisionary_main.php index af99d449..137b5878 100644 --- a/revisionary_main.php +++ b/revisionary_main.php @@ -917,8 +917,6 @@ private function filter_caps($wp_blogcaps, $reqd_caps, $args, $internal_args = a } } - $object_type_obj = get_post_type_object( $object_type ); - if ( empty( $object_type_obj->cap ) ) { $busy = false; return $wp_blogcaps; From 8c4d2c222a595e535675d087c90019089b5b6184 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:57:00 -0400 Subject: [PATCH 14/24] list_others_pages capability should let Revisors see uneditable drafts --- revisionary_main.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/revisionary_main.php b/revisionary_main.php index 137b5878..6f2071f0 100644 --- a/revisionary_main.php +++ b/revisionary_main.php @@ -617,8 +617,14 @@ function flt_limit_others_drafts( $caps, $meta_cap, $user_id, $args ) { $stati = array_diff( $stati, array( 'future' ) ); } - if ( in_array( $post->post_status, $stati ) ) { - $caps[]= "edit_others_drafts"; + if ( in_array( $post->post_status, $stati ) ) { // isset check because doing_cap_check property was undefined prior to Permissions 3.3.8 + if ((!function_exists('presspermit') || (isset(presspermit()->doing_cap_check) && !presspermit()->doing_cap_check)) && empty($current_user->allcaps['edit_others_drafts']) && $post_type_obj) { + if (!empty($post_type_obj->cap->edit_others_posts)) { + $caps[] = str_replace('edit_', 'list_', $post_type_obj->cap->edit_others_posts); + } + } else { + $caps[]= "edit_others_drafts"; + } } } } From fc90fcecfca215b8583f361ab7d2efad00d64496 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 19:59:41 -0400 Subject: [PATCH 15/24] Update change log --- readme.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/readme.txt b/readme.txt index b60b29a6..bf13b78d 100644 --- a/readme.txt +++ b/readme.txt @@ -100,6 +100,19 @@ Follow PublishPress on [Facebook](https://www.facebook.com/publishpress), [Twitt == Changelog == += 2.4.2 - 26 Oct 2020 = +* Compat : PublishPress Permissions - Users assigned Revise permissions for a specific pages or categories could not compare Pending Revisions +* Compat : PublishPress Permissions Pro - With Status Control module active, Edit Revision screen had invalid "Workflow" button (also requires Permissions Pro 3.3.8) +* Compat : Public Post Preview - Author selector was hidden in post editor +* Compat : Public Post Preview - Make public post previews of published posts redirect to the published post +* Change : Revision Settings - Revision Queue section, includes "Compatibility Mode" setting to prevent revisions from being hidden from the queue in the case of plugin integration issues +* Fixed : "Prevent Revisors from editing others' revisions" setting was not applied +* Fixed : Error when Revision submission includes a template setting +* Fixed : Revison Queue - PHP Notice "Undefined variable: post_id" when URL includes published_post argument +* Feature : If Revisors are blocked from editing other users' drafts, those can now be included (unclickable) in Edit Pages if the list_others_pages capability is granted +* Feature : Support constant definitions REVISIONARY_DISABLE_SUBMISSION_REDIRECT, REVISIONARY_DISABLE_SCHEDULE_REDIRECT +* Feature : New filters 'revisionary_do_submission_redirect', 'revisionary_do_schedule_redirect' + = 2.4.1 - 9 Oct 2020 = * Compat : PublishPress Permissions: On new post creation, Revisors get a Publish button instead of a Submit button. Publishing fails; the only way to submit successfully is Save Draft, then Submit for Review. * Compat : PublishPress Permissions - Revisions were not listed in Queue under some configurations with PublishPress Permissions active From 8120b678c2acc83aaf4a45a73f5fa6e7d196077c Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 20:00:31 -0400 Subject: [PATCH 16/24] Update change log --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index bf13b78d..6d2f7803 100644 --- a/readme.txt +++ b/readme.txt @@ -101,7 +101,7 @@ Follow PublishPress on [Facebook](https://www.facebook.com/publishpress), [Twitt == Changelog == = 2.4.2 - 26 Oct 2020 = -* Compat : PublishPress Permissions - Users assigned Revise permissions for a specific pages or categories could not compare Pending Revisions +* Compat : PublishPress Permissions - Users assigned Revise permissions for specific pages or categories could not compare Pending Revisions * Compat : PublishPress Permissions Pro - With Status Control module active, Edit Revision screen had invalid "Workflow" button (also requires Permissions Pro 3.3.8) * Compat : Public Post Preview - Author selector was hidden in post editor * Compat : Public Post Preview - Make public post previews of published posts redirect to the published post From cdb0ce3aad3f8aeb11c41b3962b7fa189ad3bbe8 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 20:00:58 -0400 Subject: [PATCH 17/24] Update change log --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 6d2f7803..8f68a305 100644 --- a/readme.txt +++ b/readme.txt @@ -114,7 +114,7 @@ Follow PublishPress on [Facebook](https://www.facebook.com/publishpress), [Twitt * Feature : New filters 'revisionary_do_submission_redirect', 'revisionary_do_schedule_redirect' = 2.4.1 - 9 Oct 2020 = -* Compat : PublishPress Permissions: On new post creation, Revisors get a Publish button instead of a Submit button. Publishing fails; the only way to submit successfully is Save Draft, then Submit for Review. +* Compat : PublishPress Permissions - On new post creation, Revisors get a Publish button instead of a Submit button. Publishing fails; the only way to submit successfully is Save Draft, then Submit for Review. * Compat : PublishPress Permissions - Revisions were not listed in Queue under some configurations with PublishPress Permissions active * Fixed : With pre-Publish checks enabled in Gutenberg, after first save "Pending Revision" checkbox was moved off of pre-Publish Panel From db61d28064d077eec8a3f8333d76879a2bb6818b Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Thu, 22 Oct 2020 20:43:35 -0400 Subject: [PATCH 18/24] Update language files --- languages/revisionary.mo | Bin 780 -> 780 bytes languages/revisionary.po | 415 ++++++++++++++++++++------------------- 2 files changed, 212 insertions(+), 203 deletions(-) diff --git a/languages/revisionary.mo b/languages/revisionary.mo index 3900bf76ed080b38771def86cebbfd77b36aead9..70b8540b89422f8d99047c4ef6bc9dd2612aafd5 100644 GIT binary patch delta 19 acmeBS>tUPF&tYVwU}RurVz6;~DH8xUYz2=1 delta 19 acmeBS>tUPF&tYJpU}$J%WU_I3DH8xUoduNu diff --git a/languages/revisionary.po b/languages/revisionary.po index 5f0786b9..bac8aa99 100644 --- a/languages/revisionary.po +++ b/languages/revisionary.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: Revisionary Pro\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-10-08 11:24-0500\n" +"POT-Creation-Date: 2020-10-22 20:40-0500\n" "PO-Revision-Date: \n" "Last-Translator: Kevin Behrens \n" "Language-Team: PublishPress \n" @@ -19,66 +19,66 @@ msgstr "" "X-Poedit-SearchPath-2: F:\\snapshot\\revisionary\\hardway\n" "X-Poedit-SearchPath-3: F:\\snapshot\\revisionary\\lib\n" -#: F:\snapshot\revisionary/front_rvy.php:147 +#: F:\snapshot\revisionary/front_rvy.php:165 msgid "M j, Y @ g:i a" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:176 +#: F:\snapshot\revisionary/front_rvy.php:194 #, php-format msgid "%sCompare%s%sView Published Post%s" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:190 +#: F:\snapshot\revisionary/front_rvy.php:208 #, php-format msgid "%sView Published Post%s" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:201 +#: F:\snapshot\revisionary/front_rvy.php:219 msgid "Edit" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:235 +#: F:\snapshot\revisionary/front_rvy.php:253 msgid "Approve" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:240 +#: F:\snapshot\revisionary/front_rvy.php:258 #, php-format msgid "This is a Pending Revision (requested publish date: %s). %s %s %s" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:244 -#: F:\snapshot\revisionary/front_rvy.php:263 +#: F:\snapshot\revisionary/front_rvy.php:262 +#: F:\snapshot\revisionary/front_rvy.php:281 msgid "Publish now" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:246 +#: F:\snapshot\revisionary/front_rvy.php:264 #, php-format msgid "This is a Pending Revision. %s %s %s" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:256 +#: F:\snapshot\revisionary/front_rvy.php:274 msgid "This revision is very new, preview may not be synchronized with theme." msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:257 +#: F:\snapshot\revisionary/front_rvy.php:275 msgid "Reload" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:265 +#: F:\snapshot\revisionary/front_rvy.php:283 #, php-format msgid "This is a Scheduled Revision (for publication on %s). %s %s %s" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:272 +#: F:\snapshot\revisionary/front_rvy.php:290 msgid "Restore" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:273 +#: F:\snapshot\revisionary/front_rvy.php:291 #, php-format msgid "This is a Past Revision (from %s). %s %s" msgstr "" -#: F:\snapshot\revisionary/front_rvy.php:285 +#: F:\snapshot\revisionary/front_rvy.php:303 #, php-format msgid "This is the Current Revision. %s" msgstr "" @@ -95,32 +95,32 @@ msgstr "" msgid "Revision Submission Error" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:386 +#: F:\snapshot\revisionary/revision-creation_rvy.php:388 msgid "Pending Revision Created" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:537 +#: F:\snapshot\revisionary/revision-creation_rvy.php:540 msgid "Sorry, an error occurred while attempting to schedule your revision!" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:538 +#: F:\snapshot\revisionary/revision-creation_rvy.php:541 msgid "Revision Scheduling Error" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:575 +#: F:\snapshot\revisionary/revision-creation_rvy.php:579 msgid "Scheduled Revision Created" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:598 +#: F:\snapshot\revisionary/revision-creation_rvy.php:603 msgid "Could not insert revision into the database" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:647 +#: F:\snapshot\revisionary/revision-creation_rvy.php:652 #, php-format msgid "Invalid taxonomy: %s" msgstr "" -#: F:\snapshot\revisionary/revision-creation_rvy.php:726 +#: F:\snapshot\revisionary/revision-creation_rvy.php:731 msgid "Invalid page template." msgstr "" @@ -341,7 +341,7 @@ msgid "Dismiss" msgstr "" #: F:\snapshot\revisionary/admin/admin_lib-mu_rvy.php:12 -#: F:\snapshot\revisionary/admin/options.php:199 +#: F:\snapshot\revisionary/admin/options.php:204 msgid "PublishPress Revisions Network Settings" msgstr "" @@ -350,7 +350,7 @@ msgid "Network Settings" msgstr "" #: F:\snapshot\revisionary/admin/admin_lib-mu_rvy.php:23 -#: F:\snapshot\revisionary/admin/options.php:201 +#: F:\snapshot\revisionary/admin/options.php:206 msgid "PublishPress Revisions Network Defaults" msgstr "" @@ -358,134 +358,135 @@ msgstr "" msgid "Network Defaults" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:314 +#: F:\snapshot\revisionary/admin/admin_rvy.php:328 msgid "Has Revision" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:328 -#: F:\snapshot\revisionary/admin/admin_rvy.php:667 +#: F:\snapshot\revisionary/admin/admin_rvy.php:342 +#: F:\snapshot\revisionary/admin/admin_rvy.php:685 +#: F:\snapshot\revisionary/admin/options.php:101 msgid "Revision Queue" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:336 +#: F:\snapshot\revisionary/admin/admin_rvy.php:350 msgid "The revision was restored." msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:339 +#: F:\snapshot\revisionary/admin/admin_rvy.php:353 msgid "The revision was scheduled for publication." msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:342 +#: F:\snapshot\revisionary/admin/admin_rvy.php:356 msgid "The revision was published." msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:455 +#: F:\snapshot\revisionary/admin/admin_rvy.php:471 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:353 #, php-format msgid "Scheduled for: %s" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:457 +#: F:\snapshot\revisionary/admin/admin_rvy.php:473 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:355 #, php-format msgid "Published on: %s" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:459 -#: F:\snapshot\revisionary/admin/admin_rvy.php:467 +#: F:\snapshot\revisionary/admin/admin_rvy.php:475 +#: F:\snapshot\revisionary/admin/admin_rvy.php:483 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:357 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:365 msgid "Publish immediately" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:461 +#: F:\snapshot\revisionary/admin/admin_rvy.php:477 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:359 #, php-format msgid "Schedule for: %s" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:463 +#: F:\snapshot\revisionary/admin/admin_rvy.php:479 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:361 #, php-format msgid "Publish on: %s" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:497 +#: F:\snapshot\revisionary/admin/admin_rvy.php:513 msgid "Save as Pending Revision" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:500 +#: F:\snapshot\revisionary/admin/admin_rvy.php:516 #: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:122 msgid "Do not publish current changes yet, but save to Revision Queue" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:520 -#: F:\snapshot\revisionary/admin/admin_rvy.php:681 +#: F:\snapshot\revisionary/admin/admin_rvy.php:536 +#: F:\snapshot\revisionary/admin/admin_rvy.php:699 #: F:\snapshot\revisionary/admin/options.php:94 msgid "Settings" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:576 +#: F:\snapshot\revisionary/admin/admin_rvy.php:594 msgid "Enable public preview" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:594 +#: F:\snapshot\revisionary/admin/admin_rvy.php:612 #: F:\snapshot\revisionary/admin/filters-admin-ui-item_rvy.php:134 msgid "Current Time" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:648 -#: F:\snapshot\revisionary/admin/admin_rvy.php:664 +#: F:\snapshot\revisionary/admin/admin_rvy.php:666 +#: F:\snapshot\revisionary/admin/admin_rvy.php:682 msgid "Revisions" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:681 -#: F:\snapshot\revisionary/admin/options.php:205 +#: F:\snapshot\revisionary/admin/admin_rvy.php:699 +#: F:\snapshot\revisionary/admin/options.php:210 msgid "PublishPress Revisions Settings" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:688 -#: F:\snapshot\revisionary/admin/admin_rvy.php:689 +#: F:\snapshot\revisionary/admin/admin_rvy.php:706 +#: F:\snapshot\revisionary/admin/admin_rvy.php:707 msgid "Upgrade to Pro" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:778 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1073 +#: F:\snapshot\revisionary/admin/admin_rvy.php:796 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1075 msgid "Delete" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:789 +#: F:\snapshot\revisionary/admin/admin_rvy.php:807 #, php-format msgid "%s (revision)" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:823 +#: F:\snapshot\revisionary/admin/admin_rvy.php:841 #, php-format msgid "If you like %s, please leave us a %s rating. Thank you!" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:834 +#: F:\snapshot\revisionary/admin/admin_rvy.php:852 msgid "About PublishPress Revisions" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:834 +#: F:\snapshot\revisionary/admin/admin_rvy.php:852 msgid "About" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:836 +#: F:\snapshot\revisionary/admin/admin_rvy.php:854 msgid "PublishPress Revisions Documentation" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:836 -#: F:\snapshot\revisionary/admin/options.php:681 +#: F:\snapshot\revisionary/admin/admin_rvy.php:854 +#: F:\snapshot\revisionary/admin/options.php:707 msgid "Documentation" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:838 +#: F:\snapshot\revisionary/admin/admin_rvy.php:856 msgid "Contact the PublishPress team" msgstr "" -#: F:\snapshot\revisionary/admin/admin_rvy.php:838 +#: F:\snapshot\revisionary/admin/admin_rvy.php:856 msgid "Contact" msgstr "" @@ -515,90 +516,90 @@ msgstr "" msgid "unselect" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:294 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:296 msgid "Revision" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:295 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:297 msgid "Status" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:296 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:298 msgid "Post Type" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:297 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:299 msgid "Revised By" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:298 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:300 msgid "Submission" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:306 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:308 msgid "Schedule" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:309 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:311 msgid "Published Post" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:311 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:313 msgid "Post Author" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:352 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:993 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:354 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:995 msgid "Y/m/d g:i:s a" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:360 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:998 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:362 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1000 #: F:\snapshot\revisionary/admin/history_rvy.php:954 #, php-format msgid "%s ago" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:363 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1001 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:365 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1003 msgid "Y/m/d g:i a" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:370 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:372 #, php-format msgid "Scheduled publication: %s" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:373 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:375 #, php-format msgid "Requested publication: %s" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:377 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:379 msgid "Missed schedule" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:420 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:422 #: F:\snapshot\revisionary/admin/history_rvy.php:772 msgid "No author" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:457 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:459 #, php-format msgid "View only revisions of %s" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:458 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:796 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:460 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:798 msgid "Filter" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:469 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:477 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:471 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:479 msgid "View published post" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:470 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:472 #: F:\snapshot\revisionary/admin/history_rvy.php:1039 #: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:50 #: F:\snapshot\revisionary/admin/post-edit_rvy.php:99 @@ -608,78 +609,78 @@ msgstr "" msgid "View" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:478 -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1089 -#: F:\snapshot\revisionary/admin/history_rvy.php:1132 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:480 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1091 +#: F:\snapshot\revisionary/admin/history_rvy.php:1134 msgid "Preview" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:501 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:503 msgid "Compare Past Revisions" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:502 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:504 msgid "History" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:654 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:656 #, php-format msgid "%sMy Revisions%s(%s)" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:686 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:688 #, php-format msgid "%sMy Published Posts%s(%s)" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:721 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:723 #, php-format msgid "All %s" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:747 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:749 msgid "Publish" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:750 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:752 msgid "Unschedule" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:754 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:756 #: F:\snapshot\revisionary/admin/PostEditSubmitMetabox.php:103 msgid "Delete Permanently" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:775 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:777 msgid "Filter by category" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:838 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:840 msgid "Filter by date" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:840 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:842 msgid "All dates" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:899 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:901 msgid "Select All" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:981 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:983 #, php-format msgid "“%s” (Edit)" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1072 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1074 msgid "Delete Revision" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1088 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1090 msgid "Preview Revision" msgstr "" -#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1100 +#: F:\snapshot\revisionary/admin/class-list-table_rvy.php:1102 msgid "Compare Changes" msgstr "" @@ -692,8 +693,8 @@ msgstr "" #: F:\snapshot\revisionary/admin/filters-admin-ui-item_rvy.php:121 #: F:\snapshot\revisionary/admin/filters-admin-ui-item_rvy.php:127 #: F:\snapshot\revisionary/admin/filters-admin-ui-item_rvy.php:128 -#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:162 -#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:163 +#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:170 +#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:171 msgid "Submit Revision" msgstr "" @@ -789,15 +790,15 @@ msgstr "" msgid "View / Approve" msgstr "" -#: F:\snapshot\revisionary/admin/history_rvy.php:1131 +#: F:\snapshot\revisionary/admin/history_rvy.php:1133 msgid "Preview / Restore" msgstr "" -#: F:\snapshot\revisionary/admin/history_rvy.php:1138 +#: F:\snapshot\revisionary/admin/history_rvy.php:1140 msgid "Manage" msgstr "" -#: F:\snapshot\revisionary/admin/history_rvy.php:1139 +#: F:\snapshot\revisionary/admin/history_rvy.php:1141 msgid "List" msgstr "" @@ -809,328 +810,336 @@ msgstr "" msgid "Role Definition" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:101 +#: F:\snapshot\revisionary/admin/options.php:102 msgid "Preview / Approval" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:102 +#: F:\snapshot\revisionary/admin/options.php:103 msgid "Revision Options" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:103 +#: F:\snapshot\revisionary/admin/options.php:104 msgid "Email Notification" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:109 +#: F:\snapshot\revisionary/admin/options.php:111 msgid "Enable Pending Revisions" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:110 +#: F:\snapshot\revisionary/admin/options.php:112 msgid "Enable Scheduled Revisions" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:111 +#: F:\snapshot\revisionary/admin/options.php:113 msgid "Prevent Revisors from editing others' revisions" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:112 +#: F:\snapshot\revisionary/admin/options.php:114 msgid "Prevent Revisors from viewing others' revisions" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:113 +#: F:\snapshot\revisionary/admin/options.php:115 +msgid "Compatibility Mode" +msgstr "" + +#: F:\snapshot\revisionary/admin/options.php:116 msgid "Revision publication triggers API actions to mimic post update" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:114 +#: F:\snapshot\revisionary/admin/options.php:117 msgid "Strip html tags out of difference display" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:115 +#: F:\snapshot\revisionary/admin/options.php:118 msgid "Asynchronous Publishing" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:116 -#: F:\snapshot\revisionary/admin/options.php:117 +#: F:\snapshot\revisionary/admin/options.php:119 +#: F:\snapshot\revisionary/admin/options.php:120 msgid "Update Publish Date" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:118 +#: F:\snapshot\revisionary/admin/options.php:121 msgid "Email original Author when a Pending Revision is submitted" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:119 +#: F:\snapshot\revisionary/admin/options.php:122 msgid "Email the original Author when a Pending Revision is approved" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:120 +#: F:\snapshot\revisionary/admin/options.php:123 msgid "Email the Revisor when a Pending Revision is approved" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:121 +#: F:\snapshot\revisionary/admin/options.php:124 msgid "Email the original Author when a Scheduled Revision is published" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:122 +#: F:\snapshot\revisionary/admin/options.php:125 msgid "Email the Revisor when a Scheduled Revision is published" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:123 +#: F:\snapshot\revisionary/admin/options.php:126 msgid "Enable notification buffer" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:124 +#: F:\snapshot\revisionary/admin/options.php:127 msgid "All custom post types available to Revisors" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:125 +#: F:\snapshot\revisionary/admin/options.php:128 msgid "Prevent Revisors from editing other user's drafts" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:126 +#: F:\snapshot\revisionary/admin/options.php:129 msgid "Display Hints" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:127 +#: F:\snapshot\revisionary/admin/options.php:130 msgid "Show Preview Links" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:128 +#: F:\snapshot\revisionary/admin/options.php:131 msgid "Preview Link Type" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:129 +#: F:\snapshot\revisionary/admin/options.php:132 msgid "Approve Button on Compare Revisions screen" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:130 +#: F:\snapshot\revisionary/admin/options.php:133 msgid "Copy revision comments to published post" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:135 +#: F:\snapshot\revisionary/admin/options.php:139 msgid "Email designated Publishers when a Pending Revision is submitted" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:136 +#: F:\snapshot\revisionary/admin/options.php:140 msgid "Email designated Publishers when a Scheduled Revision is published" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:137 +#: F:\snapshot\revisionary/admin/options.php:141 msgid "Email designated Publishers when a Pending Revision is approved" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:139 +#: F:\snapshot\revisionary/admin/options.php:143 msgid "Email Editors and Administrators when a Pending Revision is submitted" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:140 +#: F:\snapshot\revisionary/admin/options.php:144 msgid "Email Editors and Administrators when a Scheduled Revision is published" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:141 +#: F:\snapshot\revisionary/admin/options.php:145 msgid "Email Editors and Administrators when a Pending Revision is approved" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:203 +#: F:\snapshot\revisionary/admin/options.php:208 msgid "PublishPress Revisions Site Settings" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:211 -#: F:\snapshot\revisionary/admin/options.php:799 +#: F:\snapshot\revisionary/admin/options.php:216 +#: F:\snapshot\revisionary/admin/options.php:825 msgid "Update »" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:225 +#: F:\snapshot\revisionary/admin/options.php:230 msgid "These are the default settings for options which can be adjusted per-site." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:262 +#: F:\snapshot\revisionary/admin/options.php:267 #, php-format msgid "You can also specify %1$sdefaults for site-specific settings%2$s." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:263 +#: F:\snapshot\revisionary/admin/options.php:268 #, php-format msgid "Use this tab to make NETWORK-WIDE changes to PublishPress Revisions settings. %s" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:265 +#: F:\snapshot\revisionary/admin/options.php:270 msgid "Here you can change the default value for settings which are controlled separately on each site." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:279 +#: F:\snapshot\revisionary/admin/options.php:284 #, php-format msgid "Note that %1$s network-wide settings%2$s may also be available." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:311 +#: F:\snapshot\revisionary/admin/options.php:316 msgid "The user role \"Revisor\" role is now available. Include capabilities for all custom post types in this role?" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:316 +#: F:\snapshot\revisionary/admin/options.php:321 msgid "If checked, users lacking site-wide publishing capabilities will also be checked for the edit_others_drafts capability" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:337 +#: F:\snapshot\revisionary/admin/options.php:342 msgid "If a currently published post or page is edited and a future date set, the change will not be applied until the selected date." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:340 +#: F:\snapshot\revisionary/admin/options.php:345 msgid "When a scheduled revision is published, update post publish date to current time." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:343 +#: F:\snapshot\revisionary/admin/options.php:348 msgid "Publish scheduled revisions asynchronously, via a secondary http request from the server. This is usually best since it eliminates delay, but some servers may not support it." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:361 +#: F:\snapshot\revisionary/admin/options.php:366 #, php-format msgid "Enable Contributors to submit revisions to their own published content. Revisors and users who have the edit_others (but not edit_published) capability for the post type can submit revisions to other user's content. These Pending Revisions are listed in %sRevision Queue%s." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:367 +#: F:\snapshot\revisionary/admin/options.php:372 msgid "When a pending revision is published, update post publish date to current time." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:385 +#: F:\snapshot\revisionary/admin/options.php:393 +msgid "This restriction applies to users who are not full editors for the post type. To enable a role, give it the edit_others_revisions capability." +msgstr "" + +#: F:\snapshot\revisionary/admin/options.php:396 +msgid "This restriction applies to users who are not full editors for the post type. To enable a role, give it the list_others_revisions capability." +msgstr "" + +#: F:\snapshot\revisionary/admin/options.php:399 +msgid "If some revisions are missing from the queue, disable a performance enhancement for better compatibility with themes and plugins." +msgstr "" + +#: F:\snapshot\revisionary/admin/options.php:404 +msgid "Regenerate \"post has revision\" flags" +msgstr "" + +#: F:\snapshot\revisionary/admin/options.php:420 msgid "For themes that block revision preview, hide preview links from non-Administrators" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:397 +#: F:\snapshot\revisionary/admin/options.php:432 msgid "Published Post Slug" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:397 +#: F:\snapshot\revisionary/admin/options.php:432 msgid "Revision Slug" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:397 +#: F:\snapshot\revisionary/admin/options.php:432 msgid "Revision ID only" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:408 +#: F:\snapshot\revisionary/admin/options.php:443 msgid "Some themes or plugins may require Revision Slug or Revision ID link type for proper template loading and field display." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:418 +#: F:\snapshot\revisionary/admin/options.php:453 msgid "If disabled, Compare screen links to Revision Preview for approval" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:438 +#: F:\snapshot\revisionary/admin/options.php:473 #, php-format msgid "For compatibility with Advanced Custom Fields, Beaver Builder and WPML, upgrade to PublishPress Revisions Pro." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:447 -msgid "This restriction applies to users who are not full editors for the post type. To enable a role, give it the edit_others_revisions capability." -msgstr "" - -#: F:\snapshot\revisionary/admin/options.php:450 -msgid "This restriction applies to users who are not full editors for the post type. To enable a role, give it the list_others_revisions capability." -msgstr "" - -#: F:\snapshot\revisionary/admin/options.php:453 +#: F:\snapshot\revisionary/admin/options.php:482 msgid "This may improve compatibility with some plugins." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:462 +#: F:\snapshot\revisionary/admin/options.php:491 msgid "Show descriptive captions for PublishPress Revisions settings" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:467 -msgid "Regenerate revision storage flags (for Revision Queue listing)" -msgstr "" - -#: F:\snapshot\revisionary/admin/options.php:483 -#: F:\snapshot\revisionary/admin/options.php:540 +#: F:\snapshot\revisionary/admin/options.php:509 +#: F:\snapshot\revisionary/admin/options.php:566 msgid "select recipients" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:492 -#: F:\snapshot\revisionary/admin/options.php:510 +#: F:\snapshot\revisionary/admin/options.php:518 +#: F:\snapshot\revisionary/admin/options.php:536 msgid "Never" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:492 -#: F:\snapshot\revisionary/admin/options.php:510 +#: F:\snapshot\revisionary/admin/options.php:518 +#: F:\snapshot\revisionary/admin/options.php:536 msgid "By default" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:492 -#: F:\snapshot\revisionary/admin/options.php:510 +#: F:\snapshot\revisionary/admin/options.php:518 +#: F:\snapshot\revisionary/admin/options.php:536 msgid "Always" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:557 +#: F:\snapshot\revisionary/admin/options.php:583 msgid "Note: \"by default\" means Pending Revision creators can customize email notification recipients before submitting. Eligibile \"Publisher\" email recipients are members of the Pending Revision Monitors group who also have the ability to publish the revision. If not explicitly defined, the Monitors group is all users with a primary WP role of Administrator or Editor." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:559 +#: F:\snapshot\revisionary/admin/options.php:585 #, php-format msgid "Note: \"by default\" means Pending Revision creators can customize email notification recipients before submitting. For more flexibility in moderation and notification, install the %1$s PublishPress Permissions Pro%2$s plugin." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:567 +#: F:\snapshot\revisionary/admin/options.php:593 msgid "To avoid notification failures, buffer emails for delayed sending once minute, hour or day limits are exceeded" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:584 +#: F:\snapshot\revisionary/admin/options.php:610 msgid "Notification Buffer" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:612 +#: F:\snapshot\revisionary/admin/options.php:638 msgid "Notification Log" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:641 +#: F:\snapshot\revisionary/admin/options.php:667 msgid "Purge Notification Buffer" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:647 +#: F:\snapshot\revisionary/admin/options.php:673 msgid "Truncate Notification Log" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:653 +#: F:\snapshot\revisionary/admin/options.php:679 #, php-format msgid "Sent in last minute: %d / %d" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:654 +#: F:\snapshot\revisionary/admin/options.php:680 #, php-format msgid "Sent in last hour: %d / %d" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:655 +#: F:\snapshot\revisionary/admin/options.php:681 #, php-format msgid "Sent in last day: %d / %d" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:662 +#: F:\snapshot\revisionary/admin/options.php:688 #, php-format msgid "Seconds until next buffer processing time: %d" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:671 +#: F:\snapshot\revisionary/admin/options.php:697 msgid "Show Notification Log / Buffer" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:673 +#: F:\snapshot\revisionary/admin/options.php:699 msgid "Show with message content" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:714 +#: F:\snapshot\revisionary/admin/options.php:740 #, php-format msgid "network-wide control of \"%s\"" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:721 +#: F:\snapshot\revisionary/admin/options.php:747 msgid "Specify which PublishPress Revisions Settings to control network-wide. Unselected settings are controlled separately on each site." msgstr "" -#: F:\snapshot\revisionary/admin/options.php:803 +#: F:\snapshot\revisionary/admin/options.php:829 msgid "All settings in this form (including those on unselected tabs) will be reset to DEFAULTS. Are you sure?" msgstr "" -#: F:\snapshot\revisionary/admin/options.php:808 +#: F:\snapshot\revisionary/admin/options.php:834 msgid "Revert to Defaults" msgstr "" @@ -1182,17 +1191,17 @@ msgstr "" msgid "Do not schedule current changes yet, but save to Revision Queue" msgstr "" -#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:132 +#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:140 #, php-format msgid " %s Pending Revision" msgstr "" -#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:143 +#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:151 #, php-format msgid " %s Scheduled Revision" msgstr "" -#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:164 +#: F:\snapshot\revisionary/admin/post-edit-block-ui_rvy.php:172 msgid "Workflow…" msgstr "" From 22cb2a25b49c94462067c21e3eaaafcab3b2ab34 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:43:21 -0400 Subject: [PATCH 19/24] Replace manual URL construction with plugins_url() call --- admin/admin_rvy.php | 3 +-- front_rvy.php | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/admin/admin_rvy.php b/admin/admin_rvy.php index c08ca30c..1480f2bb 100644 --- a/admin/admin_rvy.php +++ b/admin/admin_rvy.php @@ -12,8 +12,7 @@ if( basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME']) ) die(); -$wp_content = ( is_ssl() || ( is_admin() && defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ) ) ? str_replace( 'http:', 'https:', WP_CONTENT_URL ) : WP_CONTENT_URL; -define ('RVY_URLPATH', $wp_content . '/plugins/' . RVY_FOLDER); +define ('RVY_URLPATH', plugins_url('', REVISIONARY_FILE)); class RevisionaryAdmin { diff --git a/front_rvy.php b/front_rvy.php index e5af7ac0..1b48e9be 100644 --- a/front_rvy.php +++ b/front_rvy.php @@ -327,10 +327,7 @@ function act_template_redirect() { } function rvyFrontCSS() { - $wp_content = ( is_ssl() || ( is_admin() && defined('FORCE_SSL_ADMIN') && FORCE_SSL_ADMIN ) ) ? str_replace( 'http:', 'https:', WP_CONTENT_URL ) : WP_CONTENT_URL; - $path = $wp_content . '/plugins/' . RVY_FOLDER; - - echo ''."\n"; + echo ''."\n"; } function rvyEnqueuePreviewJS() { From 990cb7c98867e3e2ad1e28dc4cde8b3738a58fb2 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:48:05 -0400 Subject: [PATCH 20/24] Remove hardcoded path from RVY_ABSPATH definition --- revisionary.php | 1 + 1 file changed, 1 insertion(+) diff --git a/revisionary.php b/revisionary.php index cbf5780e..a204021b 100644 --- a/revisionary.php +++ b/revisionary.php @@ -225,6 +225,7 @@ function() define( 'WP_CONTENT_DIR', str_replace('\\', '/', ABSPATH) . 'wp-content' ); define ('RVY_ABSPATH', WP_CONTENT_DIR . '/plugins/' . RVY_FOLDER); + define('RVY_ABSPATH', __DIR__); if (is_admin() && !defined('REVISIONARY_PRO_VERSION')) { require_once(__DIR__ . '/includes/CoreAdmin.php'); From bca07d1d2af7c95b2eab592b9e1c04403b5bfd6a Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:48:32 -0400 Subject: [PATCH 21/24] Eliminate redundant constant definitions --- admin/admin-init_rvy.php | 2 +- admin/admin_rvy.php | 2 +- front_rvy.php | 2 +- revisionary.php | 25 ++++++++----------------- rvy_init.php | 4 ++-- 5 files changed, 13 insertions(+), 22 deletions(-) diff --git a/admin/admin-init_rvy.php b/admin/admin-init_rvy.php index 0e06fe70..80fa8192 100644 --- a/admin/admin-init_rvy.php +++ b/admin/admin-init_rvy.php @@ -35,7 +35,7 @@ function rvy_load_textdomain() { if ( defined('RVY_TEXTDOMAIN_LOADED') ) return; - load_plugin_textdomain('revisionary', false, RVY_FOLDER . '/languages'); + load_plugin_textdomain('revisionary', false, dirname(plugin_basename(REVISIONARY_FILE)) . '/languages'); define('RVY_TEXTDOMAIN_LOADED', true); } diff --git a/admin/admin_rvy.php b/admin/admin_rvy.php index 1480f2bb..ef562048 100644 --- a/admin/admin_rvy.php +++ b/admin/admin_rvy.php @@ -530,7 +530,7 @@ function flt_detect_revision_save( $post_status ) { // adds an Options link next to Deactivate, Edit in Plugins listing function flt_plugin_action_links($links, $file) { - if ( $file == RVY_BASENAME ) { + if ($file == plugin_basename(REVISIONARY_FILE)) { $page = ( RVY_NETWORK ) ? 'rvy-net_options' : 'revisionary-settings'; $links[] = "" . __awp('Settings') . ""; } diff --git a/front_rvy.php b/front_rvy.php index 1b48e9be..9abd2a8a 100644 --- a/front_rvy.php +++ b/front_rvy.php @@ -181,7 +181,7 @@ function act_template_redirect() { $redirect_arg = ( ! empty($_REQUEST['rvy_redirect']) ) ? "&rvy_redirect=" . esc_url($_REQUEST['rvy_redirect']) : ''; - load_plugin_textdomain('revisionary', false, RVY_FOLDER . '/languages'); + load_plugin_textdomain('revisionary', false, dirname(plugin_basename(REVISIONARY_FILE)) . '/languages'); $published_url = ($published_post_id) ? get_permalink($published_post_id) : ''; $diff_url = admin_url("revision.php?revision=$revision_id"); diff --git a/revisionary.php b/revisionary.php index a204021b..2ddd2c13 100644 --- a/revisionary.php +++ b/revisionary.php @@ -79,10 +79,11 @@ function($links, $file) if ( is_admin() && strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/plugins.php' ) && ! strpos( urldecode($_SERVER['REQUEST_URI']), 'deactivate' ) ) { add_action('all_admin_notices', function() { - if ( defined( 'RVY_FOLDER' ) ) - $message = sprintf( __( 'Another copy of PublishPress Revisions (or Revisionary) is already activated (version %1$s: "%2$s")', 'revisionary' ), RVY_VERSION, RVY_FOLDER ); - else + if (defined('REVISIONARY_FILE')) { + $message = sprintf( __( 'Another copy of PublishPress Revisions (or Revisionary) is already activated (version %1$s: "%2$s")', 'revisionary' ), RVY_VERSION, dirname(plugin_basename(REVISIONARY_FILE)) ); + } else { $message = sprintf( __( 'Another copy of PublishPress Revisions (or Revisionary) is already activated (version %1$s)', 'revisionary' ), RVY_VERSION ); + } echo "
" . $message . '
'; }, 5); @@ -137,10 +138,11 @@ function() if ( is_admin() && strpos( $_SERVER['SCRIPT_NAME'], 'p-admin/plugins.php' ) && ! strpos( urldecode($_SERVER['REQUEST_URI']), 'deactivate' ) ) { add_action('all_admin_notices', function() { - if ( defined( 'RVY_FOLDER' ) ) - $message = sprintf( __( 'Another copy of PublishPress Revisions (or Revisionary) is already activated (version %1$s: "%2$s")', 'revisionary' ), RVY_VERSION, RVY_FOLDER ); - else + if (defined('REVISIONARY_FILE')) { + $message = sprintf( __( 'Another copy of PublishPress Revisions (or Revisionary) is already activated (version %1$s: "%2$s")', 'revisionary' ), RVY_VERSION, dirname(plugin_basename(REVISIONARY_FILE)) ); + } else { $message = sprintf( __( 'Another copy of PublishPress Revisions (or Revisionary) is already activated (version %1$s)', 'revisionary' ), RVY_VERSION ); + } echo "
" . $message . '
'; }, 5); @@ -206,10 +208,6 @@ function() return; } - // define URL - define ('RVY_BASENAME', plugin_basename(__FILE__) ); - define ('RVY_FOLDER', dirname( plugin_basename(__FILE__) ) ); - require_once( dirname(__FILE__).'/classes/PublishPress/Revisionary.php'); require_once( dirname(__FILE__).'/rvy_init.php'); // Contains activate, deactivate, init functions. Adds mod_rewrite_rules. require_once( dirname(__FILE__).'/functions.php'); @@ -218,13 +216,6 @@ function() if ( defined('RS_DEBUG') && is_admin() && ( strpos( urldecode($_SERVER['REQUEST_URI']), 'p-admin/plugin-editor.php' ) || strpos( urldecode($_SERVER['REQUEST_URI']), 'p-admin/plugins.php' ) ) && false === strpos( $_SERVER['REQUEST_URI'], 'activate' ) ) return; - if ( ! defined('WP_CONTENT_URL') ) - define( 'WP_CONTENT_URL', site_url( 'wp-content', $scheme ) ); - - if ( ! defined('WP_CONTENT_DIR') ) - define( 'WP_CONTENT_DIR', str_replace('\\', '/', ABSPATH) . 'wp-content' ); - - define ('RVY_ABSPATH', WP_CONTENT_DIR . '/plugins/' . RVY_FOLDER); define('RVY_ABSPATH', __DIR__); if (is_admin() && !defined('REVISIONARY_PRO_VERSION')) { diff --git a/rvy_init.php b/rvy_init.php index 3d3ab20b..757c84f6 100644 --- a/rvy_init.php +++ b/rvy_init.php @@ -2,8 +2,8 @@ if ( basename(__FILE__) == basename($_SERVER['SCRIPT_FILENAME']) ) die(); -if (defined('RVY_BASENAME')) { - define( 'RVY_NETWORK', awp_is_mu() && rvy_plugin_active_for_network( RVY_BASENAME ) ); +if (defined('REVISIONARY_FILE')) { + define('RVY_NETWORK', awp_is_mu() && rvy_plugin_active_for_network(plugin_basename(REVISIONARY_FILE))); } add_action('init', 'rvy_status_registrations', 40); From 7b958d72b363e5027dc217c087f23c39def0adf7 Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:54:49 -0400 Subject: [PATCH 22/24] Remove legacy workaround (issue prior to version 2.0.7) --- revisionary.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/revisionary.php b/revisionary.php index 2ddd2c13..3dbcf544 100644 --- a/revisionary.php +++ b/revisionary.php @@ -97,6 +97,7 @@ function($links, $file) register_activation_hook(__FILE__, function() { $current_version = '2.4.1'; + $current_version = '2.4.2'; $last_ver = get_option('revisionary_last_version'); @@ -173,6 +174,7 @@ function() } define('REVISIONARY_VERSION', '2.4.1'); + define('REVISIONARY_VERSION', '2.4.2'); if ( ! defined( 'RVY_VERSION' ) ) { define( 'RVY_VERSION', REVISIONARY_VERSION ); // back compat @@ -181,10 +183,6 @@ function() define ('COLS_ALL_RVY', 0); define ('COL_ID_RVY', 1); - if (!get_option('revisionary_2_install_time')) { - update_option('revisionary_2_install_time', time()); - } - if ( defined('RS_DEBUG') ) { include_once( dirname(__FILE__).'/lib/debug.php'); add_action( 'admin_footer', 'rvy_echo_usage_message' ); From c95812a645216868ed53f5370c482fb26b04498f Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Fri, 23 Oct 2020 15:56:28 -0400 Subject: [PATCH 23/24] Update change log --- readme.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/readme.txt b/readme.txt index 8f68a305..ec329fbb 100644 --- a/readme.txt +++ b/readme.txt @@ -108,6 +108,7 @@ Follow PublishPress on [Facebook](https://www.facebook.com/publishpress), [Twitt * Change : Revision Settings - Revision Queue section, includes "Compatibility Mode" setting to prevent revisions from being hidden from the queue in the case of plugin integration issues * Fixed : "Prevent Revisors from editing others' revisions" setting was not applied * Fixed : Error when Revision submission includes a template setting +* Fixed : Custom plugins path caused PHP error * Fixed : Revison Queue - PHP Notice "Undefined variable: post_id" when URL includes published_post argument * Feature : If Revisors are blocked from editing other users' drafts, those can now be included (unclickable) in Edit Pages if the list_others_pages capability is granted * Feature : Support constant definitions REVISIONARY_DISABLE_SUBMISSION_REDIRECT, REVISIONARY_DISABLE_SCHEDULE_REDIRECT From ecc996eb56b47c4bfe6dfdbcae9c1d7c6a07ef8e Mon Sep 17 00:00:00 2001 From: Kevin Behrens <43488774+agapetry@users.noreply.github.com> Date: Mon, 26 Oct 2020 12:30:20 -0400 Subject: [PATCH 24/24] Release 2.4.2 --- readme.txt | 2 +- revisionary.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/readme.txt b/readme.txt index ec329fbb..35788e6f 100644 --- a/readme.txt +++ b/readme.txt @@ -7,7 +7,7 @@ Tags: revision, submit changes, workflow, collaboration, permissions, moderate, Requires at least: 4.9.7 Requires PHP: 5.6.20 Tested up to: 5.5 -Stable tag: 2.4.1 +Stable tag: 2.4.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html diff --git a/revisionary.php b/revisionary.php index 3dbcf544..ecbcdd21 100644 --- a/revisionary.php +++ b/revisionary.php @@ -5,7 +5,7 @@ * Description: Maintain published content with teamwork and precision using the Revisions model to submit, approve and schedule changes. * Author: PublishPress * Author URI: https://publishpress.com - * Version: 2.4.1 + * Version: 2.4.2 * Text Domain: revisionary * Domain Path: /languages/ * Min WP Version: 4.9.7 @@ -96,7 +96,6 @@ function($links, $file) // register these functions before any early exits so normal activation/deactivation can still run with RS_DEBUG register_activation_hook(__FILE__, function() { - $current_version = '2.4.1'; $current_version = '2.4.2'; $last_ver = get_option('revisionary_last_version'); @@ -173,7 +172,6 @@ function() return; } - define('REVISIONARY_VERSION', '2.4.1'); define('REVISIONARY_VERSION', '2.4.2'); if ( ! defined( 'RVY_VERSION' ) ) {