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/single-accordion/attributes.php +131 -0 2.7.7 → 2.14.0 View file →
@@ -1,0 +1,131 @@
1 +<?php
2 +
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit;
5 +}
6 +
7 +use ABlocks\Controls\Typography;
8 +use ABlocks\Controls\TextShadow;
9 +use ABlocks\Controls\TextStroke;
10 +use ABlocks\Controls\Border;
11 +use ABlocks\Controls\Dimensions;
12 +use ABlocks\Controls\Range;
13 +use ABlocks\Controls\Icon;
14 +
15 +$attributes = [
16 + 'block_id' => array(
17 + 'type' => 'string',
18 + 'default' => '',
19 + ),
20 + 'accordionId' => array(
21 + 'type' => 'number',
22 + 'default' => 0,
23 + ),
24 + 'accordionTitle' => [
25 + 'type' => 'string',
26 + 'default' => ''
27 + ],
28 + 'headerTextColor' => [
29 + 'type' => 'string',
30 + 'default' => '',
31 + ],
32 + 'headerTextColorH' => [
33 + 'type' => 'string',
34 + 'default' => '',
35 + ],
36 + 'headerTextActiveColor' => [
37 + 'type' => 'string',
38 + 'default' => '',
39 + ],
40 + 'headerBackgroundActiveColor' => [
41 + 'type' => 'string',
42 + 'default' => '',
43 + ],
44 + 'headerBackgroundColorH' => [
45 + 'type' => 'string',
46 + 'default' => '',
47 + ],
48 + 'headerBackgroundColor' => [
49 + 'type' => 'string',
50 + 'default' => '',
51 + ],
52 + 'iconColor' => [
53 + 'type' => 'string',
54 + 'default' => '',
55 + ],
56 + 'iconColorH' => [
57 + 'type' => 'string',
58 + 'default' => '',
59 + ],
60 + 'bodyBackgroundH' => [
61 + 'type' => 'string',
62 + 'default' => '',
63 + ],
64 + 'bodyBackground' => [
65 + 'type' => 'string',
66 + 'default' => '',
67 + ],
68 + 'parentAttributes' => [
69 + 'type' => 'object',
70 + 'default' => [
71 + 'iconPosition' => 'right',
72 + 'headingTag' => 'p',
73 + 'showIcon' => true,
74 + 'leftCloseIconClass' => 'far fa-arrow-alt-circle-up',
75 + 'leftActiveIconClass' => 'far fa-arrow-alt-circle-down',
76 + 'rightActiveIconClass' => 'fas fa-minus',
77 + 'rightCloseIconClass' => 'fas fa-plus',
78 + ],
79 + ],
80 +];
81 +$attributes = array_merge(
82 + $attributes,
83 + Range::get_attribute([
84 + 'attributeName' => 'iconSize',
85 + 'isResponsive' => false,
86 + 'copyStyle' => true,
87 + 'attributeObjectKey' => 'value',
88 +
89 + ]),
90 + Range::get_attribute( [
91 + 'attributeName' => 'itemSpace',
92 + 'isResponsive' => false,
93 + 'copyStyle' => true,
94 + 'attributeObjectKey' => 'value',
95 + 'hasUnit' => false,
96 + 'unitDefaultValue' => 'px',
97 + ] ),
98 + Icon::get_attribute( 'leftCloseIcon', [
99 + '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',
100 + 'viewBox' => '0 0 512 512',
101 + 'className' => 'far fa-arrow-alt-circle-up',
102 + 'hasNoSelectorOrSource' => true,
103 + ] ),
104 + Icon::get_attribute( 'leftActiveIcon', [
105 + 'path' => 'M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm-32-316v116h-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-67V140c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12z',
106 + 'viewBox' => '0 0 512 512',
107 + 'className' => 'far fa-arrow-alt-circle-down',
108 + 'hasNoSelectorOrSource' => true,
109 + ] ),
110 + Icon::get_attribute( 'rightCloseIcon', [
111 + 'path' => 'M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z',
112 + 'viewBox' => '0 0 448 512',
113 + 'className' => 'fas fa-plus',
114 + 'hasNoSelectorOrSource' => true,
115 + ] ),
116 + Icon::get_attribute( 'rightActiveIcon', [
117 + 'path' => 'M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z',
118 + 'viewBox' => '0 0 448 512',
119 + 'className' => 'fas fa-minus',
120 + 'hasNoSelectorOrSource' => true,
121 + ] ),
122 + Typography::get_attribute( 'headerTypography', true, [ 'weight' => '' ] ),
123 + TextShadow::get_attribute( 'headerTextShadow' ),
124 + TextStroke::get_attribute( 'headerTextStroke', true ),
125 + Border::get_attribute( 'itemBorder', true ),
126 + Dimensions::get_attribute( 'headerPadding', true ),
127 + Dimensions::get_attribute( 'bodyPadding', true ),
128 + Border::get_attribute( 'headerBorder', true )
129 +);
130 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
131 +