| 1 |
<?php |
| 2 |
|
| 3 |
if ( ! defined( 'ABSPATH' ) ) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
use ABlocks\Controls\Alignment; |
| 8 |
|
| 9 |
|
| 10 |
$attributes = [ |
| 11 |
'block_id' => [ |
| 12 |
'type' => 'string', |
| 13 |
], |
| 14 |
'qrValue' => [ |
| 15 |
'type' => 'string', |
| 16 |
'default' => '', |
| 17 |
], |
| 18 |
'blockVersion' => array( |
| 19 |
'type' => 'number', |
| 20 |
'default' => 2, |
| 21 |
), |
| 22 |
'bgColor' => [ |
| 23 |
'type' => 'string', |
| 24 |
'default' => '#FFF', |
| 25 |
], |
| 26 |
'qrLevel' => [ |
| 27 |
'type' => 'string', |
| 28 |
'default' => 'M', |
| 29 |
], |
| 30 |
'fgColor' => [ |
| 31 |
'type' => 'string', |
| 32 |
'default' => '#000', |
| 33 |
], |
| 34 |
'imageSrc' => [ |
| 35 |
'type' => 'string', |
| 36 |
'default' => '', |
| 37 |
], |
| 38 |
'isImage' => [ |
| 39 |
'type' => 'boolean', |
| 40 |
'default' => false, |
| 41 |
], |
| 42 |
'excavateValue' => [ |
| 43 |
'type' => 'boolean', |
| 44 |
'default' => false, |
| 45 |
], |
| 46 |
'logoOpacity' => [ |
| 47 |
'type' => 'number', |
| 48 |
'default' => 0.6, |
| 49 |
], |
| 50 |
'logoWidth' => [ |
| 51 |
'type' => 'number', |
| 52 |
'default' => 50, |
| 53 |
], |
| 54 |
'logoHeight' => [ |
| 55 |
'type' => 'number', |
| 56 |
'default' => 50, |
| 57 |
], |
| 58 |
'qrData' => [ |
| 59 |
'type' => 'object', |
| 60 |
'default' => (object) [], |
| 61 |
], |
| 62 |
'imageValue' => [ |
| 63 |
'type' => 'object', |
| 64 |
'default' => (object) [], |
| 65 |
], |
| 66 |
'qrSize' => [ |
| 67 |
'type' => 'number', |
| 68 |
'default' => 250, |
| 69 |
], |
| 70 |
'positionX' => [ |
| 71 |
'type' => 'number', |
| 72 |
'default' => 0, |
| 73 |
], |
| 74 |
'positionY' => [ |
| 75 |
'type' => 'number', |
| 76 |
'default' => 0, |
| 77 |
], |
| 78 |
]; |
| 79 |
|
| 80 |
$attributes = array_merge( |
| 81 |
$attributes, |
| 82 |
Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ), |
| 83 |
); |
| 84 |
|
| 85 |
return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 86 |
|
| 87 |
|
| 88 |
|