PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.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 All 81 releases
← All changes | includes/blocks/image-hotspot/attributes.php +122 -0 2.7.5 → 2.14.0 View file →
@@ -1,0 +1,122 @@
1 +<?php
2 +
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +
7 +use ABlocks\Controls\BoxShadow;
8 +use ABlocks\Controls\Range;
9 +
10 +$attributes = [
11 + 'block_id' => array(
12 + 'type' => 'string',
13 + 'default' => '',
14 + ),
15 + 'blockVersion' => array(
16 + 'type' => 'number',
17 + 'default' => '',
18 + ),
19 + 'backgroundImage' => array(
20 + 'type' => 'string',
21 + 'default' => '',
22 + ),
23 + 'activeIndex' => array(
24 + 'type' => 'number',
25 + 'default' => 0,
26 + ),
27 + // image size option
28 + 'imageSizes' => array(
29 + 'type' => 'object',
30 + 'default' => array(),
31 + ),
32 + 'selectedImageSize' => array(
33 + 'type' => 'string',
34 + 'default' => '',
35 + ),
36 +
37 +
38 + 'pinColor' => array(
39 + 'type' => 'string',
40 + 'default' => '#d9d9d9',
41 + ),
42 + 'pinColorEffect' => array(
43 + 'type' => 'string',
44 + 'default' => '#d9d9d9',
45 + ),
46 + 'pinHoverColor' => array(
47 + 'type' => 'string',
48 + 'default' => '#d9d9d9',
49 + ),
50 + 'pinSize' => array(
51 + 'type' => 'number',
52 + 'default' => 15,
53 + ),
54 + 'pinHoverSize' => array(
55 + 'type' => 'number',
56 + 'default' => 1.5,
57 + ),
58 + 'pinIconColor' => array(
59 + 'type' => 'string',
60 + 'default' => '#ffffff',
61 + ),
62 + 'pinIconSize' => array(
63 + 'type' => 'number',
64 + 'default' => 60,
65 + ),
66 + 'lists' => array(
67 + 'type' => 'array',
68 + 'default' => array(
69 + array(
70 + 'id' => 0,
71 + 'text' => 'Your title here 0',
72 + 'xAxis' => 35,
73 + 'yAxis' => 32,
74 + 'xAxisTab' => 30,
75 + 'yAxisTab' => 28,
76 + 'xAxisMob' => 22,
77 + 'yAxisMob' => 16,
78 + 'isOpen' => false,
79 + 'pinColor' => '',
80 + 'pinColorEffect' => '',
81 + 'pinHoverColor' => '',
82 + 'pinSize' => '',
83 + 'pinHoverSize' => '',
84 + ),
85 + ),
86 + ),
87 + 'animationType' => array(
88 + 'type' => 'string',
89 + 'default' => 'ablocks-hotspot-puls-effect 1s ease infinite',
90 + ),
91 + 'contentAnimation' => array(
92 + 'type' => 'string',
93 + 'default' => 'ablocks-hotspot-fadeIn',
94 + ),
95 + 'contentTrigger' => array(
96 + 'type' => 'string',
97 + 'default' => 'onClick',
98 + ),
99 + 'contentPosition' => array(
100 + 'type' => 'string',
101 + 'default' => 'bottom',
102 + ),
103 + 'backgroundColor' => array(
104 + 'type' => 'string',
105 + 'default' => 'white',
106 + ),
107 +];
108 +
109 +$attributes = array_merge(
110 + $attributes,
111 + Range::get_attribute([
112 + 'attributeName' => 'childWidth',
113 + 'attributeObjectKey' => 'value',
114 + 'isResponsive' => true,
115 + 'defaultValue' => 200,
116 + 'hasUnit' => true,
117 + 'unitDefaultValue' => 'px',
118 + ]),
119 + BoxShadow::get_attribute( 'commonBoxShadow' ),
120 +);
121 +
122 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );