Skip to content

Commit

Permalink
Crio pro issue 137 (#526)
Browse files Browse the repository at this point in the history
* add alt-logo class to alt-logos

* fix bg-repeat issue when changing logo size

* update version and readme

* update version for stable
  • Loading branch information
jamesros161 authored May 8, 2023
1 parent 6a46bb3 commit 1757670
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
15 changes: 8 additions & 7 deletions assets/js/builder/controls/element/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ BOLDGRID.EDITOR.CONTROLS = BOLDGRID.EDITOR.CONTROLS || {};

if ( 'cover' === hoverBgSize ) {
hoverBgSize =
'background-size: cover !important; background-repeat: "unset !important";';
'background-size: cover !important; background-repeat: "no-repeat !important";';
} else {
hoverBgSize =
'background-size: auto auto !important; background-repeat: repeat !important;';
'background-size: auto auto !important; background-repeat: repeat !important;';
}

if ( hoverOverlay && hoverBgUrl ) {
Expand Down Expand Up @@ -406,7 +406,7 @@ BOLDGRID.EDITOR.CONTROLS = BOLDGRID.EDITOR.CONTROLS || {};

css = `.${
hoverBgClassName
}:hover {background-size: cover !important; background-position: 50%, 50% !important;}`;
}:hover {background-size: cover !important; background-repeat: no-repeat !important; background-position: 50%, 50% !important;}`;
self._addHeadingStyle( hoverBgClassName + '-bg-size', css );

css = '@media screen and (max-width: 991px) {';
Expand Down Expand Up @@ -1022,14 +1022,14 @@ BOLDGRID.EDITOR.CONTROLS = BOLDGRID.EDITOR.CONTROLS || {};
css =
'.' +
hoverBgId +
':hover { background-size: auto auto !important; background-repeat: repeat !important; }';
':hover { background-size: auto auto !important; background-repeat: repeat !important; }';
self._addHeadingStyle( hoverBgId + '-bg-size', css );
$target.attr( 'data-hover-bg-size', 'tiled' );
} else if ( 'cover' == $this.val() ) {
} else {
css =
'.' +
hoverBgId +
':hover { background-size: cover !important; background-repeat: "unset !important"; }';
':hover { background-size: cover !important; background-repeat: "no-repeat !important"; }';
self._addHeadingStyle( hoverBgId + '-bg-size', css );
$target.attr( 'data-hover-bg-size', 'cover' );
}
Expand All @@ -1045,7 +1045,7 @@ BOLDGRID.EDITOR.CONTROLS = BOLDGRID.EDITOR.CONTROLS || {};
BG.Controls.addStyle( $target, 'background-repeat', 'repeat' );
} else if ( 'cover' === $this.val() ) {
BG.Controls.addStyle( $target, 'background-size', 'cover' );
BG.Controls.addStyle( $target, 'background-repeat', 'unset' );
BG.Controls.addStyle( $target, 'background-repeat', 'no-repeat' );
}
} );
},
Expand Down Expand Up @@ -1343,6 +1343,7 @@ BOLDGRID.EDITOR.CONTROLS = BOLDGRID.EDITOR.CONTROLS || {};
BG.Controls.addStyle( $target, 'background', '' );
self.updateBackgroundImage();
BG.Controls.addStyle( $target, 'background-size', 'cover' );
BG.Controls.addStyle( $target, 'background-repeat', 'no-repeat' );
BG.Controls.addStyle( $target, 'background-position', '50% 50%' );
}
},
Expand Down
4 changes: 2 additions & 2 deletions includes/Widget/Logo.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function update( $new_instance, $old_instance ) {
*/
public function widget( $args, $instance ) {
$logo_switch_val = isset( $instance['bgc_logo_switch'] ) ? $instance['bgc_logo_switch'] : 'site_logo';
$alt_logo = isset( $instance['bgc_alt_logo'] );
$alt_logo = ! empty( $instance['bgc_alt_logo'] );
if ( 'site_logo' === $logo_switch_val ) {
$logo_id = get_theme_mod( 'custom_logo' );
} else {
Expand All @@ -94,7 +94,7 @@ public function widget( $args, $instance ) {

$align_class = ! empty( $instance['bgc_logo_alignment'] ) ? $this->get_align_class( $instance['bgc_logo_alignment'] ) : 'center';

echo '<a class="bgc_logo' . ( $alt_logo ? '' : ' custom-logo-link' ) . '" style="display:flex;justify-content:' . $align_class . ';" href="'. get_home_url() . '">';
echo '<a class="bgc_logo' . ( $alt_logo ? ' alt-logo' : ' custom-logo-link' ) . '" style="display:flex;justify-content:' . $align_class . ';" href="'. get_home_url() . '">';
if ( wp_get_attachment_image( $logo_id, 'full' ) ) {
echo wp_get_attachment_image( $logo_id, 'full', false, array( 'class' => 'custom-logo' ) );
} else {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "boldgrid-editor",
"version": "1.23.1",
"version": "1.23.2",
"description": "Post and Page Builder is a standalone plugin which adds functionality to the existing TinyMCE Editor.",
"main": "assets/js/editor.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion post-and-page-builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Post and Page Builder
* Plugin URI: https://www.boldgrid.com/boldgrid-editor/?utm_source=ppb-wp-repo&utm_medium=plugin-uri&utm_campaign=ppb
* Description: Customized drag and drop editing for posts and pages. The Post and Page Builder adds functionality to the existing TinyMCE Editor to give you easier control over your content.
* Version: 1.23.1
* Version: 1.23.2
* Author: BoldGrid <[email protected]>
* Author URI: https://www.boldgrid.com/?utm_source=ppb-wp-repo&utm_medium=author-uri&utm_campaign=ppb
* Text Domain: boldgrid-editor
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
Contributors: boldgrid, rramo012, imh_brad, joemoto, timph, bgnicolepaschen, jamesros161
Tags: boldgrid, page builder, drag and drop, tinymce, editor, landing page
Requires at least: 4.7
Tested up to: 6.1
Tested up to: 6.2
Requires PHP: 5.4
Stable tag: 1.23.1
Stable tag: 1.23.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -134,6 +134,9 @@ WordPress Editor.

== Changelog ==

= 1.23.2 =
* Update: Support patch for Crio Premium's logo resizing tool [#526](https://github.com/BoldGrid/post-and-page-builder/pull/526)

= 1.23.1=
* Bug Fix: Remove 'Used Blocks' option from Add Block screen [#401](https://github.com/BoldGrid/post-and-page-builder/issues/401)
* Bug Fix: border-width: 0 added to elements randomly [#459](https://github.com/BoldGrid/post-and-page-builder/issues/459)
Expand Down

0 comments on commit 1757670

Please sign in to comment.