← All changes
|
includes/blocks/storeengine-continue-button/attributes.php
+65
-0
2.7.6
→
2.13.0
View file →
| @@ -1,0 +1,65 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | + exit; | |
| 5 | +} | |
| 6 | + | |
| 7 | +use ABlocks\Controls\Typography; | |
| 8 | +use ABlocks\Controls\Background; | |
| 9 | +use ABlocks\Controls\Border; | |
| 10 | +use ABlocks\Controls\Dimensions; | |
| 11 | +use ABlocks\Controls\BoxShadow; | |
| 12 | +use ABlocks\Controls\Alignment; | |
| 13 | +use ABlocks\Controls\Range; | |
| 14 | + | |
| 15 | + | |
| 16 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 17 | + exit; | |
| 18 | +} | |
| 19 | + | |
| 20 | +$attributes = [ | |
| 21 | + 'block_id' => [ | |
| 22 | + 'type' => 'string', | |
| 23 | + 'default' => '', | |
| 24 | + ], | |
| 25 | + 'blockVersion' => [ | |
| 26 | + 'type' => 'number', | |
| 27 | + 'default' => 2, | |
| 28 | + ], | |
| 29 | + 'buttonColor' => [ | |
| 30 | + 'type' => 'string', | |
| 31 | + 'default' => '', | |
| 32 | + ], | |
| 33 | + 'buttonColorH' => [ | |
| 34 | + 'type' => 'string', | |
| 35 | + 'default' => '', | |
| 36 | + ], | |
| 37 | + 'buttonBackground' => [ | |
| 38 | + 'type' => 'string', | |
| 39 | + 'default' => '', | |
| 40 | + ], | |
| 41 | + 'buttonBackgroundH' => [ | |
| 42 | + 'type' => 'string', | |
| 43 | + 'default' => '', | |
| 44 | + ], | |
| 45 | +]; | |
| 46 | + | |
| 47 | +$attributes = array_merge( | |
| 48 | + $attributes, | |
| 49 | + Dimensions::get_attribute( 'padding', true ), | |
| 50 | + Typography::get_attribute( 'buttonTypography', true ), | |
| 51 | + Border::get_attribute( 'buttonBorder', true ), | |
| 52 | + Alignment::get_attribute( 'buttonAlignment', true, [ 'value' => 'left' ] ), | |
| 53 | + BoxShadow::get_attribute( 'boxShadow', true ), | |
| 54 | + Range::get_attribute([ | |
| 55 | + 'attributeName' => 'buttonWidth', | |
| 56 | + 'attributeObjectKey' => 'value', | |
| 57 | + 'isResponsive' => true, | |
| 58 | + 'defaultValue' => 100, | |
| 59 | + 'hasUnit' => false, | |
| 60 | + 'unitDefaultValue' => '%', | |
| 61 | + ]), | |
| 62 | +); | |
| 63 | + | |
| 64 | +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); | |
| 65 | + | |