| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
use ABlocks\Controls\Typography; |
| 8 |
use ABlocks\Controls\Border; |
| 9 |
use ABlocks\Controls\Dimensions; |
| 10 |
use ABlocks\Controls\Range; |
| 11 |
use ABlocks\Controls\Alignment; |
| 12 |
use ABlocks\Controls\BoxShadow; |
| 13 |
|
| 14 |
$attributes = [ |
| 15 |
'block_id' => [ |
| 16 |
'type' => 'string', |
| 17 |
'default' => '', |
| 18 |
], |
| 19 |
'taxonomy' => [ |
| 20 |
'type' => 'string', |
| 21 |
'default' => 'category' |
| 22 |
], |
| 23 |
'moreButtonAlignment' => [ |
| 24 |
'type' => 'string', |
| 25 |
'default' => 'center' |
| 26 |
], |
| 27 |
'loadMoreButtonText' => [ |
| 28 |
'type' => 'string', |
| 29 |
'default' => 'Load More', |
| 30 |
], |
| 31 |
'loadMoreButtonTextColor' => [ |
| 32 |
'type' => 'string', |
| 33 |
'default' => '#fff', |
| 34 |
'copyStyle' => true, |
| 35 |
], |
| 36 |
'loadMoreButtonTextColorH' => [ |
| 37 |
'type' => 'string', |
| 38 |
'default' => '#fff ', |
| 39 |
'copyStyle' => true, |
| 40 |
], |
| 41 |
'loadMoreButtonBackground' => [ |
| 42 |
'type' => 'string', |
| 43 |
'default' => '#13191B', |
| 44 |
'copyStyle' => true, |
| 45 |
], |
| 46 |
'loadMoreButtonBackgroundH' => [ |
| 47 |
'type' => 'string', |
| 48 |
'default' => '#13191B', |
| 49 |
'copyStyle' => true, |
| 50 |
], |
| 51 |
'loadMoreButtonTransition' => [ |
| 52 |
'type' => 'number', |
| 53 |
'default' => '', |
| 54 |
'copyStyle' => true, |
| 55 |
], |
| 56 |
'noMoreItemsText' => [ |
| 57 |
'type' => 'string', |
| 58 |
'default' => 'No More Items !' |
| 59 |
] |
| 60 |
]; |
| 61 |
$attributes = array_merge( |
| 62 |
Range::get_attribute([ |
| 63 |
'attributeName' => 'loadMoreButtonGap', |
| 64 |
'attributeObjectKey' => 'value', |
| 65 |
'isResponsive' => true, |
| 66 |
'defaultValue' => '', |
| 67 |
'hasUnit' => false, |
| 68 |
'unitDefaultValue' => 'px', |
| 69 |
]), |
| 70 |
// button style |
| 71 |
Border::get_attribute( 'moreButtonBorder', true ), |
| 72 |
Dimensions::get_attribute( 'moreButtonPadding', true ), |
| 73 |
Typography::get_attribute( 'moreButtonTypography', true ), |
| 74 |
Alignment::get_attribute( 'position', true, [ 'value' => 'left' ] ), |
| 75 |
Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ), |
| 76 |
BoxShadow::get_attribute( 'moreButtonboxShadow', true ), |
| 77 |
$attributes |
| 78 |
); |
| 79 |
|
| 80 |
|
| 81 |
return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 82 |
|
| 83 |
|