diff --git a/includes/schema/faq_schema.php b/includes/schema/faq_schema.php index 1c7dd91..839b362 100644 --- a/includes/schema/faq_schema.php +++ b/includes/schema/faq_schema.php @@ -226,7 +226,7 @@ protected function generate_question_block( string $question_text, string $answe '@id' => $url, 'position' => $position, 'url' => $url, - 'name' => esc_html( $question_text ), + 'name' => esc_html( wp_strip_all_tags( $question_text ) ), 'answerCount' => 1, 'acceptedAnswer' => $this->add_accepted_answer_property( $answer_content ), ]; diff --git a/src/faq-answer/block.json b/src/faq-answer/block.json index 25e6649..7132ce1 100644 --- a/src/faq-answer/block.json +++ b/src/faq-answer/block.json @@ -10,7 +10,12 @@ "supports": { "html": false, "inserter": false, - "reusable": false + "reusable": false, + "spacing": { + "margin": true, + "padding": true, + "blockGap": true + } }, "attributes": { "isAccordion": { diff --git a/src/faq-answer/edit.js b/src/faq-answer/edit.js index b76f4cf..e5ae80b 100644 --- a/src/faq-answer/edit.js +++ b/src/faq-answer/edit.js @@ -4,7 +4,13 @@ import { useBlockProps, InnerBlocks } from '@wordpress/block-editor'; import { __ } from '@wordpress/i18n'; -const ALLOWED_BLOCKS = [ 'core/paragraph', 'core/heading', 'core/list' ]; +const ALLOWED_BLOCKS = [ + 'core/paragraph', + 'core/heading', + 'core/list', + 'core/buttons', + 'core/button', +]; export default function Edit() { const blockProps = useBlockProps( { diff --git a/src/faq-question/block.json b/src/faq-question/block.json index 5302b64..f3c09c2 100644 --- a/src/faq-question/block.json +++ b/src/faq-question/block.json @@ -10,7 +10,10 @@ "supports": { "html": false, "inserter": false, - "reusable": false + "reusable": false, + "typography": { + "fontSize": true + } }, "attributes": { "question": {