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

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

114 lines 2.1 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 'blockVersion' => array(
16 'type' => 'number',
17 'default' => '',
18 ),
19 'beforeImage' => [
20 'type' => 'string',
21 'default' => '',
22 ],
23 'afterImage' => [
24 'type' => 'string',
25 'default' => '',
26 ],
27 'sliderOrientation' => [
28 'type' => 'string',
29 'default' => 'horizontal',
30 ],
31 'showLabels' => [
32 'type' => 'boolean',
33 'default' => false,
34 ],
35 'labelPosition' => [
36 'type' => 'number',
37 'default' => 45,
38 ],
39 'labelBgColor' => [
40 'type' => 'string',
41 'default' => 'rgba(0, 0, 0, 0.5)',
42 ],
43 'labelTextColor' => [
44 'type' => 'string',
45 'default' => 'white',
46 ],
47 'labelWithOverlay' => [
48 'type' => 'boolean',
49 'default' => false,
50 ],
51 'labelOverlayColor' => [
52 'type' => 'string',
53 'default' => 'rgba(0, 0, 0, 0.5)',
54 ],
55 'labelBorderType' => [
56 'type' => 'string',
57 'default' => 'solid',
58 ],
59 'labelOnHover' => [
60 'type' => 'boolean',
61 'default' => false,
62 ],
63 'beforeImageLabel' => [
64 'type' => 'string',
65 'default' => 'Before',
66 ],
67 'afterImageLabel' => [
68 'type' => 'string',
69 'default' => 'After',
70 ],
71 'showHandle' => [
72 'type' => 'boolean',
73 'default' => true,
74 ],
75 'moveOnHover' => [
76 'type' => 'boolean',
77 'default' => false,
78 ],
79 'handleColor' => [
80 'type' => 'string',
81 'default' => 'white',
82 ],
83 'swapImages' => [
84 'type' => 'boolean',
85 'default' => false,
86 ],
87 ];
88 $attributes = array_merge(
89 $attributes,
90 Range::get_attribute( [
91 'attributeName' => 'sliderPosition',
92 'isResponsive' => false,
93 'defaultValue' => 50,
94 ]),
95 Range::get_attribute( [
96 'attributeName' => 'sliderBarSize',
97 'isResponsive' => true,
98 'defaultValue' => 4,
99 ]),
100 Range::get_attribute( [
101 'attributeName' => 'sliderIconSize',
102 'isResponsive' => true,
103 'defaultValue' => 50,
104 ]),
105 Range::get_attribute( [
106 'attributeName' => 'sliderIconBorderSize',
107 'isResponsive' => true,
108 'defaultValue' => 2,
109 ]),
110 Border::get_attribute( 'labelBorder', true ),
111 );
112 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
113
114