← All changes
|
includes/blocks/image-hotspot-child/attributes.php
+40
-0
2.7.6
→
2.14.0
View file →
| @@ -1,0 +1,40 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | + exit; | |
| 5 | +} | |
| 6 | + | |
| 7 | +use ABlocks\Controls\Range; | |
| 8 | +use ABlocks\Controls\Border; | |
| 9 | +use ABlocks\Controls\Dimensions; | |
| 10 | + | |
| 11 | +$attributes = [ | |
| 12 | + 'block_id' => array( | |
| 13 | + 'type' => 'string', | |
| 14 | + 'default' => '', | |
| 15 | + ), | |
| 16 | + 'hotspotId' => array( | |
| 17 | + 'type' => 'number', | |
| 18 | + 'default' => 0, | |
| 19 | + ), | |
| 20 | + 'backgroundColor' => array( | |
| 21 | + 'type' => 'string', | |
| 22 | + 'default' => '', | |
| 23 | + ), | |
| 24 | +]; | |
| 25 | + | |
| 26 | +$attributes = array_merge( | |
| 27 | + $attributes, | |
| 28 | + Range::get_attribute([ | |
| 29 | + 'attributeName' => 'contentWidth', | |
| 30 | + 'attributeObjectKey' => 'value', | |
| 31 | + 'isResponsive' => true, | |
| 32 | + 'defaultValue' => '', | |
| 33 | + 'hasUnit' => true, | |
| 34 | + 'unitDefaultValue' => 'px', | |
| 35 | + ]), | |
| 36 | + Border::get_attribute( 'contentBorder', true ), | |
| 37 | + Dimensions::get_attribute( 'contentPadding', true ), | |
| 38 | +); | |
| 39 | + | |
| 40 | +return $attributes; | |