Skip to content

Commit

Permalink
Fixing an issue where gumshoe was not loaded as a dependency when it …
Browse files Browse the repository at this point in the history
…should be.
  • Loading branch information
mark-c-woodard committed Nov 21, 2024
1 parent 66435fa commit 6b7ecd4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion includes/class-kadence-blocks-table-of-contents.php
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,11 @@ public function render_table_of_content( $attributes, $content ) {
if ( kadence_blocks_is_not_amp() ) {
if ( isset( $attributes['enableScrollSpy'] ) && $attributes['enableScrollSpy'] ) {
wp_enqueue_script( 'kadence-blocks-gumshoe' );
//need to laod this script with the gumshoe dependency if scrollspy is enabled
wp_enqueue_script( 'kadence-blocks-table-of-contents', KADENCE_BLOCKS_URL . 'includes/assets/js/kb-table-of-contents.min.js', array('kadence-blocks-gumshoe') , KADENCE_BLOCKS_VERSION, true );
} else {
wp_enqueue_script( 'kadence-blocks-table-of-contents' );
}
wp_enqueue_script( 'kadence-blocks-table-of-contents' );
}
if ( ! doing_filter( 'the_content' ) ) {
if ( ! wp_style_is( 'kadence-blocks-table-of-contents', 'done' ) ) {
Expand Down
4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ Please report security bugs found in the Kadence Blocks plugin's source code thr

== Changelog ==

= 3.3.8 =
Release Date: tba
* Fix: Issue with table of contents script dependency timing.

= 3.3.7 =
Release Date: November 21st 2024
* Fix: Issue with advanced gallery captions.
Expand Down

0 comments on commit 6b7ecd4

Please sign in to comment.