Gutenberg Blocks – Ultimate Addons for Gutenberg - Version 1.23.2

Version Description

  • Fix: Table of Contents: Headings with HTML tags are not visible on the frontend.
  • Fix: Table of Contents - Question marks are rendered in place of UTF-8 characters for few languages in Heading.
  • Fix: Section - Full-Width option not being applied on the front-end according to theme content width.
  • Fix: Post Layouts - Showing post content instead of post except on the front-end.
Download this release

Release Info

Developer brainstormworg
Plugin Icon Gutenberg Blocks – Ultimate Addons for Gutenberg
Version 1.23.2
Comparing to
See all releases

Code changes from version 1.23.1 to 1.23.2

assets/js/table-of-contents.js CHANGED
@@ -21,7 +21,7 @@
21
  .replace(/[^a-z0-9 -_]/gi,'') // Keep only alphnumeric, space, -, _
22
  .replace(/&(mdash;)/g, '') // Remove long dash
23
  .replace(/\s+/g, '-') // Replace spaces with -
24
- .replace(/[&\/\\#,^!+()$~%.\[\]'":*?<>{}@‘’”“|]/g, '') // Remove special chars
25
  .replace(/\-\-+/g, '-') // Replace multiple - with single -
26
  .replace(/^-+/, '') // Trim - from start of text
27
  .replace(/-+$/, ''); // Trim - from end of text
21
  .replace(/[^a-z0-9 -_]/gi,'') // Keep only alphnumeric, space, -, _
22
  .replace(/&(mdash;)/g, '') // Remove long dash
23
  .replace(/\s+/g, '-') // Replace spaces with -
24
+ .replace(/[&\/\\#,^!+()$~%.\[\]'":*?;<>{}@‘’”“|]/g, '') // Remove special chars
25
  .replace(/\-\-+/g, '-') // Replace multiple - with single -
26
  .replace(/^-+/, '') // Trim - from start of text
27
  .replace(/-+$/, ''); // Trim - from end of text
blocks-config/post/class-uagb-post.php CHANGED
@@ -1425,7 +1425,7 @@ if ( ! class_exists( 'UAGB_Post' ) ) {
1425
  */
1426
  public function get_excerpt_by_id( $post_id, $length ) {
1427
  $the_post = get_post( $post_id ); // Gets post ID.
1428
- $the_excerpt = ( $the_post ? $the_post->post_content : null ); // Gets post_content to be used as a basis for the excerpt.
1429
  $the_excerpt = wp_strip_all_tags( strip_shortcodes( $the_excerpt ) ); // Strips tags and images.
1430
  $words = explode( ' ', $the_excerpt, $length + 1 );
1431
 
1425
  */
1426
  public function get_excerpt_by_id( $post_id, $length ) {
1427
  $the_post = get_post( $post_id ); // Gets post ID.
1428
+ $the_excerpt = ( ( $the_post->post_excerpt ) ? $the_post->post_excerpt : $the_post->post_content ); // Gets post_content to be used as a basis for the excerpt.
1429
  $the_excerpt = wp_strip_all_tags( strip_shortcodes( $the_excerpt ) ); // Strips tags and images.
1430
  $words = explode( ' ', $the_excerpt, $length + 1 );
1431
 
blocks-config/table-of-content/class-uagb-table-of-content.php CHANGED
@@ -125,15 +125,7 @@ if ( ! class_exists( 'UAGB_Table_Of_Content' ) ) {
125
  // supported by ISO-8859-1 as HTML entities. However, this function also
126
  // converts all special characters like < or > to HTML entities, so we use
127
  // htmlspecialchars_decode to decode them.
128
- htmlspecialchars_decode(
129
- htmlentities(
130
- '<html><body>' . $content . '</body></html>',
131
- ENT_COMPAT,
132
- 'UTF-8',
133
- false
134
- ),
135
- ENT_COMPAT
136
- )
137
  );
138
 
139
  // We're done parsing, so we can disable user error handling. This also
@@ -158,7 +150,7 @@ if ( ! class_exists( 'UAGB_Table_Of_Content' ) ) {
158
  // Get all non-empty heading elements in the post content.
159
  $headings = iterator_to_array(
160
  $xpath->query(
161
- '//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6][text()!=""]'
162
  )
163
  );
164
 
@@ -216,6 +208,7 @@ if ( ! class_exists( 'UAGB_Table_Of_Content' ) ) {
216
  * @return string $string.
217
  */
218
  public function clean( $string ) {
 
219
  $string = preg_replace( '/[\x00-\x1F\x7F]*/u', '', $string );
220
  $string = str_replace( array( '&amp;', '&nbsp;' ), ' ', $string );
221
  // Remove all except alphbets, space, `-` and `_`.
125
  // supported by ISO-8859-1 as HTML entities. However, this function also
126
  // converts all special characters like < or > to HTML entities, so we use
127
  // htmlspecialchars_decode to decode them.
128
+ '<html><body>' . $content . '</body></html>'
 
 
 
 
 
 
 
 
129
  );
130
 
131
  // We're done parsing, so we can disable user error handling. This also
150
  // Get all non-empty heading elements in the post content.
151
  $headings = iterator_to_array(
152
  $xpath->query(
153
+ '//*[self::h1 or self::h2 or self::h3 or self::h4 or self::h5 or self::h6]'
154
  )
155
  );
156
 
208
  * @return string $string.
209
  */
210
  public function clean( $string ) {
211
+
212
  $string = preg_replace( '/[\x00-\x1F\x7F]*/u', '', $string );
213
  $string = str_replace( array( '&amp;', '&nbsp;' ), ' ', $string );
214
  // Remove all except alphbets, space, `-` and `_`.
classes/class-uagb-front-assets.php CHANGED
@@ -57,7 +57,7 @@ class UAGB_Front_Assets {
57
  */
58
  public function __construct() {
59
 
60
- add_action( 'wp', array( $this, 'set_initial_variables' ), 5 );
61
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_asset_files' ) );
62
  }
63
 
57
  */
58
  public function __construct() {
59
 
60
+ add_action( 'wp', array( $this, 'set_initial_variables' ), 99 );
61
  add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_asset_files' ) );
62
  }
63
 
classes/class-uagb-loader.php CHANGED
@@ -66,7 +66,7 @@ if ( ! class_exists( 'UAGB_Loader' ) ) {
66
  define( 'UAGB_BASE', plugin_basename( UAGB_FILE ) );
67
  define( 'UAGB_DIR', plugin_dir_path( UAGB_FILE ) );
68
  define( 'UAGB_URL', plugins_url( '/', UAGB_FILE ) );
69
- define( 'UAGB_VER', '1.23.1' );
70
  define( 'UAGB_MODULES_DIR', UAGB_DIR . 'modules/' );
71
  define( 'UAGB_MODULES_URL', UAGB_URL . 'modules/' );
72
  define( 'UAGB_SLUG', 'uag' );
66
  define( 'UAGB_BASE', plugin_basename( UAGB_FILE ) );
67
  define( 'UAGB_DIR', plugin_dir_path( UAGB_FILE ) );
68
  define( 'UAGB_URL', plugins_url( '/', UAGB_FILE ) );
69
+ define( 'UAGB_VER', '1.23.2' );
70
  define( 'UAGB_MODULES_DIR', UAGB_DIR . 'modules/' );
71
  define( 'UAGB_MODULES_URL', UAGB_URL . 'modules/' );
72
  define( 'UAGB_SLUG', 'uag' );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: gutenberg, blocks, gutenberg blocks, editor, block
5
  Requires at least: 4.7
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
- Stable tag: 1.23.1
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -168,6 +168,12 @@ The awesome React FontIconPicker is developed by [Alessandro Benoit](http://code
168
 
169
  == Changelog ==
170
 
 
 
 
 
 
 
171
  = 1.23.1 =
172
  * Fix: Broken path while generating assets (CSS/JS).
173
  * Fix: Table of Contents - Heading convert to question marks on the frontend.
5
  Requires at least: 4.7
6
  Requires PHP: 5.6
7
  Tested up to: 5.7
8
+ Stable tag: 1.23.2
9
  License: GPLv2 or later
10
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
11
 
168
 
169
  == Changelog ==
170
 
171
+ = 1.23.2 =
172
+ * Fix: Table of Contents: Headings with HTML tags are not visible on the frontend.
173
+ * Fix: Table of Contents - Question marks are rendered in place of UTF-8 characters for few languages in Heading.
174
+ * Fix: Section - Full-Width option not being applied on the front-end according to theme content width.
175
+ * Fix: Post Layouts - Showing post content instead of post except on the front-end.
176
+
177
  = 1.23.1 =
178
  * Fix: Broken path while generating assets (CSS/JS).
179
  * Fix: Table of Contents - Heading convert to question marks on the frontend.
ultimate-addons-for-gutenberg.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin URI: https://www.brainstormforce.com
5
  * Author: Brainstorm Force
6
  * Author URI: https://www.brainstormforce.com
7
- * Version: 1.23.1
8
  * Description: The Ultimate Addons for Gutenberg extends the Gutenberg functionality with several unique and feature-rich blocks that help build websites faster.
9
  * Text Domain: ultimate-addons-for-gutenberg
10
  *
4
  * Plugin URI: https://www.brainstormforce.com
5
  * Author: Brainstorm Force
6
  * Author URI: https://www.brainstormforce.com
7
+ * Version: 1.23.2
8
  * Description: The Ultimate Addons for Gutenberg extends the Gutenberg functionality with several unique and feature-rich blocks that help build websites faster.
9
  * Text Domain: ultimate-addons-for-gutenberg
10
  *