attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.11.0, at includes/blocks/menu-item/attributes.php
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | use ABlocks\Controls\Link; |
| 8 | $attributes = [ |
| 9 | 'block_id' => [ |
| 10 | 'type' => 'string', |
| 11 | 'default' => '', |
| 12 | ], |
| 13 | 'label' => [ |
| 14 | 'type' => 'string', |
| 15 | 'default' => 'Menu', |
| 16 | ], |
| 17 | 'isSubMenu' => [ |
| 18 | 'type' => 'boolean', |
| 19 | 'default' => false, |
| 20 | ], |
| 21 | 'hasMegaMenu' => [ |
| 22 | 'type' => 'boolean', |
| 23 | 'default' => false |
| 24 | ], |
| 25 | 'hasLink' => [ |
| 26 | 'type' => 'boolean', |
| 27 | 'default' => false, |
| 28 | ], |
| 29 | 'link' => [ |
| 30 | 'type' => 'string', |
| 31 | 'default' => '#', |
| 32 | ], |
| 33 | ]; |
| 34 | |
| 35 | $attributes = array_merge( |
| 36 | $attributes, |
| 37 | // Adding attributes from various controls |
| 38 | Link::get_attribute( 'link' ), |
| 39 | ); |
| 40 | |
| 41 | return $attributes; |
| 42 |