PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.9.1
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.9.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 / coupon / attributes.php

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

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