Skip to content

Commit

Permalink
Merge pull request #1384 from publishpress/release-3.5.16
Browse files Browse the repository at this point in the history
Release 3.5.16
  • Loading branch information
agapetry authored Nov 19, 2024
2 parents a89b26f + e47552b commit eb3d910
Show file tree
Hide file tree
Showing 11 changed files with 1,167 additions and 1,078 deletions.
12 changes: 11 additions & 1 deletion admin/admin-init_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ function rvy_load_textdomain() {
if ( defined('RVY_TEXTDOMAIN_LOADED') )
return;

load_plugin_textdomain('revisionary', false, dirname(plugin_basename(REVISIONARY_FILE)) . '/languages');
if (did_action('init')) {
load_plugin_textdomain('revisionary', false, dirname(plugin_basename(REVISIONARY_FILE)) . '/languages');
} else {
add_action(
'init',
function() {
load_plugin_textdomain('revisionary', false, dirname(plugin_basename(REVISIONARY_FILE)) . '/languages');
},
5
);
}

define('RVY_TEXTDOMAIN_LOADED', true);
}
Expand Down
13 changes: 12 additions & 1 deletion admin/history_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ public function actAjaxRevisionDiffs() {
return;
}

if (!current_user_can('edit_post', $revision_id) && !current_user_can('read_post', $revision_id)) {
return;
}

$return = array();
@set_time_limit( 0 );

Expand Down Expand Up @@ -854,7 +858,14 @@ private function prepare_revisions_for_js( $post, $selected_revision_id, $from =

$revisions = [$post->ID => $post] + $revisions;

foreach ( $revisions as $revision ) {
$is_administrator = is_content_administrator_rvy();

foreach ( $revisions as $k => $revision ) {
if (!$is_administrator && !current_user_can('edit_post', $revision->ID) && !current_user_can('read_post', $revision->ID)) {
unset($revisions[$k]);
continue;
}

$modified = strtotime( $revision->post_modified );
$modified_gmt = strtotime( $revision->post_modified_gmt . ' +0000' );

Expand Down
Binary file modified languages/revisionary-es_ES.mo
Binary file not shown.
Loading

0 comments on commit eb3d910

Please sign in to comment.