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-claim-button / attributes.php

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

85 lines 1.8 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\Background;
5 use ABlocks\Controls\Border;
6 use ABlocks\Controls\Dimensions;
7 use ABlocks\Controls\BoxShadow;
8 use ABlocks\Controls\Alignment;
9 use ABlocks\Controls\Range;
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 'post_id' => [
26 'type' => 'number',
27 ],
28 'text' => [
29 'type' => 'string',
30 'default' => '',
31 ],
32 'buttonColor' => [
33 'type' => 'string',
34 'default' => '',
35 ],
36 'buttonColorH' => [
37 'type' => 'string',
38 'default' => '',
39 ],
40 'buttonBackground' => [
41 'type' => 'string',
42 'default' => '',
43 ],
44 'buttonBackgroundH' => [
45 'type' => 'string',
46 'default' => '',
47 ],
48 'pendingBadgeFillColor' => [
49 'type' => 'string',
50 'default' => '#FFFF00',
51 ],
52 'confirmationBandageFillColor' => [
53 'type' => 'string',
54 'default' => '#008000 ',
55 ],
56 ];
57
58 $attributes = array_merge(
59 $attributes,
60 Dimensions::get_attribute( 'padding', true ),
61 Typography::get_attribute( 'buttonTypography', true ),
62 Border::get_attribute( 'buttonBorder', true ),
63 Alignment::get_attribute( 'listAlignment', true, [ 'value' => 'left' ] ),
64 BoxShadow::get_attribute( 'boxShadow', true ),
65 Range::get_attribute([
66 'attributeName' => 'pendingBadgeSize',
67 'attributeObjectKey' => 'value',
68 'isResponsive' => true,
69 'defaultValue' => 20,
70 'hasUnit' => true,
71 'unitDefaultValue' => 'px',
72 ]),
73 Range::get_attribute([
74 'attributeName' => 'confirmationBandageSize',
75 'attributeObjectKey' => 'value',
76 'isResponsive' => true,
77 'defaultValue' => 20,
78 'hasUnit' => true,
79 'unitDefaultValue' => 'px',
80 ]),
81 );
82
83 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
84
85