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 / content-timeline / attributes.php

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

108 lines 2.6 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 'iconColor' => [
20 'type' => 'string',
21 'default' => '#000000'
22 ],
23 'iconBackgroundColor' => [
24 'type' => 'string',
25 'default' => '#eee'
26 ],
27 'thicknessColor' => [
28 'type' => 'string',
29 'default' => '#eee',
30 ],
31 'contentBackgroundColor' => [
32 'type' => 'string',
33 'default' => '#eee'
34 ],
35 'showDate' => [
36 'type' => 'boolean',
37 'default' => true,
38 ],
39 'showDateTablet' => [
40 'type' => 'boolean',
41 'default' => true,
42 ],
43 'showDateMobile' => [
44 'type' => 'boolean',
45 'default' => true,
46 ],
47 'dateColor' => [
48 'type' => 'string',
49 'default' => '#333333'
50 ],
51 'dateFormat' => [
52 'type' => 'string',
53 'default' => 'F j, Y',
54 ],
55 'dateBackground' => [
56 'type' => 'string',
57 'default' => '#eee',
58 ]
59 ];
60 $attributes = array_merge(
61 $attributes,
62 Range::get_attribute( [
63 'attributeName' => 'iconBackgroundSize',
64 'isResponsive' => false,
65 'defaultValue' => 48,
66 ] ),
67 Range::get_attribute([
68 'attributeName' => 'itemGap',
69 'attributeObjectKey' => 'value',
70 'isResponsive' => true,
71 'defaultValue' => 10,
72 'hasUnit' => true,
73 'unitDefaultValue' => 'px'
74 ] ),
75 Range::get_attribute([
76 'attributeName' => 'thickness',
77 'isResponsive' => false,
78 'defaultValue' => 3,
79 ] ),
80 Range::get_attribute([
81 'attributeName' => 'iconSize',
82 'isResponsive' => false,
83 'defaultValue' => 18,
84 ] ),
85 Icon::get_attribute(
86 'contentTimeLineIcon', [
87 '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',
88 'viewBox' => '0 0 512 512',
89 'className' => 'far fa-arrow-alt-circle-up',
90 ]
91 ),
92 ButtonGroup::get_attribute( 'contentPosition', false, [
93 'value' => 'center',
94 ] ),
95 ButtonGroup::get_attribute( 'arrowAlignment', false, [
96 'value' => 'center',
97 ] ),
98 ButtonGroup::get_attribute( 'dateAlign', false, [
99 'value' => 'left',
100 ] ),
101 Dimensions::get_attribute( 'contentPadding', true ),
102 Typography::get_attribute( 'dateTypography', true ),
103 Dimensions::get_attribute( 'datePadding', true ),
104 Border::get_attribute( 'dateBorder', true ),
105 );
106 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
107
108