Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 1.8.2 #1100

Merged
merged 10 commits into from
Aug 15, 2023
2 changes: 1 addition & 1 deletion dist/blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-rich-text'), 'version' => 'c86a2d26cd38afd44e97');
<?php return array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives', 'wp-rich-text'), 'version' => 'fda41331ac8ec0795fbf');
2 changes: 1 addition & 1 deletion dist/blocks.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,9 @@ function generateblocks_filter_images( $content, $attributes ) {

// Add 'loading' attribute if applicable.
if ( wp_lazy_loading_enabled( 'img', '' ) && false === strpos( $content, ' loading=' ) ) {
$content = wp_img_tag_add_loading_attr( $content, '' );
$content = function_exists( 'wp_img_tag_add_loading_optimization_attrs' )
? wp_img_tag_add_loading_optimization_attrs( $content, '' )
: wp_img_tag_add_loading_attr( $content, '' );
}

return $content;
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": "generateblocks",
"version": "1.8.1",
"version": "1.8.2",
"private": true,
"description": "A small collection of lightweight WordPress blocks that can accomplish nearly anything.",
"author": "Tom Usborne",
Expand Down
4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: A small collection of lightweight WordPress blocks that can accomplish nearly anything.
* Author: Tom Usborne
* Author URI: https://tomusborne.com
* Version: 1.8.1
* Version: 1.8.2
* Requires at least: 5.9
* Requires PHP: 7.2
* License: GPL2+
Expand All @@ -19,7 +19,7 @@
exit; // Exit if accessed directly.
}

define( 'GENERATEBLOCKS_VERSION', '1.8.1' );
define( 'GENERATEBLOCKS_VERSION', '1.8.2' );
define( 'GENERATEBLOCKS_DIR', plugin_dir_path( __FILE__ ) );
define( 'GENERATEBLOCKS_DIR_URL', plugin_dir_url( __FILE__ ) );

Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: edge22
Donate link: https://generateblocks.com
Tags: blocks, gutenberg, container, headline, grid, columns, page builder, wysiwyg, block editor, query, loop, posts
Requires at least: 5.9
Tested up to: 6.2
Tested up to: 6.3
Requires PHP: 7.2
Stable tag: 1.8.1
Stable tag: 1.8.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -83,6 +83,10 @@ GenerateBlocks was built to work hand-in-hand with [GeneratePress](https://gener

== Changelog ==

= 1.8.2 =
* Fix: Border colors not showing when old attributes are set.
* Tweak: Add support for the newly created core function "wp_img_tag_add_loading_optimization_attrs"

= 1.8.1 =
* Fix: Icon padding controls order
* Fix: Global styles overwriting local attributes
Expand Down
2 changes: 1 addition & 1 deletion src/extend/inspector-control/controls/borders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default function Borders( { attributes, setAttributes } ) {
} }
/>

{ !! bordersPanel.borderColors.length && 'Desktop' === device && ! attributes.borderColor && ! attributes.borderColorHover && ! attributes.borderColorCurrent &&
{ !! bordersPanel.borderColors.length && 'Desktop' === device &&
<div className="gblocks-border-colors">
{ bordersPanel.borderColors.map( ( borderColor, index ) => {
return (
Expand Down