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/price-menu-item/attributes.php +155 -0 1.0.2 → 2.14.0 View file →
@@ -1,0 +1,155 @@
1 +<?php
2 +
3 +use ABlocks\Controls\Alignment;
4 +use ABlocks\Controls\Range;
5 +use ABlocks\Controls\Typography;
6 +use ABlocks\Controls\GroupButton;
7 +use ABlocks\Controls\TextShadow;
8 +use ABlocks\Controls\TextStroke;
9 +use ABlocks\Controls\Icon;
10 +if ( ! defined( 'ABSPATH' ) ) {
11 + exit;
12 +}
13 +
14 +$attributes = [
15 + 'block_id' => [
16 + 'type' => 'string',
17 + 'default' => '',
18 + ],
19 + 'device' => [
20 + 'type' => 'string',
21 + 'default' => '',
22 + ],
23 + 'allowIcon' => [
24 + 'type' => 'boolean',
25 + 'default' => true,
26 + ],
27 + 'allowDescription' => [
28 + 'type' => 'boolean',
29 + 'default' => true,
30 + ],
31 + 'allowDivider' => [
32 + 'type' => 'boolean',
33 + 'default' => true,
34 + ],
35 + 'title' => [
36 + 'type' => 'string',
37 + 'default' => 'Sushi Roll...',
38 + ],
39 + 'titleTag' => [
40 + 'type' => 'string',
41 + 'default' => 'p',
42 + ],
43 + 'titleColor' => [
44 + 'type' => 'string',
45 + 'default' => '',
46 + ],
47 + 'description' => [
48 + 'type' => 'string',
49 + 'source' => 'html',
50 + 'selector' => '.ablocks-price-menu-item-details-des',
51 + 'default' => 'Lorem ipsum dolor sit amet consectetur adipiscing, elit praesent. Sed do eiusmod tempor incididunt aliqua.',
52 + ],
53 + 'descriptionTag' => [
54 + 'type' => 'string',
55 + 'default' => 'p',
56 + ],
57 + 'descriptionColor' => [
58 + 'type' => 'string',
59 + 'default' => '',
60 + ],
61 + // divider related attributes
62 + 'placeDivider' => [
63 + 'type' => 'string',
64 + 'default' => 'near title',
65 + ],
66 + 'dividerPatternUrl' => [
67 + 'type' => 'string',
68 + 'default' => '',
69 + ],
70 + 'dividerType' => [
71 + 'type' => 'string',
72 + 'default' => '',
73 + ],
74 + 'color' => [
75 + 'type' => 'string',
76 + 'default' => '',
77 + ],
78 + 'price' => [
79 + 'type' => 'string',
80 + 'source' => 'html',
81 + 'selector' => '.ablocks-price-menu-item-price',
82 + 'default' => '$15.00',
83 + ],
84 + 'placePrice' => [
85 + 'type' => 'string',
86 + 'default' => 'right',
87 + ],
88 + 'priceTag' => [
89 + 'type' => 'string',
90 + 'default' => 'p',
91 + ],
92 + 'priceColor' => [
93 + 'type' => 'string',
94 + 'default' => '',
95 + ],
96 +];
97 +
98 +$attributes = array_merge(
99 + $attributes,
100 + Typography::get_attribute( 'titleTypography', true ),
101 + TextShadow::get_attribute( 'titleTextShadow' ),
102 + TextStroke::get_attribute( 'titleTextStroke', true ),
103 + Typography::get_attribute( 'descriptionTypography', true ),
104 + TextShadow::get_attribute( 'descriptionTextShadow' ),
105 + TextStroke::get_attribute( 'descriptionTextStroke', true ),
106 + Typography::get_attribute( 'priceTypography', true ),
107 + TextShadow::get_attribute( 'priceTextShadow' ),
108 + TextStroke::get_attribute( 'priceTextStroke', true ),
109 + Icon::get_attribute( 'icon', [
110 + 'size' => '40',
111 + 'iconType' => 'stacked',
112 + 'iconShape' => 'square',
113 + ] ),
114 + Typography::get_attribute( 'elementTextTypography', true ),
115 + TextStroke::get_attribute( 'elementTextStroke', true ),
116 + Alignment::get_attribute( 'alignment', true, [ 'value' => '' ] ),
117 + Alignment::get_attribute( 'titleAlignment', true, [ 'value' => '' ] ),
118 + Alignment::get_attribute( 'descriptionAlignment', true, [ 'value' => '' ] ),
119 + Alignment::get_attribute( 'priceAlignment', true, [ 'value' => '' ] ),
120 + GroupButton::get_attribute( 'itemsDirection', true, [
121 + 'value' => 'row',
122 + ] ),
123 + Range::get_attribute( [
124 + 'attributeName' => 'width',
125 + 'attributeObjectKey' => 'value',
126 + 'isResponsive' => true,
127 + 'defaultValue' => null,
128 + 'defaultValueMobile' => null,
129 + 'defaultValueTablet' => null,
130 + 'hasUnit' => false,
131 + ] ),
132 + Range::get_attribute( [
133 + 'attributeName' => 'weight',
134 + 'isResponsive' => false,
135 + 'defaultValue' => null,
136 + ] ),
137 + Range::get_attribute( [
138 + 'attributeName' => 'size',
139 + 'isResponsive' => false,
140 + 'defaultValue' => null,
141 + ] ),
142 + Range::get_attribute( [
143 + 'attributeName' => 'gap',
144 + 'attributeObjectKey' => 'value',
145 + 'isResponsive' => true,
146 + 'defaultValue' => 10,
147 + 'defaultValueMobile' => 3,
148 + 'defaultValueTablet' => 1,
149 + 'hasUnit' => true,
150 + 'unitDefaultValue' => 'px',
151 + ] ),
152 +);
153 +
154 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
155 +