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

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

106 lines 2.3 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\Range;
8 use ABlocks\Controls\Border;
9 use ABlocks\Controls\Typography;
10 use ABlocks\Controls\TextShadow;
11 use ABlocks\Controls\TextStroke;
12 use ABlocks\Components\ButtonGroup;
13
14
15 $attributes = [
16 'block_id' => [
17 'type' => 'string',
18 'default' => '',
19 ],
20 'blockVersion' => [
21 'type' => 'number',
22 'default' => 2,
23 ],
24 'logoutRedirect' => [
25 'type' => 'string',
26 'default' => 'current-url'
27 ],
28 'logoutCustomUrl' => [
29 'type' => 'string',
30 'default' => ''
31 ],
32 'loginRedirect' => [
33 'type' => 'string',
34 'default' => 'current-url'
35 ],
36 'loginCustomUrl' => [
37 'type' => 'string',
38 'default' => ''
39 ],
40 'logOutLabel' => [
41 'type' => 'string',
42 'default' => 'Logout',
43 ],
44 'logInLabel' => [
45 'type' => 'string',
46 'default' => 'Login',
47 ],
48 'isRedirect' => [
49 'type' => 'boolean',
50 'default' => true,
51 ],
52 'isShowAvatar' => [
53 'type' => 'boolean',
54 'default' => false,
55 ],
56 'logOutLabelColor' => [
57 'type' => 'string',
58 'default' => '',
59 ],
60 'logOutLabelBgColor' => [
61 'type' => 'string',
62 'default' => '',
63 ],
64 'isShowName' => [
65 'type' => 'boolean',
66 'default' => false
67 ],
68 'nameColor' => [
69 'type' => 'string',
70 'default' => ''
71 ],
72 ];
73
74 $attributes = array_merge(
75 $attributes,
76 Alignment::get_attribute( 'labelAlignment', true, [ 'value' => 'flex-start' ] ),
77 ButtonGroup::get_attribute( 'direction', true, [
78 'value' => 'row',
79 ] ),
80 Border::get_attribute( 'avatarBorder', true ),
81 Range::get_attribute([
82 'attributeName' => 'avatarWidth',
83 'attributeObjectKey' => 'value',
84 'isResponsive' => true,
85 'hasUnit' => true,
86 'unitDefaultValue' => 'px',
87 'defaultValue' => 40,
88 ]),
89 Range::get_attribute([
90 'attributeName' => 'avatarHeight',
91 'attributeObjectKey' => 'value',
92 'isResponsive' => true,
93 'hasUnit' => true,
94 'unitDefaultValue' => 'px',
95 'defaultValue' => 40,
96 ]),
97 Typography::get_attribute( 'nameTypography', true ),
98 TextShadow::get_attribute( 'nameTextShadow', true ),
99 TextStroke::get_attribute( 'nameTextStroke', true ),
100 Typography::get_attribute( 'labelTypography', true ),
101 TextShadow::get_attribute( 'labelTextShadow', true ),
102 TextStroke::get_attribute( 'labelTextStroke', true ),
103 );
104
105 return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() );
106