attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.1, at includes/blocks/form-select/attributes.php
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | $attributes = [ |
| 8 | 'block_id' => array( |
| 9 | 'type' => 'string', |
| 10 | 'default' => '' |
| 11 | ), |
| 12 | 'inputWidth' => [ |
| 13 | 'type' => 'number', |
| 14 | 'default' => 100 |
| 15 | ], |
| 16 | 'labelName' => [ |
| 17 | 'type' => 'string', |
| 18 | 'default' => 'What\'s your favorite programming lang?' |
| 19 | ], |
| 20 | 'name' => [ |
| 21 | 'type' => 'string', |
| 22 | 'default' => '', |
| 23 | ], |
| 24 | 'helperText' => [ |
| 25 | 'type' => 'string', |
| 26 | 'default' => '' |
| 27 | ], |
| 28 | 'isRequired' => [ |
| 29 | 'type' => 'boolean', |
| 30 | 'default' => true, |
| 31 | ], |
| 32 | 'errorMsg' => [ |
| 33 | 'type' => 'string', |
| 34 | 'default' => 'This field is required', |
| 35 | ], |
| 36 | 'options' => [ |
| 37 | 'type' => 'array', |
| 38 | 'default' => [ |
| 39 | [ |
| 40 | 'id' => 1, |
| 41 | 'value' => 'javascript' |
| 42 | ] |
| 43 | ] |
| 44 | ] |
| 45 | ]; |
| 46 | |
| 47 | $attributes = array_merge( |
| 48 | $attributes, |
| 49 | ); |
| 50 | |
| 51 | return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); |
| 52 | |
| 53 |