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/divider/attributes.php +112 -0 1.0.2 → 2.14.0 View file →
@@ -1,0 +1,112 @@
1 +<?php
2 +namespace ABlocks\Blocks\Divider;
3 +
4 +if ( ! defined( 'ABSPATH' ) ) {
5 + exit;
6 +}
7 +
8 +use ABlocks\Controls\Alignment;
9 +use ABlocks\Controls\TextStroke;
10 +use ABlocks\Controls\Typography;
11 +use ABlocks\Controls\Range;
12 +use ABlocks\Controls\Icon;
13 +use ABlocks\Components\ButtonGroup;
14 +
15 +
16 +$attributes = [
17 + 'block_id' => [
18 + 'type' => 'string',
19 + 'default' => '',
20 + ],
21 + 'blockVersion' => array(
22 + 'type' => 'number',
23 + 'default' => '',
24 + ),
25 + 'dividerPatternUrl' => [
26 + 'type' => 'string',
27 + 'default' => 'solid',
28 + ],
29 + 'dividerType' => [
30 + 'type' => 'string',
31 + 'default' => 'css-style',
32 + ],
33 + 'color' => [
34 + 'type' => 'string',
35 + 'default' => '#000000',
36 + ],
37 + 'elementText' => [
38 + 'type' => 'string',
39 + 'default' => 'Divider',
40 + ],
41 + 'elementTextColor' => [
42 + 'type' => 'string',
43 + 'default' => '#000000',
44 + ],
45 + 'elementTextPosition' => [
46 + 'type' => 'string',
47 + 'default' => 'center',
48 + ],
49 +
50 + 'elementIconPosition' => [
51 + 'type' => 'string',
52 + 'default' => 'center',
53 + ],
54 +
55 +
56 +];
57 +
58 +$attributes = array_merge(
59 + Typography::get_attribute( 'elementTextTypography', true ),
60 + TextStroke::get_attribute( 'elementTextStroke', true ),
61 + Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
62 + Icon::get_attribute(),
63 + ButtonGroup::get_attribute( 'element', false, [
64 + 'value' => 'none',
65 + ] ),
66 + Range::get_attribute( [
67 + 'attributeName' => 'width',
68 + 'attributeObjectKey' => 'value',
69 + 'isResponsive' => true,
70 + 'defaultValue' => 100,
71 + 'hasUnit' => true,
72 + 'unitDefaultValue' => '%',
73 + ] ),
74 + Range::get_attribute( [
75 + 'attributeName' => 'weight',
76 + 'isResponsive' => false,
77 + 'defaultValue' => 4,
78 + ] ),
79 + Range::get_attribute( [
80 + 'attributeName' => 'size',
81 + 'isResponsive' => false,
82 + 'defaultValue' => 20,
83 + ] ),
84 + Range::get_attribute( [
85 + 'attributeName' => 'gap',
86 + 'attributeObjectKey' => 'value',
87 + 'isResponsive' => true,
88 + 'defaultValue' => 10,
89 + ] ),
90 + Range::get_attribute( [
91 + 'attributeName' => 'elementTextSpacing',
92 + 'attributeObjectKey' => 'value',
93 + 'isResponsive' => true,
94 + 'defaultValue' => 0,
95 + 'hasUnit' => true,
96 + 'unitDefaultValue' => 'px',
97 + ] ),
98 + Range::get_attribute( [
99 + 'attributeName' => 'elementIconSpacing',
100 + 'attributeObjectKey' => 'value',
101 + 'isResponsive' => true,
102 + 'defaultValue' => 0,
103 + 'defaultValueMobile' => 0,
104 + 'defaultValueTablet' => 0,
105 + 'hasUnit' => true,
106 + 'unitDefaultValue' => 'px',
107 + ] ),
108 + $attributes
109 +);
110 +
111 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
112 +