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/storeengine-coupon-form/attributes.php +91 -0 2.7.5 → 2.14.0 View file →
@@ -1,0 +1,91 @@
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\Alignment;
8 +use ABlocks\Controls\GroupButton;
9 +use ABlocks\Controls\BoxShadow;
10 +use ABlocks\Controls\Range;
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 + // 'inputWidth' => [
26 + // 'type' => 'number',
27 + // 'default' => 300,
28 + // ],
29 + 'input_placeholder' => [
30 + 'type' => 'string',
31 + 'default' => '',
32 + ],
33 + 'buttonColor' => [
34 + 'type' => 'string',
35 + 'default' => '',
36 + ],
37 + 'buttonColorH' => [
38 + 'type' => 'string',
39 + 'default' => '',
40 + ],
41 + 'buttonBackground' => [
42 + 'type' => 'string',
43 + 'default' => '',
44 + ],
45 + 'buttonBackgroundH' => [
46 + 'type' => 'string',
47 + 'default' => '',
48 + ],
49 + 'buttonTitle' => [
50 + 'type' => 'string',
51 + 'default' => '',
52 + ],
53 +
54 +];
55 +
56 +$attributes = array_merge(
57 + $attributes,
58 + Dimensions::get_attribute( 'padding', true ),
59 + Typography::get_attribute( 'buttonTypography', true ),
60 + Border::get_attribute( 'inputBorder', true ),
61 + Border::get_attribute( 'buttonBorder', true ),
62 + Border::get_attribute( 'inputBorderH', true ),
63 + Alignment::get_attribute( 'formAlignment', true, [ 'value' => 'left' ] ),
64 + GroupButton::get_attribute( 'direction', false, [
65 + 'value' => 'column'
66 + ] ),
67 + BoxShadow::get_attribute( 'boxShadow', true ),
68 + Range::get_attribute( [
69 + 'attributeName' => 'inputWidth',
70 + 'attributeObjectKey' => 'value',
71 + 'isResponsive' => true,
72 + 'defaultValue' => 200,
73 + 'defaultValueMobile' => 80,
74 + 'defaultValueTablet' => 100,
75 + 'hasUnit' => true,
76 + 'unitDefaultValue' => 'px',
77 + ] ),
78 + Range::get_attribute( [
79 + 'attributeName' => 'buttonWidth',
80 + 'attributeObjectKey' => 'value',
81 + 'isResponsive' => true,
82 + 'defaultValue' => 200,
83 + 'defaultValueMobile' => 80,
84 + 'defaultValueTablet' => 100,
85 + 'hasUnit' => true,
86 + 'unitDefaultValue' => 'px',
87 + ] ),
88 +);
89 +
90 +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
91 +