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

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

70 lines 1.4 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\Range;
5 use ABlocks\Controls\Dimensions;
6 use ABlocks\Controls\Border;
7 use ABlocks\Controls\BoxShadow;
8 use ABlocks\Controls\Alignment;
9 use ABlocks\Controls\TextShadow;
10 use ABlocks\Controls\TextStroke;
11
12
13 if ( ! defined( 'ABSPATH' ) ) {
14 exit;
15 }
16
17 $attributes = [
18 'block_id' => [
19 'type' => 'string',
20 'default' => '',
21 ],
22 'blockVersion' => [
23 'type' => 'number',
24 'default' => 2,
25 ],
26 'text' => [
27 'type' => 'string',
28 'default' => '',
29 ],
30 'buttonColor' => [
31 'type' => 'string',
32 'default' => '#ffffff',
33 ],
34 'buttonColorH' => [
35 'type' => 'string',
36 'default' => '',
37 ],
38 'buttonBackground' => [
39 'type' => 'string',
40 'default' => '#ea580c',
41 ],
42 'buttonBackgroundH' => [
43 'type' => 'string',
44 'default' => '',
45 ],
46 'badgeFillColor' => [
47 'type' => 'string',
48 'default' => '',
49 ],
50 ];
51
52 $attributes = array_merge(
53 $attributes,
54 Dimensions::get_attribute( 'padding', true ),
55 Border::get_attribute( 'buttonBorder', true ),
56 Alignment::get_attribute( 'buttonAlignment', true, [ 'value' => 'flex-start' ] ),
57 BoxShadow::get_attribute( 'boxShadow', true ),
58 Range::get_attribute([
59 'attributeName' => 'badgeSize',
60 'attributeObjectKey' => 'value',
61 'isResponsive' => true,
62 'defaultValue' => 30,
63 'hasUnit' => false,
64 'unitDefaultValue' => 'px',
65 ]),
66 );
67
68 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
69
70