← All changes
|
includes/blocks/academy-certificate/attributes.php
+51
-0
2.7.7
→
2.14.0
View file →
| @@ -1,0 +1,51 @@ | ||
| 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\Range; | |
| 12 | + | |
| 13 | + | |
| 14 | +$attributes = [ | |
| 15 | + 'block_id' => array( | |
| 16 | + 'type' => 'string', | |
| 17 | + 'default' => '', | |
| 18 | + ), | |
| 19 | + 'backgroundImage' => array( | |
| 20 | + 'type' => 'string', | |
| 21 | + 'default' => '', | |
| 22 | + ), | |
| 23 | + 'pageSize' => array( | |
| 24 | + 'type' => 'string', | |
| 25 | + 'default' => 'A4', | |
| 26 | + ), | |
| 27 | + 'pageOrientation' => array( | |
| 28 | + 'type' => 'string', | |
| 29 | + 'default' => 'L', | |
| 30 | + ), | |
| 31 | + 'imageOptions' => array( | |
| 32 | + 'type' => 'array', | |
| 33 | + 'default' => [], | |
| 34 | + ), | |
| 35 | + 'isCustomImage' => array( | |
| 36 | + 'type' => 'boolean', | |
| 37 | + 'default' => false, | |
| 38 | + ), | |
| 39 | +]; | |
| 40 | + | |
| 41 | +$attributes = array_merge( | |
| 42 | + $attributes, | |
| 43 | + Dimensions::get_attribute( 'certificate_padding', true ), | |
| 44 | + Range::get_attribute([ | |
| 45 | + 'attributeName' => 'containerWidth', | |
| 46 | + 'isResponsive' => false, | |
| 47 | + 'defaultValue' => 80, | |
| 48 | + ]), | |
| 49 | +); | |
| 50 | + | |
| 51 | +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); | |