Skip to content

Commit

Permalink
Merge pull request #580 from publishpress/release-3.0.6
Browse files Browse the repository at this point in the history
Release 3.0.6
  • Loading branch information
agapetry authored Nov 29, 2021
2 parents cdcb763 + ffee039 commit 2f09e33
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 41 deletions.
2 changes: 1 addition & 1 deletion admin/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function options_ui( $sitewide = false, $customize_defaults = false ) {
$this->form_options[$tab_name][$section_name] = array_intersect( $this->form_options[$tab_name][$section_name], array_keys($rvy_options_sitewide) );
} elseif ('license' != $section_name) {
$this->form_options[$tab_name][$section_name] = array_diff( $this->form_options[$tab_name][$section_name], array_keys($rvy_options_sitewide) );
}
}
}
}

Expand Down
7 changes: 7 additions & 0 deletions admin/post-editor-workflow-ui_rvy.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,13 @@ public static function postLinkParams($args = []) {
'scheduledURL' => rvy_nc_url( add_query_arg('get_new_revision', $post->ID, get_permalink($post->ID))),
'update' => __('Update', 'revisionary'),
));

if (empty($vars['actionCaption'])) {
$vars = array_merge($vars, array(
'actionCaption' => '',
'ajaxurl' => rvy_admin_url(''),
));
}
}

return $vars;
Expand Down
3 changes: 2 additions & 1 deletion admin/rvy_post-block-edit.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ jQuery(document).ready( function($) {

var RvySubmissionUI = function() {
if (rvyObjEdit.ajaxurl && !$('button.revision-approve').length) {
var style = (rvyObjEdit.actionCaption == '') ? ' style="display:none"' : '';

var html = '<div class="rvy-creation-ui"><a href="javascript:void(0)" class="revision-approve" title="'
+ rvyObjEdit.actionTitle + '"><button type="button" class="components-button revision-approve revision-create is-primary ppr-purple-button">'
+ rvyObjEdit.actionTitle + '"' + style + '><button type="button" class="components-button revision-approve revision-create is-primary ppr-purple-button"' + style + '>'
+ rvyObjEdit.actionCaption + '</button></a>'

+ '<div class="revision-creating" style="display: none;">'
Expand Down
4 changes: 2 additions & 2 deletions admin/rvy_post-block-edit.js

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

12 changes: 9 additions & 3 deletions admin/rvy_post-classic-edit.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
jQuery(document).ready( function($) {
var RvySubmissionUI = function() {
if (rvyObjEdit.ajaxurl && !$('div.rvy-creation-ui').length) {

var html = '<div class="rvy-creation-ui"><a href="javascript:void(0)" class="button revision-approve revision-create" style="margin-top: 15px; margin-bottom: 15px" title="'
var hideStyle = (rvyObjEdit.actionCaption == '') ? ' style="display:none"' : '';

var html = '<div class="rvy-creation-ui"' + hideStyle + '><a href="javascript:void(0)" class="button revision-approve revision-create" style="margin-top: 15px; margin-bottom: 15px" title="'
+ rvyObjEdit.actionTitle + '">'
+ rvyObjEdit.actionCaption + '</a>'

Expand Down Expand Up @@ -192,14 +193,19 @@ jQuery(document).ready( function($) {
if ((tdiff > 1000)) {
RvySelectedFutureDate = true;

$('.rvy-creation-ui').show();
$('.rvy-creation-ui .revision-create').hide();
$('.rvy-creation-ui .revision-created-wrapper').hide();
$('.rvy-creation-ui .revision-scheduled-wrapper').hide();
$('.rvy-creation-ui .revision-schedule').show();

$('#publish').hide();

} else {

if ('' == rvyObjEdit.actionCaption) {
$('.rvy-creation-ui').hide();
}

$('.rvy-creation-ui .revision-schedule').hide();
$('.rvy-creation-ui .revision-scheduled-wrapper').hide();
$('.rvy-creation-ui .revision-created-wrapper').hide();
Expand Down
7 changes: 4 additions & 3 deletions admin/rvy_post-classic-edit.js

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

5 changes: 3 additions & 2 deletions admin/rvy_revision-block-edit.js

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

Loading

0 comments on commit 2f09e33

Please sign in to comment.