diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7d7d85f57..a3b2b9afb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,13 +3,13 @@ on: workflow_dispatch: pull_request: paths-ignore: - - '**/readme.txt' + - '**/*.txt' - '.github/**' push: branches: - master paths-ignore: - - '**/readme.txt' + - '**/*.txt' - '.github/**' jobs: test: diff --git a/includes/class-kadence-blocks-frontend.php b/includes/class-kadence-blocks-frontend.php index a18c433de..b2ff50cd0 100644 --- a/includes/class-kadence-blocks-frontend.php +++ b/includes/class-kadence-blocks-frontend.php @@ -212,36 +212,16 @@ public function render_pane_scheme_head( $block ) { $allowed_tags = apply_filters( 'kadence_blocks_faq_schema_allowed_tags', '

    1. ', $block ); if ( ! is_null( self::$faq_schema ) ) { if ( is_array( $block['innerBlocks'] ) && ! empty( $block['innerBlocks'] ) ) { + //an accordion pane has it's "question" in the pane's innerhtml + //the "answer" is everything in innerblocks + //here we parse that out and build the question and answer + $answer = ''; foreach ( $block['innerBlocks'] as $inner_key => $inner_block ) { - if ( ! empty( $inner_block['innerHTML'] ) ) { - $inner_html = trim( strip_tags( $inner_block['innerHTML'], $allowed_tags ) ); - if ( ! empty( $inner_html ) ) { - $answer .= $inner_html; - } - } - if ( isset( $inner_block['innerBlocks'] ) && is_array( $inner_block['innerBlocks'] ) && ! empty ( $inner_block['innerBlocks'] ) ) { - foreach ( $inner_block['innerBlocks'] as $again_inner_key => $again_inner_block ) { - if ( ! empty( $again_inner_block['innerHTML'] ) ) { - $inner_html = trim( strip_tags( $again_inner_block['innerHTML'], $allowed_tags ) ); - if ( ! empty( $inner_html ) ) { - $answer .= $inner_html; - } - } - if ( isset( $again_inner_block['innerBlocks'] ) && is_array( $again_inner_block['innerBlocks'] ) && ! empty ( $again_inner_block['innerBlocks'] ) ) { - foreach ( $again_inner_block['innerBlocks'] as $again_again_inner_key => $again_again_inner_block ) { - if ( ! empty( $again_again_inner_block['innerHTML'] ) ) { - $inner_html = trim( strip_tags( $again_again_inner_block['innerHTML'], $allowed_tags ) ); - if ( ! empty( $inner_html ) ) { - $answer .= $inner_html; - } - } - } - } - } - } + $answer .= trim( strip_tags( render_block($inner_block), $allowed_tags ) ); } - preg_match( '/(.*?)<\/span>/s', $block['innerHTML'], $match ); + + preg_match( '/(.*?)<\/span>/s', do_blocks($block['innerHTML']), $match ); $question = ( $match && isset( $match[1] ) && ! empty( $match[1] ) ? $match[1] : '' ); $question = apply_filters( 'kadence_blocks_faq_schema_question', $question, $block ); diff --git a/languages/kadence-blocks.pot b/languages/kadence-blocks.pot index 9b7a5d80b..66e17d025 100644 --- a/languages/kadence-blocks.pot +++ b/languages/kadence-blocks.pot @@ -9,7 +9,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2025-02-24T16:02:35+00:00\n" +"POT-Creation-Date: 2025-02-17T18:37:49+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.11.0\n" "X-Domain: kadence-blocks\n" diff --git a/readme.txt b/readme.txt index 7f43ebecd..d7eb65b0c 100644 --- a/readme.txt +++ b/readme.txt @@ -176,7 +176,9 @@ Please report security bugs found in the Kadence Blocks plugin's source code thr = 3.4.10 = Release Date: TBD February 2025 - +* Update: FAQ Schema for accordions now processes dynamic content. +* Fix: Warning handled for CSS class. +* Fix: Gallery (Adv) arrow strings added to pot file. = 3.4.9 = Release Date: 11th February 2025