Skip to content

Commit

Permalink
Merge pull request #1308 from publishpress/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
htmgarcia authored Aug 10, 2023
2 parents f380309 + 8f320da commit 97b2bc2
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/advanced-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: PublishPress Blocks
* Plugin URI: https://publishpress.com/blocks/
* Description: PublishPress Blocks has everything you need to build professional websites with the Gutenberg editor.
* Version: 3.1.5
* Version: 3.1.6
* Author: PublishPress
* Author URI: https://publishpress.com/
* Text Domain: advanced-gutenberg
Expand Down Expand Up @@ -70,7 +70,7 @@
if (! defined('ADVANCED_GUTENBERG_LOADED')) {

if (! defined('ADVANCED_GUTENBERG_VERSION')) {
define('ADVANCED_GUTENBERG_VERSION', '3.1.5');
define('ADVANCED_GUTENBERG_VERSION', '3.1.6');
}

if (! defined('ADVANCED_GUTENBERG_PLUGIN')) {
Expand Down
12 changes: 8 additions & 4 deletions src/incl/advanced-gutenberg-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ public function subAdminPages()
],
[
'slug' => 'edit.php?post_type=wp_block',
'title' => esc_html__( 'Reusable Blocks', 'advanced-gutenberg' ),
'title' => esc_html__( 'Synced Patterns', 'advanced-gutenberg' ),
'callback' => '',
'order' => 7,
'enabled' => $this->settingIsEnabled( 'reusable_blocks' )
Expand Down Expand Up @@ -4375,7 +4375,7 @@ public function advgb_SetStylesForBlocks($blockAttrs, $blockName)
wp_enqueue_script(
'advgb_testimonial_frontend',
plugins_url( 'assets/blocks/testimonial/frontend.js', dirname( __FILE__ ) ),
[],
['jquery'],
ADVANCED_GUTENBERG_VERSION
);

Expand Down Expand Up @@ -5032,12 +5032,14 @@ public function advgb_AdvancedSearchBarStyles($blockAttrs)
*/
public function advgb_AdvancedImageStyles($blockAttrs)
{
$style_html = '';

if (array_key_exists('blockIDX', $blockAttrs)) {
$block_class = esc_html($blockAttrs['blockIDX']);
$default_opacity = isset($blockAttrs['defaultOpacity']) ? esc_html($blockAttrs['defaultOpacity']) : 40;
$hover_opacity = isset($blockAttrs['overlayOpacity']) ? esc_html($blockAttrs['overlayOpacity']) : 20;

$style_html = '.' . $block_class . '.advgb-image-block .advgb-image-overlay{';
$style_html .= '.' . $block_class . '.advgb-image-block .advgb-image-overlay{';
$style_html .= 'opacity:' . ($default_opacity / 100) . ' !important;';
$style_html .= '}';

Expand All @@ -5058,11 +5060,13 @@ public function advgb_AdvancedImageStyles($blockAttrs)
*/
public function advgb_AdvancedTestimonialStyles($blockAttrs)
{
$style_html = '';

if (array_key_exists('pid', $blockAttrs)) {
$block_id = $blockAttrs['pid'];
$dots_color = isset($blockAttrs['sliderDotsColor']) ? $blockAttrs['sliderDotsColor'] : '#000';

$style_html = '#' . $block_id . ' .slick-dots li button:before{';
$style_html .= '#' . $block_id . ' .slick-dots li button:before{';
$style_html .= 'color:' . $dots_color . ' !important;';
$style_html .= '}';
}
Expand Down
4 changes: 2 additions & 2 deletions src/incl/pages/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
],
[
'name' => 'reusable_blocks',
'title' => __( 'Reusable Blocks', 'advanced-gutenberg' ),
'title' => __( 'Synced Patterns', 'advanced-gutenberg' ),
'description' => __(
'This feature enables a submenu to manage Reusable Blocks.', 'advanced-gutenberg'
'This feature enables a submenu to manage your Synced Patterns.', 'advanced-gutenberg'
),
'default' => 1,
'access' => true
Expand Down
7 changes: 6 additions & 1 deletion src/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: publishpress, stevejburge, htmgarcia
Tags: gutenberg, gutenberg blocks, gutenberg block, block editor, blocks, accordion block, gallery block, slider block, tabs block, maps block, block controls
Requires at least: 5.5
Tested up to: 6.3
Stable tag: 3.1.5
Stable tag: 3.1.6
Requires PHP: 7.2.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -270,6 +270,11 @@ Yes, we use the phrase "publishpress-advg-install" to share install links. You w

== Changelog ==

= 3.1.6 - 10 Aug 2023 =
* Fix: Undeclared $style_html variable
* Fix: Add jQuery as dependency when enqueueing frontend.js in frontend for Testimonial block
* Change: "Reusable Blocks" admin submenu to "Synced Patterns"

= 3.1.5 - 25 Jul 2023 =
* Fix: post-sidebar.js enqueue in post and page edit only
* Fix: lightbox should apply to galleries when "Link to" is "media file"
Expand Down

0 comments on commit 97b2bc2

Please sign in to comment.