PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / trunk
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder vtrunk
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 1.2.0 1.2.1 All 78 releases
ablocks / includes / blocks / map / attributes.php

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

97 lines 2.2 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\CssFilter;
9 use ABlocks\Controls\Icon;
10
11 $attributes = [
12 'block_id' => [
13 'type' => 'string',
14 'default' => '',
15 ],
16 'blockVersion' => array(
17 'type' => 'number',
18 'default' => '',
19 ),
20 'mapMarkerList' => [
21 'type' => 'array',
22 'default' => [
23 [
24 'content' => '',
25 'customIconHeight' => 40,
26 'customIconUrl' => '',
27 'customIconWidth' => 25,
28 'iconType' => 'default',
29 'id' => 0,
30 'isDefault' => true,
31 'isOpen' => true,
32 'label' => 'Jhenaidah',
33 'lat' => '23.5433525',
34 'lng' => '89.1696229',
35 'title' => 'Jhenaidah',
36 ]
37 ],
38 ],
39
40 'mapZoom' => [
41 'type' => 'number',
42 'default' => 10,
43 ],
44 'mapType' => [
45 'type' => 'string',
46 'default' => 'GM',
47 ],
48 'scrollWheelZoom' => [
49 'type' => 'boolean',
50 'default' => false,
51 ],
52 'centerIndex' => [
53 'type' => 'number',
54 'default' => 0,
55 ],
56 'iconHeight' => [
57 'type' => 'number',
58 'default' => 40,
59 ],
60 'iconWidth' => [
61 'type' => 'number',
62 'default' => 25,
63 ]
64 ];
65
66 $attributes = array_merge(
67 $attributes,
68 CssFilter::get_attribute( 'cssFilter' ),
69 Range::get_attribute([
70 'attributeName' => 'mapWidth',
71 'attributeObjectKey' => 'value',
72 'isResponsive' => true,
73 'hasUnit' => true,
74 'unitDefaultValue' => '%',
75 'defaultValue' => 100,
76 ]),
77 Range::get_attribute([
78 'attributeName' => 'mapHeight',
79 'attributeObjectKey' => 'value',
80 'isResponsive' => true,
81 'hasUnit' => true,
82 'unitDefaultValue' => 'px',
83 'defaultValue' => 500,
84 ]),
85 Icon::get_attribute( 'icon', [
86 'path' => 'M448 32C483.3 32 512 60.65 512 96V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z',
87 'viewBox' => '0 0 512 512',
88 'className' => '',
89 'size' => '20'
90
91 ] ),
92 );
93
94 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
95
96
97