PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.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 / content-timeline / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.9.0, at includes/blocks/content-timeline/attributes.php

147 lines 3.4 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 use ABlocks\Controls\Range;
7 use ABlocks\Helper;
8 use ABlocks\Controls\Dimensions;
9 use ABlocks\Controls\Border;
10 use ABlocks\Controls\Typography;
11 use ABlocks\Controls\Icon;
12 use ABlocks\Components\ButtonGroup;
13
14 $attributes = [
15 'block_id' => [
16 'type' => 'string',
17 'default' => '',
18 ],
19 'blockVersion' => array(
20 'type' => 'number',
21 'default' => '',
22 ),
23 'iconColor' => [
24 'type' => 'string',
25 'default' => '#000000'
26 ],
27 'iconBackgroundColor' => [
28 'type' => 'string',
29 'default' => '#eee'
30 ],
31 'thicknessColor' => [
32 'type' => 'string',
33 'default' => '#eee',
34 ],
35 'contentBackgroundColor' => [
36 'type' => 'string',
37 'default' => '#eee'
38 ],
39 'showDate' => [
40 'type' => 'boolean',
41 'default' => true,
42 ],
43 'showDateTablet' => [
44 'type' => 'boolean',
45
46 ],
47 'showDateMobile' => [
48 'type' => 'boolean',
49 'default' => true,
50 ],
51 'showAnimation' => [
52 'type' => 'boolean',
53 'default' => false,
54 ],
55 'connectorAnimationColor' => [
56 'type' => 'string',
57 'default' => '#00ad6b',
58 ],
59 'dateColor' => [
60 'type' => 'string',
61 'default' => '#333333'
62 ],
63 'connectorAnimationColor' => [
64 'type' => 'string',
65 'default' => '00ad6b'
66 ],
67 'dateFormat' => [
68 'type' => 'string',
69 'default' => 'F j, Y',
70 ],
71 'dateBackground' => [
72 'type' => 'string',
73 'default' => '#eee',
74 ],
75 'showAnimation' => [
76 'type' => 'boolean',
77 'default' => false,
78 ]
79 ];
80 $attributes = array_merge(
81 $attributes,
82 Range::get_attribute( [
83 'attributeName' => 'iconBackgroundSize',
84 'isResponsive' => false,
85 'defaultValue' => 48,
86 ] ),
87 Range::get_attribute([
88 'attributeName' => 'itemGap',
89 'attributeObjectKey' => 'value',
90 'isResponsive' => true,
91 'defaultValue' => 10,
92 'hasUnit' => true,
93 'unitDefaultValue' => 'px'
94 ] ),
95 Range::get_attribute([
96 'attributeName' => 'thickness',
97 'isResponsive' => false,
98 'defaultValue' => 3,
99 ] ),
100 Range::get_attribute([
101 'attributeName' => 'iconSize',
102 'attributeObjectKey' => 'value',
103 'isResponsive' => true,
104 'hasUnit' => true,
105 'unitDefaultValue' => 'px',
106 'defaultValue' => 18,
107 ] ),
108 Range::get_attribute([
109 'attributeName' => 'lineLeft',
110 'attributeObjectKey' => 'value',
111 'isResponsive' => true,
112 'hasUnit' => true,
113 'unitDefaultValue' => 'px',
114 'defaultValue' => 0,
115 ] ),
116 Range::get_attribute([
117 'attributeName' => 'lineRight',
118 'attributeObjectKey' => 'value',
119 'isResponsive' => true,
120 'hasUnit' => true,
121 'unitDefaultValue' => 'px',
122 'defaultValue' => 0,
123 ] ),
124 Icon::get_attribute(
125 'contentTimeLineIcon', [
126 'path' => 'M256 504c137 0 248-111 248-248S393 8 256 8 8 119 8 256s111 248 248 248zm0-448c110.5 0 200 89.5 200 200s-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56zm20 328h-40c-6.6 0-12-5.4-12-12V256h-67c-10.7 0-16-12.9-8.5-20.5l99-99c4.7-4.7 12.3-4.7 17 0l99 99c7.6 7.6 2.2 20.5-8.5 20.5h-67v116c0 6.6-5.4 12-12 12z',
127 'viewBox' => '0 0 512 512',
128 'className' => 'far fa-arrow-alt-circle-up',
129 ]
130 ),
131 ButtonGroup::get_attribute( 'contentPosition', false, [
132 'value' => 'center',
133 ] ),
134 ButtonGroup::get_attribute( 'arrowAlignment', false, [
135 'value' => 'center',
136 ] ),
137 ButtonGroup::get_attribute( 'dateAlign', false, [
138 'value' => 'left',
139 ] ),
140 Dimensions::get_attribute( 'contentPadding', true ),
141 Typography::get_attribute( 'dateTypography', true ),
142 Dimensions::get_attribute( 'datePadding', true ),
143 Border::get_attribute( 'dateBorder', true ),
144 );
145 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
146
147