PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.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 1.1.2 All 80 releases
ablocks / includes / blocks / coupon / attributes.php

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

92 lines 2.0 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\Alignment;
8 use ABlocks\Controls\Icon;
9 use ABlocks\Controls\Range;
10 use ABlocks\Controls\Typography;
11 use ABlocks\Controls\TextShadow;
12 use ABlocks\Controls\Dimensions;
13 use ABlocks\Controls\Border;
14
15 $attributes = [
16 'block_id' => [
17 'type' => 'string',
18 'default' => ''
19 ],
20 'blockVersion' => array(
21 'type' => 'number',
22 'default' => '',
23 ),
24 'couponStyle' => [
25 'type' => 'string',
26 'default' => 'default'
27 ],
28 'couponCode' => [
29 'type' => 'string',
30 'default' => 'KODEZEN50'
31 ],
32 'couponBtnText' => [
33 'type' => 'string',
34 'default' => 'Copy Code'
35 ],
36 'couponBtnAfterCopyText' => [
37 'type' => 'string',
38 'default' => 'Copied!'
39 ],
40
41 'couponCodeColor' => [
42 'type' => 'string',
43 'default' => '#000000',
44 ],
45 'couponCodeBgColor' => [
46 'type' => 'string',
47 'default' => '#ffffff',
48 ],
49 'couponBtnTextColor' => [
50 'type' => 'string',
51 'default' => '#ffffff',
52 ],
53 'couponBtnBgColor' => [
54 'type' => 'string',
55 'default' => '#000000',
56 ],
57
58 'isShowIcon' => [
59 'type' => 'boolean',
60 'default' => true,
61 ],
62 ];
63
64
65 $attributes = array_merge(
66 Range::get_attribute( [
67 'attributeName' => 'iconSize',
68 'isResponsive' => true,
69 'attributeObjectKey' => 'value',
70 'defaultValue' => 20,
71 ]),
72 Range::get_attribute( [
73 'attributeName' => 'iconRotate',
74 'isResponsive' => false,
75 'defaultValue' => 0,
76 ]),
77 Icon::get_attribute( 'icon', [ 'size' => '20' ] ),
78 Alignment::get_attribute( 'position', true, [ 'value' => 'left' ] ),
79 Typography::get_attribute( 'couponTypography', true ),
80 TextShadow::get_attribute( 'couponTextShadow' ),
81 Typography::get_attribute( 'buttonTypography', true ),
82 TextShadow::get_attribute( 'buttonTextShadow' ),
83 Dimensions::get_attribute( 'couponPadding', true ),
84 Dimensions::get_attribute( 'buttonPadding', true ),
85 Border::get_attribute( 'couponBorder', true ),
86 Border::get_attribute( 'buttonBorder', true ),
87 $attributes
88 );
89
90 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
91
92