Skip to content

Commit

Permalink
Merge pull request #1356 from publishpress/release-3.5.14
Browse files Browse the repository at this point in the history
Release 3.5.14
  • Loading branch information
agapetry authored Sep 26, 2024
2 parents 4efbceb + a72579e commit 5f0a814
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 139 deletions.
2 changes: 2 additions & 0 deletions admin/admin-posts_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ function revisions_row_action_link($actions = array()) {
$redirect_arg = ( ! empty($_REQUEST['rvy_redirect']) ) ? "&rvy_redirect=" . esc_url_raw($_REQUEST['rvy_redirect']) : '';
$url = rvy_admin_url("admin.php?page=rvy-revisions&post={$post->ID}&action=revise{$referer_arg}$redirect_arg");

$url = remove_query_arg(['post_status', 'action', 'cat', 'seo-filter', 'schema-filter', 'paged', 'action2'], $url);

$caption = (isset($actions['edit']) || !rvy_get_option('caption_copy_as_edit')) ? pp_revisions_status_label('draft-revision', 'submit') : esc_html__('Edit');
$caption = str_replace(' ', ' ', $caption);

Expand Down
9 changes: 8 additions & 1 deletion admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ function options_ui( $sitewide = false, $customize_defaults = false ) {
'caption_copy_as_edit' => sprintf(esc_html__('Posts / Pages list: Use "Edit" caption for %s link', 'revisionary'), pp_revisions_status_label('draft-revision', 'submit_short')),
'pending_revisions' => sprintf(esc_html__('Enable %s', 'revisionary'), $pending_revision_plural),
'revision_limit_per_post' => esc_html__("Limit to one active revision per post", 'revisionary'),
'revision_unfiltered_html_check' => esc_html__("If post contains custom html, require unfiltered_html capability", 'revisionary'),
'auto_submit_revisions' => esc_html__("Auto-submit revisions created by a user with publishing capability", 'revisionary'),
'scheduled_revisions' => sprintf(esc_html__('Enable %s', 'revisionary'), pp_revisions_status_label('future-revision', 'plural')),
'revise_posts_capability' => rvy_get_option('revision_statuses_noun_labels') ? esc_html__("Additional role capability required to submit a Change Request", 'revisionary') : esc_html__("Additional role capability required to submit a revision", 'revisionary'),
Expand Down Expand Up @@ -179,7 +180,7 @@ function options_ui( $sitewide = false, $customize_defaults = false ) {
'post_types' => ['enabled_post_types'],
'role_definition' => ['revisor_role_add_custom_rolecaps', 'require_edit_others_drafts'],
'revision_statuses' => ['revision_statuses_noun_labels'],
'working_copy' => ['manage_unsubmitted_capability', 'copy_posts_capability', 'revision_limit_per_post', 'auto_submit_revisions', 'caption_copy_as_edit'],
'working_copy' => ['manage_unsubmitted_capability', 'copy_posts_capability', 'revision_limit_per_post', 'revision_unfiltered_html_check', 'auto_submit_revisions', 'caption_copy_as_edit'],
'scheduled_revisions' => ['scheduled_revisions', 'scheduled_publish_cron', 'async_scheduled_publish', 'wp_cron_usage_detected', 'scheduled_revision_update_post_date', 'scheduled_revision_update_modified_date'],
'pending_revisions' => ['pending_revisions', 'revise_posts_capability', 'pending_revision_update_post_date', 'pending_revision_update_modified_date'],
'revision_queue' => ['revisor_lock_others_revisions', 'revisor_hide_others_revisions', 'admin_revisions_to_own_posts', 'list_unsubmitted_revisions'],
Expand Down Expand Up @@ -524,6 +525,12 @@ function options_ui( $sitewide = false, $customize_defaults = false ) {
<br />
<?php
$this->option_checkbox( 'revision_limit_per_post', $tab, $section, '', '' );

?>
<br />
<?php
$hint = esc_html__('If disabled, revision by a user who does not have the unfiltered_html capability will cause all custom html tags to be stripped out.', 'revisionary');
$this->option_checkbox( 'revision_unfiltered_html_check', $tab, $section, $hint, '' );
?>

<br />
Expand Down
2 changes: 2 additions & 0 deletions defaults_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ function rvy_default_options_sitewide() {
'revision_archive_deletion' => true,
'revision_restore_require_cap' => true,
'revision_limit_per_post' => true,
'revision_unfiltered_html_check' => true,
);

if ( $other_options = array_diff_key( rvy_default_options(), $def ) ) {
Expand Down Expand Up @@ -123,6 +124,7 @@ function rvy_default_options() {
'revision_archive_deletion' => 0,
'revision_restore_require_cap' => 0,
'revision_limit_per_post' => 0,
'revision_unfiltered_html_check' => 1,
);

return $def;
Expand Down
Loading

0 comments on commit 5f0a814

Please sign in to comment.