| 1 |
<?php |
| 2 |
|
| 3 |
use ABlocks\Controls\Typography; |
| 4 |
use ABlocks\Controls\Background; |
| 5 |
use ABlocks\Controls\Border; |
| 6 |
use ABlocks\Controls\Dimensions; |
| 7 |
use ABlocks\Controls\BoxShadow; |
| 8 |
use ABlocks\Controls\Alignment; |
| 9 |
|
| 10 |
|
| 11 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
$attributes = [ |
| 16 |
'block_id' => [ |
| 17 |
'type' => 'string', |
| 18 |
'default' => '', |
| 19 |
], |
| 20 |
'blockVersion' => [ |
| 21 |
'type' => 'number', |
| 22 |
'default' => 2, |
| 23 |
], |
| 24 |
'tableWidth' => [ |
| 25 |
'type' => 'number', |
| 26 |
'default' => 100, |
| 27 |
], |
| 28 |
'tableColor' => [ |
| 29 |
'type' => 'string', |
| 30 |
'default' => '', |
| 31 |
], |
| 32 |
'tableColorH' => [ |
| 33 |
'type' => 'string', |
| 34 |
'default' => '', |
| 35 |
], |
| 36 |
'tableBackgroundH' => [ |
| 37 |
'type' => 'string', |
| 38 |
'default' => '', |
| 39 |
], |
| 40 |
'tableBackground' => [ |
| 41 |
'type' => 'string', |
| 42 |
'default' => '', |
| 43 |
], |
| 44 |
'tableLastBackground' => [ |
| 45 |
'type' => 'string', |
| 46 |
'default' => '', |
| 47 |
], |
| 48 |
'tableLastBackgroundH' => [ |
| 49 |
'type' => 'string', |
| 50 |
'default' => '', |
| 51 |
], |
| 52 |
'tableLastColorH' => [ |
| 53 |
'type' => 'string', |
| 54 |
'default' => '', |
| 55 |
], |
| 56 |
'tableLastColor' => [ |
| 57 |
'type' => 'string', |
| 58 |
'default' => '', |
| 59 |
], |
| 60 |
]; |
| 61 |
|
| 62 |
$attributes = array_merge( |
| 63 |
$attributes, |
| 64 |
Typography::get_attribute( 'firstTableTypography', true ), |
| 65 |
Typography::get_attribute( 'lastTableTypography', true ), |
| 66 |
Alignment::get_attribute( 'tableAlignment', true, [ 'value' => 'left' ] ), |
| 67 |
); |
| 68 |
|
| 69 |
return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 70 |
|
| 71 |
|