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 / image-comparison / attributes.php

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

110 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 use ABlocks\Controls\Range;
4 use ABlocks\Controls\Border;
5
6 if ( ! defined( 'ABSPATH' ) ) {
7 exit;
8 }
9
10 $attributes = [
11 'block_id' => [
12 'type' => 'string',
13 'default' => '',
14 ],
15 'beforeImage' => [
16 'type' => 'string',
17 'default' => '',
18 ],
19 'afterImage' => [
20 'type' => 'string',
21 'default' => '',
22 ],
23 'sliderOrientation' => [
24 'type' => 'string',
25 'default' => 'horizontal',
26 ],
27 'showLabels' => [
28 'type' => 'boolean',
29 'default' => false,
30 ],
31 'labelPosition' => [
32 'type' => 'number',
33 'default' => 45,
34 ],
35 'labelBgColor' => [
36 'type' => 'string',
37 'default' => 'rgba(0, 0, 0, 0.5)',
38 ],
39 'labelTextColor' => [
40 'type' => 'string',
41 'default' => 'white',
42 ],
43 'labelWithOverlay' => [
44 'type' => 'boolean',
45 'default' => false,
46 ],
47 'labelOverlayColor' => [
48 'type' => 'string',
49 'default' => 'rgba(0, 0, 0, 0.5)',
50 ],
51 'labelBorderType' => [
52 'type' => 'string',
53 'default' => 'solid',
54 ],
55 'labelOnHover' => [
56 'type' => 'boolean',
57 'default' => false,
58 ],
59 'beforeImageLabel' => [
60 'type' => 'string',
61 'default' => 'Before',
62 ],
63 'afterImageLabel' => [
64 'type' => 'string',
65 'default' => 'After',
66 ],
67 'showHandle' => [
68 'type' => 'boolean',
69 'default' => true,
70 ],
71 'moveOnHover' => [
72 'type' => 'boolean',
73 'default' => false,
74 ],
75 'handleColor' => [
76 'type' => 'string',
77 'default' => 'white',
78 ],
79 'swapImages' => [
80 'type' => 'boolean',
81 'default' => false,
82 ],
83 ];
84 $attributes = array_merge(
85 $attributes,
86 Range::get_attribute( [
87 'attributeName' => 'sliderPosition',
88 'isResponsive' => false,
89 'defaultValue' => 50,
90 ]),
91 Range::get_attribute( [
92 'attributeName' => 'sliderBarSize',
93 'isResponsive' => true,
94 'defaultValue' => 4,
95 ]),
96 Range::get_attribute( [
97 'attributeName' => 'sliderIconSize',
98 'isResponsive' => true,
99 'defaultValue' => 50,
100 ]),
101 Range::get_attribute( [
102 'attributeName' => 'sliderIconBorderSize',
103 'isResponsive' => true,
104 'defaultValue' => 2,
105 ]),
106 Border::get_attribute( 'labelBorder', true ),
107 );
108 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
109
110