Skip to content

Commit fafc2a6

Browse files
committed
Some fixes
1 parent c996263 commit fafc2a6

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

block/faq/block.js

+15-6
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,22 @@ registerBlockType('snow-monkey-awesome-custom-blocks/faq', {
1313
category: 'smacb',
1414
attributes: {
1515
content: {
16-
type: 'array',
17-
default: [
18-
{
19-
question: [],
20-
answer: [],
16+
source: 'query',
17+
selector: '.smacb-faq__item',
18+
query: {
19+
question: {
20+
type: 'array',
21+
source: 'children',
22+
selector: '.smacb-faq__item__question',
23+
default: [],
24+
},
25+
answer: {
26+
type: 'array',
27+
source: 'children',
28+
selector: '.smacb-faq__item__answer',
29+
default: [],
2130
}
22-
],
31+
}
2332
},
2433
rows: {
2534
type: 'number',

snow-monkey-awesome-custom-blocks.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Plugin name: Snow Monkey Awesome Custom Blocks
4-
* Version: 0.4.0
4+
* Version: 0.4.1
55
* Text Domain: snow-monkey-awesome-custom-blocks
66
* Domain Path: /languages/
77
*

0 commit comments

Comments
 (0)