PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.8.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.8.0
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 1.2.0 1.2.1 All 78 releases
ablocks / includes / blocks / button / attributes.php

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

93 lines 1.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if ( ! defined( 'ABSPATH' ) ) {
4 exit;
5 }
6
7 use ABlocks\Controls\Border;
8 use ABlocks\Controls\Dimensions;
9 use ABlocks\Controls\Typography;
10 use ABlocks\Controls\TextShadow;
11 use ABlocks\Controls\Alignment;
12 use ABlocks\Controls\Link;
13 use ABlocks\Helper;
14 use ABlocks\Controls\BoxShadow;
15 use ABlocks\Controls\Icon;
16 use ABlocks\Controls\Range;
17
18 $attributes = [
19 'block_id' => [
20 'type' => 'string',
21 'default' => '',
22 ],
23 'blockVersion' => array(
24 'type' => 'number',
25 'default' => '',
26 ),
27 'text' => [
28 'type' => 'string',
29 'default' => 'Click here',
30 ],
31 'buttonType' => [
32 'type' => 'string',
33 'default' => '#ddd',
34 ],
35 'buttonSize' => [
36 'type' => 'string',
37 'default' => 'small',
38 ],
39 'textColor' => [
40 'type' => 'string',
41 'default' => '#000000',
42 ],
43 'textColorH' => [
44 'type' => 'string',
45 'default' => '',
46 ],
47 'background' => [
48 'type' => 'string',
49 'default' => '',
50 ],
51 'backgroundH' => [
52 'type' => 'string',
53 'default' => '',
54 ],
55 'transition' => [
56 'type' => 'number',
57 'default' => '',
58 ],
59 'showIcon' => [
60 'type' => 'boolean',
61 'default' => false,
62 ],
63 'iconPosition' => [
64 'type' => 'string',
65 'default' => 'left',
66 ],
67 ];
68
69
70 $attributes = array_merge(
71 $attributes,
72 Icon::get_attribute( 'icon', [ 'size' => '16' ] ),
73 Link::get_attribute( 'link' ),
74 Border::get_attribute( 'border', true ),
75 Dimensions::get_attribute( 'padding', true ),
76 Typography::get_attribute( 'typography', true ),
77 TextShadow::get_attribute( 'textShadow' ),
78 Alignment::get_attribute( 'position', true, [ 'value' => 'left' ] ),
79 Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
80 BoxShadow::get_attribute( 'boxShadow', true ),
81 Range::get_attribute([
82 'attributeName' => 'iconSpace',
83 'attributeObjectKey' => 'value',
84 'isResponsive' => true,
85 'defaultValue' => 10,
86 'hasUnit' => true,
87 'unitDefaultValue' => 'px',
88 ]),
89 );
90
91 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
92
93