| @@ -1,0 +1,82 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | + exit; | |
| 5 | +} | |
| 6 | + | |
| 7 | +use ABlocks\Controls\Alignment; | |
| 8 | +use ABlocks\Controls\Border; | |
| 9 | +use ABlocks\Controls\Dimensions; | |
| 10 | +use ABlocks\Controls\Typography; | |
| 11 | +use ABlocks\Controls\TextShadow; | |
| 12 | +use ABlocks\Controls\GroupButton; | |
| 13 | +use ABlocks\Controls\Range; | |
| 14 | + | |
| 15 | +$attributes = [ | |
| 16 | + 'block_id' => [ | |
| 17 | + 'type' => 'string', | |
| 18 | + 'default' => '', | |
| 19 | + ], | |
| 20 | + 'blockVersion' => array( | |
| 21 | + 'type' => 'number', | |
| 22 | + 'default' => '', | |
| 23 | + ), | |
| 24 | + 'justifyItems' => [ | |
| 25 | + 'type' => 'string', | |
| 26 | + 'default' => 'start', | |
| 27 | + ], | |
| 28 | + 'buttonType' => [ | |
| 29 | + 'type' => 'string', | |
| 30 | + 'default' => '#ddd', | |
| 31 | + ], | |
| 32 | + 'buttonSize' => [ | |
| 33 | + 'type' => 'string', | |
| 34 | + 'default' => 'small', | |
| 35 | + ], | |
| 36 | + 'textColor' => [ | |
| 37 | + 'type' => 'string', | |
| 38 | + 'default' => '#000000', | |
| 39 | + ], | |
| 40 | + 'textColorH' => [ | |
| 41 | + 'type' => 'string', | |
| 42 | + 'default' => '', | |
| 43 | + ], | |
| 44 | + 'background' => [ | |
| 45 | + 'type' => 'string', | |
| 46 | + 'default' => '', | |
| 47 | + ], | |
| 48 | + 'backgroundH' => [ | |
| 49 | + 'type' => 'string', | |
| 50 | + 'default' => '', | |
| 51 | + ], | |
| 52 | + 'transition' => [ | |
| 53 | + 'type' => 'number', | |
| 54 | + 'default' => 0, | |
| 55 | + ], | |
| 56 | +]; | |
| 57 | + | |
| 58 | +$attributes = array_merge( | |
| 59 | + $attributes, | |
| 60 | + Alignment::get_attribute( 'alignment', true, [ 'value' => 'flex-start' ] ), | |
| 61 | + Border::get_attribute( 'border', true ), | |
| 62 | + Dimensions::get_attribute( 'padding', true ), | |
| 63 | + Typography::get_attribute( 'typography', true ), | |
| 64 | + TextShadow::get_attribute( 'textShadow' ), | |
| 65 | + GroupButton::get_attribute( 'stack', false, [ | |
| 66 | + 'value' => 'horizontal' | |
| 67 | + ] ), | |
| 68 | + Range::get_attribute([ | |
| 69 | + 'attributeName' => 'gap', | |
| 70 | + 'attributeObjectKey' => 'value', | |
| 71 | + 'isResponsive' => true, | |
| 72 | + 'defaultValue' => 20, | |
| 73 | + 'defaultValueTablet' => 20, | |
| 74 | + 'defaultValueMobile' => 10, | |
| 75 | + 'hasUnit' => true, | |
| 76 | + 'unitDefaultValue' => 'px', | |
| 77 | + ]), | |
| 78 | +); | |
| 79 | + | |
| 80 | +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); | |
| 81 | + | |
| 82 | + | |