| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | <?php |
| 2 | +use ABlocks\Controls\Range; | |
| 2 | 3 | |
| 3 | 4 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | 5 | exit; |
| 5 | 6 | } |
| @@ -25,12 +26,9 @@ | ||
| 25 | 26 | 'helperText' => [ |
| 26 | 27 | 'type' => 'string', |
| 27 | 28 | 'default' => '', |
| 28 | 29 | ], |
| 29 | - 'inputWidth' => [ | |
| 30 | - 'type' => 'number', | |
| 31 | - 'default' => 100 | |
| 32 | - ], | |
| 30 | + | |
| 33 | 31 | 'name' => [ |
| 34 | 32 | 'type' => 'string', |
| 35 | 33 | 'default' => '', |
| 36 | 34 | ], |
| @@ -54,8 +52,16 @@ | ||
| 54 | 52 | ]; |
| 55 | 53 | |
| 56 | 54 | $attributes = array_merge( |
| 57 | 55 | $attributes, |
| 56 | + Range::get_attribute( [ | |
| 57 | + 'attributeName' => 'inputWidth', | |
| 58 | + 'attributeObjectKey' => 'value', | |
| 59 | + 'isResponsive' => true, | |
| 60 | + 'defaultValue' => 100, | |
| 61 | + 'hasUnit' => true, | |
| 62 | + 'unitDefaultValue' => '%', | |
| 63 | + ] ), | |
| 58 | 64 | ); |
| 59 | 65 | |
| 60 | 66 | return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 61 | 67 | |