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

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

71 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 use ABlocks\Controls\Alignment;
7 use ABlocks\Controls\Typography;
8 use ABlocks\Controls\TextShadow;
9 use ABlocks\Controls\TextStroke;
10 use ABlocks\Controls\Dimensions;
11 use ABlocks\Controls\Icon;
12
13
14 $attributes = [
15 'block_id' => [
16 'type' => 'string',
17 'default' => '',
18 ],
19 'blockVersion' => array(
20 'type' => 'number',
21 'default' => '',
22 ),
23 'heading' => [
24 'type' => 'string',
25 'source' => 'html',
26 'selector' => '.ablocks-notice-title',
27 'default' => 'Add Your Heading Text Here',
28 ],
29 'headingTag' => [
30 'type' => 'string',
31 'default' => 'h1',
32 ],
33 'textColor' => [
34 'type' => 'string',
35 'default' => '',
36 ],
37 'backgroundColor' => [
38 'type' => 'string',
39 'default' => '#EFEFF0',
40 ],
41 'isDismissible' => [
42 'type' => 'boolean',
43 'default' => true,
44 ],
45 'noticeClose' => [
46 'type' => 'string',
47 'default' => 'oneTime',
48
49 ],
50
51 ];
52
53 $attributes = array_merge(
54 $attributes,
55 Alignment::get_attribute( 'alignment', true, [ 'value' => 'left' ] ),
56 Typography::get_attribute( 'typography', true ),
57 TextShadow::get_attribute( 'textShadow' ),
58 TextStroke::get_attribute( 'textStroke', true ),
59 Dimensions::get_attribute( 'noticeHeaderPadding', true ),
60 Icon::get_attribute( 'icon', [
61 'path' => 'M448 32C483.3 32 512 60.65 512 96V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H448zM175 208.1L222.1 255.1L175 303C165.7 312.4 165.7 327.6 175 336.1C184.4 346.3 199.6 346.3 208.1 336.1L255.1 289.9L303 336.1C312.4 346.3 327.6 346.3 336.1 336.1C346.3 327.6 346.3 312.4 336.1 303L289.9 255.1L336.1 208.1C346.3 199.6 346.3 184.4 336.1 175C327.6 165.7 312.4 165.7 303 175L255.1 222.1L208.1 175C199.6 165.7 184.4 165.7 175 175C165.7 184.4 165.7 199.6 175 208.1V208.1z',
62 'viewBox' => '0 0 512 512',
63 'className' => 'far fa-window-close',
64 'size' => 20,
65 ]),
66 );
67
68
69 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
70
71