PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.11.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.11.1
2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 All 80 releases
ablocks / includes / blocks / form-radio / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.11.1, at includes/blocks/form-radio/attributes.php

68 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 use ABlocks\Controls\Range;
3
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 $attributes = [
9 'block_id' => [
10 'type' => 'string',
11 'default' => ''
12 ],
13 'inputType' => [
14 'type' => 'string',
15 'default' => ''
16 ],
17 'optionWidth' => [
18 'type' => 'number',
19 'default' => 50
20 ],
21 'label' => [
22 'type' => 'string',
23 'default' => 'What\'s your favorite programming lang?'
24 ],
25
26 'helperText' => [
27 'type' => 'string',
28 'default' => '',
29 ],
30
31 'name' => [
32 'type' => 'string',
33 'default' => '',
34 ],
35 'isRequired' => [
36 'type' => 'boolean',
37 'default' => true,
38 ],
39 'errorMsg' => [
40 'type' => 'string',
41 'default' => 'This field is required'
42 ],
43 'radioArr' => [
44 'type' => 'array',
45 'default' => [
46 [
47 'id' => 1,
48 'value' => 'Javascript',
49 ],
50 ]
51 ]
52 ];
53
54 $attributes = array_merge(
55 $attributes,
56 Range::get_attribute( [
57 'attributeName' => 'inputWidth',
58 'attributeObjectKey' => 'value',
59 'isResponsive' => true,
60 'defaultValue' => 100,
61 'hasUnit' => true,
62 'unitDefaultValue' => '%',
63 ] ),
64 );
65
66 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
67
68