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

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.11.1, at includes/blocks/ecm-upvote-count/attributes.php

126 lines 2.5 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\Typography;
4 use ABlocks\Controls\Range;
5 use ABlocks\Controls\Dimensions;
6 use ABlocks\Controls\Border;
7 use ABlocks\Controls\BoxShadow;
8 use ABlocks\Controls\Alignment;
9 use ABlocks\Components\ButtonGroup;
10
11
12 if ( ! defined( 'ABSPATH' ) ) {
13 exit;
14 }
15
16 $attributes = [
17 'block_id' => [
18 'type' => 'string',
19 'default' => '',
20 ],
21 'blockVersion' => [
22 'type' => 'number',
23 'default' => 2,
24 ],
25 'transition' => [
26 'type' => 'number',
27 'default' => 10,
28 ],
29 'showTitle' => [
30 'type' => 'boolean',
31 'default' => true,
32 ],
33 'fillColor' => [
34 'type' => 'string',
35 'default' => '',
36 ],
37 'iconColor' => [
38 'type' => 'string',
39 'default' => '',
40 ],
41 'titleColor' => [
42 'type' => 'string',
43 'default' => '',
44 ],
45 'bgColor' => [
46 'type' => 'string',
47 'default' => '',
48 ],
49 'activeFillColor' => [
50 'type' => 'string',
51 'default' => '',
52 ],
53 'activeIconColor' => [
54 'type' => 'string',
55 'default' => '',
56 ],
57 'activeTitleColor' => [
58 'type' => 'string',
59 'default' => '',
60 ],
61 'activeBGColor' => [
62 'type' => 'string',
63 'default' => '',
64 ],
65
66 'post_id' => [
67 'type' => 'number',
68 ],
69 'show_label' => [
70 'type' => 'boolean',
71 'default' => true,
72 ],
73 'show_icon' => [
74 'type' => 'boolean',
75 'default' => true,
76 ],
77 'label_single' => [
78 'type' => 'string',
79 'default' => 'upvote',
80 ],
81 'label_plural' => [
82 'type' => 'string',
83 'default' => 'upvotes',
84 ],
85 'wrapper_class' => [
86 'type' => 'string',
87 'default' => 'upvote-count-wrapper',
88 ],
89 'upvoteNumberColor' => [
90 'type' => 'string',
91 'default' => '',
92 ],
93 ];
94
95 $attributes = array_merge(
96 ButtonGroup::get_attribute( 'justificationAlign', true, [
97 'value' => 'center',
98 ] ),
99 Border::get_attribute( 'border', true ),
100 Border::get_attribute( 'activeBorder', true ),
101 Typography::get_attribute( 'titleTypography', true ),
102 Typography::get_attribute( 'activeTitleTypography', true ),
103 Dimensions::get_attribute( 'padding', true ),
104 Range::get_attribute( [
105 'attributeName' => 'iconSize',
106 'attributeObjectKey' => 'value',
107 'isResponsive' => true,
108 'defaultValue' => 20,
109 'hasUnit' => true,
110 'unitDefaultValue' => 'px',
111 ] ),
112 Range::get_attribute( [
113 'attributeName' => 'itemGap',
114 'attributeObjectKey' => 'value',
115 'isResponsive' => true,
116 'defaultValue' => 20,
117 'hasUnit' => true,
118 'unitDefaultValue' => 'px',
119 ] ),
120 $attributes,
121 Alignment::get_attribute( 'countAlignment', true, [ 'value' => 'left' ] ),
122 );
123
124 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
125
126