| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
use ABlocks\Controls\Range; |
| 7 |
use ABlocks\Controls\Typography; |
| 8 |
use ABlocks\Controls\Border; |
| 9 |
use ABlocks\Controls\Dimensions; |
| 10 |
use ABlocks\Controls\Alignment; |
| 11 |
use ABlocks\Components\ButtonGroup; |
| 12 |
$attributes = [ |
| 13 |
'block_id' => [ |
| 14 |
'type' => 'string', |
| 15 |
'default' => '', |
| 16 |
], |
| 17 |
'taxonomy' => [ |
| 18 |
'type' => 'string', |
| 19 |
'default' => 'category' |
| 20 |
], |
| 21 |
'taxonomy_term_items' => array( |
| 22 |
'type' => 'array', |
| 23 |
'default' => [], |
| 24 |
), |
| 25 |
'filterBtnTextColor' => [ |
| 26 |
'type' => 'string', |
| 27 |
'default' => '#000000', |
| 28 |
'copyStyle' => true, |
| 29 |
], |
| 30 |
'filterBtnBgColor' => [ |
| 31 |
'type' => 'string', |
| 32 |
'default' => '#F4F4F5', |
| 33 |
'copyStyle' => true, |
| 34 |
], |
| 35 |
'activeBtnTextColor' => [ |
| 36 |
'type' => 'string', |
| 37 |
'default' => '#FFFFFF', |
| 38 |
'copyStyle' => true, |
| 39 |
], |
| 40 |
'activeBtnBgColor' => [ |
| 41 |
'type' => 'string', |
| 42 |
'default' => '#000000', |
| 43 |
'copyStyle' => true, |
| 44 |
], |
| 45 |
|
| 46 |
]; |
| 47 |
$attributes = array_merge( |
| 48 |
$attributes, |
| 49 |
Range::get_attribute([ |
| 50 |
'attributeName' => 'FilterBtnGap', |
| 51 |
'attributeObjectKey' => 'value', |
| 52 |
'isResponsive' => true, |
| 53 |
'defaultValue' => 10, |
| 54 |
'hasUnit' => true, |
| 55 |
'unitDefaultValue' => 'px', |
| 56 |
]), |
| 57 |
Border::get_attribute( 'activeBtnBorder', true ), |
| 58 |
Typography::get_attribute( 'typography', true ), |
| 59 |
Alignment::get_attribute( 'filterBtnAlignment', false, [ 'value' => 'center' ] ), |
| 60 |
Alignment::get_attribute( 'rowAlignBtn', false, [ 'value' => 'center' ] ), |
| 61 |
ButtonGroup::get_attribute( 'buttonAlignment', false, [ |
| 62 |
'value' => 'row', |
| 63 |
] ), |
| 64 |
Dimensions::get_attribute( 'filterButtonPadding', false ), |
| 65 |
Dimensions::get_attribute( 'filterButtonMargin', false ), |
| 66 |
); |
| 67 |
|
| 68 |
return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 69 |
|
| 70 |
|