PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.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 / modal / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.1, at includes/blocks/modal/attributes.php

116 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 use ABlocks\Controls\Range;
8 use ABlocks\Controls\Dimensions;
9 use ABlocks\Controls\Background;
10 use ABlocks\Controls\BoxShadow;
11 use ABlocks\Controls\Border;
12 use ABlocks\Components\ButtonGroup;
13
14
15 $attributes = [
16 'block_id' => array(
17 'type' => 'string',
18 'default' => '',
19 ),
20 'popupOnTop' => array(
21 'type' => 'boolean',
22 'default' => false,
23 ),
24 'disableCloseButton' => array(
25 'type' => 'boolean',
26 'default' => false,
27 ),
28 'useHoverTrigger' => array(
29 'type' => 'boolean',
30 'default' => false,
31 ),
32 'enableAutoTriggerTimer' => array(
33 'type' => 'boolean',
34 'default' => false,
35 ),
36 'backdropColor' => array(
37 'type' => 'string',
38 'default' => '#000000b3',
39 ),
40 'closeBtnBackgroundColor' => array(
41 'type' => 'string',
42 'default' => '',
43 ),
44 'closeBtnColor' => array(
45 'type' => 'string',
46 'default' => '',
47 ),
48 'noTrigger' => array(
49 'type' => 'boolean',
50 'default' => false,
51 ),
52 ];
53
54 $attributes = array_merge(
55 $attributes,
56 ButtonGroup::get_attribute( 'openPanel', false, [
57 'value' => 'close',
58 ] ),
59 ButtonGroup::get_attribute( 'popupPosition', false, [
60 'value' => 'popup',
61 ] ),
62 ButtonGroup::get_attribute( 'panelBlockPosition', false, [
63 'value' => 'bottom',
64 ] ),
65 ButtonGroup::get_attribute( 'panelContentPosition', false, [
66 'value' => 'auto',
67 ] ),
68 ButtonGroup::get_attribute( 'closePosition', false, [
69 'value' => 'right',
70 ] ),
71 Range::get_attribute([
72 'attributeName' => 'popupTopOffset',
73 'isResponsive' => false,
74 'defaultValue' => 0,
75 ]),
76 Range::get_attribute([
77 'attributeName' => 'panelWidth',
78 'attributeObjectKey' => 'value',
79 'isResponsive' => true,
80 'defaultValue' => 0,
81 'hasUnit' => true,
82 'unitDefaultValue' => 'px',
83 ]),
84 Range::get_attribute([
85 'attributeName' => 'panelHeight',
86 'attributeObjectKey' => 'value',
87 'isResponsive' => true,
88 'defaultValue' => 0,
89 'hasUnit' => true,
90 'unitDefaultValue' => 'px',
91 ]),
92 Range::get_attribute([
93 'attributeName' => 'autoTriggerTime',
94 'isResponsive' => false,
95 'defaultValue' => 0,
96 ]),
97 Range::get_attribute([
98 'attributeName' => 'closeBtnTop',
99 'isResponsive' => false,
100 'defaultValue' => 5,
101 'hasUnit' => false,
102 ]),
103 Range::get_attribute([
104 'attributeName' => 'closeBtnSide',
105 'isResponsive' => false,
106 'defaultValue' => 5,
107 'hasUnit' => false,
108 ]),
109 Dimensions::get_attribute( 'panelPadding', true ),
110 Background::get_attribute( 'panelBackground' ),
111 Border::get_attribute( 'panelBorder', true ),
112 BoxShadow::get_attribute( 'panelShadow', true ),
113 );
114
115 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
116