PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / 5.0
Floating Button – Easily Create Sticky, Fixed & Floating Buttons v5.0
trunk 2.0.2 3.0 4.0 4.1.2 4.3 5.0 5.0.1 5.1 5.1.1 5.2 5.3 5.3.1 6.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 All 31 releases
floating-button / admin / settings / options / main.php

main.php in Floating Button – Easily Create Sticky, Fixed & Floating Buttons 5.0, at admin/settings/options/main.php

235 lines 6.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Main Settings param
4 *
5 * @package Wow_Plugin
6 * @copyright Copyright (c) 2018, Dmytro Lobov
7 * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
8 * @since 1.0
9 */
10
11
12 $position_checked = ! empty( $param['position'] ) ? $param['position'] : 'flBtn-position-br';
13
14 switch ( $position_checked ) {
15 case 'fl-right fl-bottom':
16 $position_value = 'flBtn-position-br';
17 break;
18 case 'fl-left fl-bottom':
19 $position_value = 'flBtn-position-bl';
20 break;
21 case 'fl-right fl-top':
22 $position_value = 'flBtn-position-tr';
23 break;
24 case 'fl-left fl-top':
25 $position_value = 'flBtn-position-tl';
26 break;
27 default:
28 $position_value = $position_checked;
29 break;
30 }
31
32
33 $position = array(
34 'id' => 'position',
35 'name' => 'param[position]',
36 'type' => 'select',
37 'val' => $position_value,
38 'option' => array(
39 'flBtn-position-br' => esc_attr__( 'bottom-right', 'floating-button' ),
40 ),
41 );
42
43 $position_help = array(
44 'text' => esc_attr__( 'Specify floating button location on screen.', 'floating-button' ),
45 );
46
47 include_once( 'icons.php' );
48 $icons_new = array();
49 foreach ( $icons as $key => $value ) {
50 $icons_new[ $value ] = $value;
51 }
52
53 $button_icon = array(
54 'id' => 'button_icon',
55 'name' => 'param[button_icon]',
56 'class' => 'icons',
57 'type' => 'select',
58 'val' => isset( $param['button_icon'] ) ? $param['button_icon'] : 'fas fa-hand-point-up',
59 'option' => $icons_new,
60 'func' => '',
61 );
62
63 $button_icon_help = array(
64 'text' => esc_attr__( 'Select the Icon for button', 'floating-button' ),
65 );
66
67 $shape_checked = ! empty( $param['shape'] ) ? $param['shape'] : 'flBtn-position-br';
68
69 switch ( $shape_checked ) {
70 case 'fl-circle':
71 $shape_value = 'flBtn-shape-circle';
72 break;
73 case 'fl-ellipse':
74 $shape_value = 'flBtn-shape-ellipse';
75 break;
76 case 'fl-square':
77 $shape_value = 'flBtn-shape-square';
78 break;
79 case 'fl-rsquare':
80 $shape_value = 'flBtn-shape-rsquare';
81 break;
82 default:
83 $shape_value = $shape_checked;
84 break;
85 }
86
87 $shape = array(
88 'id' => 'shape',
89 'name' => 'param[shape]',
90 'type' => 'select',
91 'val' => $shape_value,
92 'option' => array(
93 'flBtn-shape-circle' => esc_attr__( 'Circle', 'floating-button' ),
94 ),
95 'func' => '',
96 );
97
98 $size = array(
99 'id' => 'size',
100 'name' => 'param[size]',
101 'type' => 'select',
102 'val' => isset( $param['size'] ) ? $param['size'] : 'flBtn-size-medium',
103 'option' => array(
104 'flBtn-size-medium' => esc_attr__( 'Medium', 'floating-button' ),
105 ),
106 'func' => '',
107 );
108
109 $animation = array(
110 'id' => 'animation',
111 'name' => 'param[animation]',
112 'type' => 'select',
113 'val' => isset( $param['animation'] ) ? $param['animation'] : '',
114 'option' => array(
115 '' => esc_attr__( 'Fade', 'floating-button' ),
116 ),
117 'func' => '',
118 );
119
120 $item_tooltip_include = array(
121 'name' => 'param[item_tooltip_include]',
122 'type' => 'checkbox',
123 'class' => 'tooltip-include',
124 'val' => isset( $param['item_tooltip_include'] ) ? $param['item_tooltip_include'] : 0,
125 'func' => 'itemtooltip(this);',
126 );
127
128 $item_tooltip = array(
129 'name' => 'param[item_tooltip]',
130 'class' => 'item-tooltip',
131 'type' => 'text',
132 'val' => isset( $param['item_tooltip'] ) ? $param['item_tooltip'] : '',
133
134 );
135
136 $button_color = array(
137 'id' => 'button_color',
138 'name' => 'param[button_color]',
139 'type' => 'color',
140 'val' => isset( $param['button_color'] ) ? $param['button_color'] : '#009688',
141 );
142
143 $button_hcolor = array(
144 'id' => 'button_hcolor',
145 'name' => 'param[button_hcolor]',
146 'type' => 'color',
147 'val' => isset( $param['button_hcolor'] ) ? $param['button_hcolor'] : '#009688',
148 );
149
150 $icon_color = array(
151 'id' => 'icon_color',
152 'name' => 'param[icon_color]',
153 'type' => 'color',
154 'val' => isset( $param['icon_color'] ) ? $param['icon_color'] : '#fff',
155 );
156
157 $tooltip_background = array(
158 'id' => 'tooltip_background',
159 'name' => 'param[tooltip_background]',
160 'type' => 'color',
161 'val' => isset( $param['tooltip_background'] ) ? $param['tooltip_background'] : '#585858',
162 );
163
164 $tooltip_color = array(
165 'id' => 'tooltip_color',
166 'name' => 'param[tooltip_color]',
167 'type' => 'color',
168 'val' => isset( $param['tooltip_color'] ) ? $param['tooltip_color'] : '#fff',
169 );
170
171 $main_button_id = array(
172 'name' => 'param[main_button_id]',
173 'id' => 'main_button_id',
174 'type' => 'text',
175 'val' => isset( $param['main_button_id'] ) ? $param['main_button_id'] : '',
176 );
177
178 $main_button_id_help = array(
179 'text' => esc_attr__( 'Set ID for element.', 'floating-button' ),
180 );
181
182 $main_button_class = array(
183 'name' => 'param[main_button_class]',
184 'id' => 'main_button_class',
185 'type' => 'text',
186 'val' => isset( $param['main_button_class'] ) ? $param['main_button_class'] : '',
187 );
188
189 $main_button_class_help = array(
190 'title' => esc_attr__( 'Set Class for element.', 'floating-button' ),
191 'ul' => array(
192 __( 'You may enter several classes separated by a space.', 'floating-button' ),
193 ),
194 );
195
196
197 // Button animation
198 $button_animation = array(
199 'name' => 'param[button_animation]',
200 'type' => 'select',
201 'val' => isset( $param['button_animation'] ) ? $param['button_animation'] : '',
202 'option' => array(
203 '' => esc_attr__( 'None', 'floating-button' ),
204 ),
205 );
206
207 $button_animation_helper = array(
208 'text' => esc_attr__( 'Animation for main button', 'floating-button' ),
209 );
210
211 $item_type = array(
212 'name' => 'param[item_type]',
213 'type' => 'select',
214 'class' => 'item-type',
215 'id' => 'mainType',
216 'val' => isset( $param['item_type'] ) ? $param['item_type'] : '',
217 'option' => array(
218 'main' => esc_attr__( 'Main Button', 'floating-button' ),
219 ),
220 'func' => 'itemtype(this);',
221 );
222
223 $item_type_help = array(
224 'title' => esc_attr__( 'Types of the button which can be select', 'floating-button' ),
225 'ul' => array(
226 __( '<strong>Main Button</strong> - button has some sub buttons', 'floating-button' ),
227 ),
228 );
229
230 $item_type_menu_help = array(
231 'title' => esc_attr__( 'Types of the button which can be select', 'floating-button' ),
232 'ul' => array(
233 __( '<strong>Link</strong> - insert any link', 'floating-button' ),
234 ),
235 );