| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
use ABlocks\Controls\Alignment; |
| 8 |
use ABlocks\Controls\Typography; |
| 9 |
use ABlocks\Controls\TextShadow; |
| 10 |
use ABlocks\Controls\TextStroke; |
| 11 |
use ABlocks\Controls\Link; |
| 12 |
use ABlocks\Controls\Range; |
| 13 |
|
| 14 |
$attributes = [ |
| 15 |
'block_id' => array( |
| 16 |
'type' => 'string', |
| 17 |
'default' => '', |
| 18 |
), |
| 19 |
'blockVersion' => array( |
| 20 |
'type' => 'number', |
| 21 |
'default' => '', |
| 22 |
), |
| 23 |
'isAnimated' => array( |
| 24 |
'type' => 'boolean', |
| 25 |
'default' => false, |
| 26 |
), |
| 27 |
'heading' => array( |
| 28 |
'type' => 'string', |
| 29 |
'source' => 'html', |
| 30 |
'selector' => '.ablocks-heading-text' |
| 31 |
), |
| 32 |
'headingTag' => array( |
| 33 |
'type' => 'string', |
| 34 |
'default' => 'h2', |
| 35 |
), |
| 36 |
'textColor' => array( |
| 37 |
'type' => 'string', |
| 38 |
'default' => '', |
| 39 |
), |
| 40 |
'animationType' => array( |
| 41 |
'type' => 'string', |
| 42 |
'default' => 'highlighted', |
| 43 |
), |
| 44 |
'animationStyle' => array( |
| 45 |
'type' => 'string', |
| 46 |
'default' => 'highlighter-circle', |
| 47 |
), |
| 48 |
'startingText' => array( |
| 49 |
'type' => 'string', |
| 50 |
'default' => '', |
| 51 |
), |
| 52 |
'animatedText' => array( |
| 53 |
'type' => 'string', |
| 54 |
'default' => 'Animated', |
| 55 |
), |
| 56 |
'endingText' => array( |
| 57 |
'type' => 'string', |
| 58 |
'default' => '', |
| 59 |
), |
| 60 |
|
| 61 |
'highlightColor' => array( |
| 62 |
'type' => 'string', |
| 63 |
'default' => '#ff000e', |
| 64 |
), |
| 65 |
'highlightDuration' => array( |
| 66 |
'type' => 'number', |
| 67 |
'default' => 2000, |
| 68 |
), |
| 69 |
'isInfiniteLoop' => array( |
| 70 |
'type' => 'boolean', |
| 71 |
'default' => true, |
| 72 |
), |
| 73 |
'highlightDelay' => array( |
| 74 |
'type' => 'number', |
| 75 |
'default' => 1000, |
| 76 |
), |
| 77 |
'animatedTextColor' => array( |
| 78 |
'type' => 'string', |
| 79 |
'default' => '', |
| 80 |
), |
| 81 |
]; |
| 82 |
|
| 83 |
$attributes = array_merge( |
| 84 |
$attributes, |
| 85 |
Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ), |
| 86 |
Typography::get_attribute( 'typography', true ), |
| 87 |
TextShadow::get_attribute( 'textShadow' ), |
| 88 |
Link::get_attribute( 'link' ), |
| 89 |
TextStroke::get_attribute( 'textStroke', true ), |
| 90 |
Range::get_attribute([ |
| 91 |
'attributeName' => 'highlightStrokeWidth', |
| 92 |
'attributeObjectKey' => 'value', |
| 93 |
'isResponsive' => true, |
| 94 |
'defaultValue' => 10, |
| 95 |
'hasUnit' => true, |
| 96 |
'unitDefaultValue' => 'px', |
| 97 |
]), |
| 98 |
); |
| 99 |
|
| 100 |
return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 101 |
|
| 102 |
|