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
ablocks / includes / blocks / ecm-claim-badge / attributes.php

attributes.php in aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder 2.14.0, at includes/blocks/ecm-claim-badge/attributes.php

83 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 use ABlocks\Controls\Typography;
3 use ABlocks\Controls\Range;
4 use ABlocks\Controls\Dimensions;
5 use ABlocks\Controls\Border;
6 use ABlocks\Controls\BoxShadow;
7 use ABlocks\Controls\Alignment;
8
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 $attributes = [
15 'block_id' => [
16 'type' => 'string',
17 'default' => '',
18 ],
19 'blockVersion' => [
20 'type' => 'number',
21 'default' => 2,
22 ],
23 'post_id' => [
24 'type' => 'number',
25 ],
26 'text' => [
27 'type' => 'string',
28 'default' => '',
29 ],
30 'textColor' => [
31 'type' => 'string',
32 'default' => '#b300ef',
33 ],
34 'buttonColor' => [
35 'type' => 'string',
36 'default' => '',
37 ],
38 'buttonColorH' => [
39 'type' => 'string',
40 'default' => '',
41 ],
42 'buttonBackground' => [
43 'type' => 'string',
44 'default' => '',
45 ],
46 'buttonBackgroundH' => [
47 'type' => 'string',
48 'default' => '',
49 ],
50 'badgeFillColor' => [
51 'type' => 'string',
52 'default' => '',
53 ],
54 ];
55
56 $attributes = array_merge(
57 $attributes,
58 Dimensions::get_attribute( 'padding', true ),
59 Border::get_attribute( 'buttonBorder', true ),
60 Alignment::get_attribute( 'buttonAlignment', true, [ 'value' => 'left' ] ),
61 Typography::get_attribute( 'textTypography', true ),
62 BoxShadow::get_attribute( 'boxShadow', true ),
63 Range::get_attribute([
64 'attributeName' => 'bandageHeight',
65 'attributeObjectKey' => 'value',
66 'isResponsive' => true,
67 'defaultValue' => 20,
68 'hasUnit' => true,
69 'unitDefaultValue' => 'px',
70 ]),
71 Range::get_attribute([
72 'attributeName' => 'textGap',
73 'attributeObjectKey' => 'value',
74 'isResponsive' => true,
75 'defaultValue' => 10,
76 'hasUnit' => true,
77 'unitDefaultValue' => 'px',
78 ]),
79 );
80
81 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
82
83