PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.8.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.8.0
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 / image-scroll / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.8.0, at includes/blocks/image-scroll/attributes.php

184 lines 4.5 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\Alignment;
8 use ABlocks\Controls\Border;
9 use ABlocks\Controls\Dimensions;
10 use ABlocks\Controls\Typography;
11 use ABlocks\Controls\CssFilter;
12 use ABlocks\Controls\BoxShadow;
13 use ABlocks\Controls\Range;
14
15 $attributes = [
16 'block_id' => [
17 'type' => 'string',
18 'default' => '',
19 ],
20 'imgId' => [
21 'type' => 'string',
22 'default' => '',
23 ],
24 'imgIdTablet' => [
25 'type' => 'string',
26 'default' => '',
27 ],
28 'imgIdMobile' => [
29 'type' => 'string',
30 'default' => '',
31 ],
32 'imgUrl' => [
33 'type' => 'string',
34 'source' => 'attribute',
35 'selector' => '.ablocks-image',
36 'attribute' => 'srcset',
37 ],
38 'imgUrlTablet' => [
39 'type' => 'string',
40 'source' => 'attribute',
41 'selector' => '.ablocks-image-tablet',
42 'attribute' => 'srcset',
43 ],
44 'imgUrlMobile' => [
45 'type' => 'string',
46 'source' => 'attribute',
47 'selector' => '.ablocks-image-mobile',
48 'attribute' => 'src',
49 ],
50 'imgSize' => [
51 'type' => 'object',
52 'default' => [
53 'value' => 'large',
54 'valueTablet' => '',
55 'valueMobile' => '',
56 ],
57 ],
58 'aspectRatio' => [
59 'type' => 'object',
60 'default' => [
61 'value' => 'original',
62 'valueTablet' => '',
63 'valueMobile' => '',
64 ],
65 ],
66 'imageScrollOption' => [
67 'type' => 'object',
68 'default' => [
69 'value' => 'mouse-scroll'
70 ],
71 ],
72 'imageDataAttribute' => [
73 'type' => 'object'
74 ],
75 'widthHeightWidget' => [
76 'type' => 'object',
77 'default' => [
78 'imgNaturalWidth' => '',
79 'imgNaturalWidthTablet' => '',
80 'imgNaturalWidthMobile' => '',
81 'imgNaturalHeight' => '',
82 'imgNaturalHeightTablet' => '',
83 'imgNaturalHeightMobile' => '',
84 'width' => '',
85 'widthTablet' => '',
86 'widthMobile' => '',
87 'height' => '',
88 'heightTablet' => '',
89 'heightMobile' => '',
90 'customHeight' => false,
91 'customHeightTablet' => false,
92 'customHeightMobile' => false,
93 ],
94 ],
95 'objectFit' => [
96 'type' => 'object',
97 'default' => [
98 'value' => 'default',
99 'valueTablet' => '',
100 'valueMobile' => '',
101 ],
102 ],
103 'position' => [
104 'type' => 'string',
105 'default' => 'below',
106 ],
107 'imgAltText' => [
108 'type' => 'string',
109 'default' => '',
110 ],
111 'imgTitle' => [
112 'type' => 'string',
113 'default' => '',
114 ],
115 'showNotice' => [
116 'type' => 'boolean',
117 'default' => false
118 ],
119 'transitionTime' => [
120 'type' => 'number',
121 'default' => 3
122 ],
123 'showOverlay' => [
124 'type' => 'boolean',
125 'default' => false
126 ],
127 'showIcon' => [
128 'type' => 'boolean',
129 'default' => false
130 ],
131 'overlayColor' => [
132 'type' => 'string',
133 'default' => '#0202024C'
134 ],
135 'iconColor' => [
136 'type' => 'string',
137 'default' => ''
138 ],
139 ];
140
141 $attributes = array_merge(
142 $attributes,
143 CssFilter::get_attribute( 'cssFilter' ),
144 CssFilter::get_attribute( 'cssHoverFilter' ),
145 Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
146 Border::get_attribute( 'border', true ),
147 Dimensions::get_attribute( 'padding', true ),
148 Range::get_attribute([
149 'attributeName' => 'opacity',
150 'defaultValue' => 1
151 ]),
152 Range::get_attribute([
153 'attributeName' => 'opacityH',
154 'defaultValue' => '',
155 ]),
156 Range::get_attribute([
157 'attributeName' => 'transitionDuration',
158 'defaultValue' => 0.5,
159 ]),
160 Range::get_attribute([
161 'attributeName' => 'filterTransitionDuration',
162 'defaultValue' => 0.5,
163 ]),
164 Range::get_attribute( [
165 'attributeName' => 'iconFontSize',
166 'attributeObjectKey' => 'value',
167 'isResponsive' => true,
168 'defaultValue' => 36,
169 'defaultValueTablet' => 24,
170 'defaultValueMobile' => 16,
171 'hasUnit' => true,
172 'unitDefaultValue' => 'px',
173 ] ),
174 Range::get_attribute( [
175 'attributeName' => 'scrollHeight',
176 'attributeObjectKey' => 'value',
177 'isResponsive' => true,
178 'defaultValue' => 200,
179 ] ),
180 );
181
182 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
183
184