Skip to content

Commit

Permalink
Merge branch 'release/2.14.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Misplon committed Oct 8, 2021
2 parents bc1a2ec + 2968428 commit 6854741
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 2 additions & 1 deletion inc/styles.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,8 @@ static function filter_css_object( $css, $panels_data, $post_id, $layout ) {
) {
$selector[] = '.panel-has-style > .panel-row-style > .so-panels-full-wrapper';
} else {
$selector[] = '.panel-has-style > .panel-row-style, .panel-no-style';
$selector[] = '.panel-has-style > .panel-row-style';
$selector[] = '.panel-no-style';
}

$css->add_row_css(
Expand Down
2 changes: 1 addition & 1 deletion inc/widget-shortcode.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static function widget_html( $html, $widget, $args, $instance ){
}

static function encode_data( $data ){
return '<input type="hidden" value="' . esc_attr( json_encode( $data, JSON_UNESCAPED_UNICODE ) ) . '" />';
return '<input type="hidden" value="' . esc_textarea( json_encode( $data, JSON_UNESCAPED_UNICODE ) ) . '" />';
}

static function decode_data( $string ){
Expand Down
24 changes: 23 additions & 1 deletion js/siteorigin-panels/view/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,29 @@ module.exports = Backbone.View.extend( {

// Display the live editor button in the toolbar
if ( this.liveEditor.hasPreviewUrl() ) {
this.$( '.so-builder-toolbar .so-live-editor' ).show();
var addLEButton = false;
if ( ! panels.helpers.editor.isBlockEditor() ) {
addLEButton = true;
} else if ( wp.data.select( 'core/editor' ).getEditedPostAttribute( 'status' ) != 'auto-draft' ) {
addLEButton = true;
} else {
// Block Editor powered page that's an auto draft. To avoid a 404, we need to save the draft.
$( '.editor-post-save-draft' ).trigger( 'click' );
var openLiveEditorAfterSave = setInterval( function() {
if (
! wp.data.select('core/editor').isSavingPost() &&
! wp.data.select('core/editor').isAutosavingPost() &&
wp.data.select('core/editor').didPostSaveRequestSucceed()
) {
clearInterval( openLiveEditorAfterSave );
this.$( '.so-builder-toolbar .so-live-editor' ).show();
}
}.bind( this ), 250 );
}

if ( addLEButton ) {
this.$( '.so-builder-toolbar .so-live-editor' ).show();
}
}

this.trigger( 'builder_live_editor_added' );
Expand Down
5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ SiteOrigin Premium includes access to our professional email support service, pe

== Changelog ==

= 2.14.2 - 08 October 2021 =
* Layout Block: Force a draft before displaying the Live Editor button.
* Fixed `Cell Vertical Alignment` setting.
* Developer: Prevented potential notice when processing Page Builder fallback shortcode.

= 2.14.1 - 01 October 2021 =
* Layout Block: Restored Live Editor and History functionality.
* Ensured Cell Vertical Alignment doesn't stretch independently of the setting chosen.
Expand Down

0 comments on commit 6854741

Please sign in to comment.