| 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 |
if ( ! defined( 'ABSPATH' ) ) { |
| 12 |
exit; |
| 13 |
} |
| 14 |
|
| 15 |
|
| 16 |
// Main Settings |
| 17 |
|
| 18 |
// Position of the menu |
| 19 |
$menu = array( |
| 20 |
'id' => 'position', |
| 21 |
'name' => 'param[menu]', |
| 22 |
'type' => 'select', |
| 23 |
'val' => isset( $param['menu'] ) ? $param['menu'] : 'left', |
| 24 |
'option' => array( |
| 25 |
'left' => esc_attr__( 'Left', $this->plugin['text'] ), |
| 26 |
'right' => esc_attr__( 'Right', $this->plugin['text'] ), |
| 27 |
), |
| 28 |
); |
| 29 |
|
| 30 |
// Menu position help |
| 31 |
$menu_help = array( |
| 32 |
'text' => esc_attr__( 'Specify menu position on screen.', $this->plugin['text'] ), |
| 33 |
); |
| 34 |
|
| 35 |
// Top Offset from start position |
| 36 |
$top_offset = array( |
| 37 |
'name' => 'param[top_offset]', |
| 38 |
'type' => 'number', |
| 39 |
'val' => isset( $param['top_offset'] ) ? $param['top_offset'] : '0', |
| 40 |
'option' => array( |
| 41 |
'placeholder' => '0', |
| 42 |
), |
| 43 |
); |
| 44 |
|
| 45 |
$top_offset_help = array( |
| 46 |
'text' => esc_attr__( 'Top Offset from base position on screen in (px).', $this->plugin['text'] ), |
| 47 |
); |
| 48 |
|
| 49 |
// Offset from start position |
| 50 |
$side_offset = array( |
| 51 |
'name' => 'param[side_offset]', |
| 52 |
'type' => 'number', |
| 53 |
'val' => isset( $param['side_offset'] ) ? $param['side_offset'] : '0', |
| 54 |
'option' => array( |
| 55 |
'placeholder' => '0', |
| 56 |
), |
| 57 |
); |
| 58 |
|
| 59 |
$side_offset_help = array( |
| 60 |
'text' => esc_attr__( 'Side Offset from base position on screen in (px).', $this->plugin['text'] ), |
| 61 |
); |
| 62 |
|
| 63 |
// Menu Vertical alignment |
| 64 |
$align = array( |
| 65 |
'name' => 'param[align]', |
| 66 |
'id' => 'align', |
| 67 |
'class' => '', |
| 68 |
'type' => 'select', |
| 69 |
'val' => isset( $param['align'] ) ? $param['align'] : 'center', |
| 70 |
'option' => array( |
| 71 |
'top' => esc_attr__( 'Top', $this->plugin['text'] ), |
| 72 |
'center' => esc_attr__( 'Center', $this->plugin['text'] ), |
| 73 |
'bottom' => esc_attr__( 'Bottom', $this->plugin['text'] ), |
| 74 |
), |
| 75 |
); |
| 76 |
|
| 77 |
// Menu Vertical alignment help |
| 78 |
$align_help = array( |
| 79 |
'text' => esc_attr__( 'Specify the vertical positioning of the menu.', $this->plugin['text'] ), |
| 80 |
); |
| 81 |
|
| 82 |
|
| 83 |
// Shape for menu item |
| 84 |
$shape = array( |
| 85 |
'name' => 'param[shape]', |
| 86 |
'class' => '', |
| 87 |
'type' => 'select', |
| 88 |
'val' => isset( $param['shape'] ) ? $param['shape'] : 'square', |
| 89 |
'option' => array( |
| 90 |
'square' => esc_attr__( 'Square', $this->plugin['text'] ), |
| 91 |
'round' => esc_attr__( 'Round', $this->plugin['text'] ), |
| 92 |
'rounded' => esc_attr__( 'Rounded', $this->plugin['text'] ), |
| 93 |
'rounded-out' => esc_attr__( 'Rounded-out', $this->plugin['text'] ), |
| 94 |
), |
| 95 |
); |
| 96 |
|
| 97 |
// Shape help |
| 98 |
$shape_help = array( |
| 99 |
'text' => esc_attr__( 'The shape of the buttons. It also determines the shape of the labels.', $this->plugin['text'] ), |
| 100 |
); |
| 101 |
|
| 102 |
// Side Space |
| 103 |
$sideSpace = array( |
| 104 |
'name' => 'param[sideSpace]', |
| 105 |
'class' => '', |
| 106 |
'type' => 'select', |
| 107 |
'val' => isset( $param['sideSpace'] ) ? $param['sideSpace'] : 'true', |
| 108 |
'option' => array( |
| 109 |
'true' => esc_attr__( 'Yes', $this->plugin['text'] ), |
| 110 |
'false' => esc_attr__( 'No', $this->plugin['text'] ), |
| 111 |
), |
| 112 |
); |
| 113 |
|
| 114 |
// Side Space help |
| 115 |
$sideSpace_help = array( |
| 116 |
'text' => esc_attr__( 'If there should be space on the side of the bar.', $this->plugin['text'] ), |
| 117 |
); |
| 118 |
|
| 119 |
// Button Space |
| 120 |
$buttonSpace = array( |
| 121 |
'name' => 'param[buttonSpace]', |
| 122 |
'class' => '', |
| 123 |
'type' => 'select', |
| 124 |
'val' => isset( $param['buttonSpace'] ) ? $param['buttonSpace'] : 'true', |
| 125 |
'option' => array( |
| 126 |
'true' => esc_attr__( 'Yes', $this->plugin['text'] ), |
| 127 |
'false' => esc_attr__( 'No', $this->plugin['text'] ), |
| 128 |
), |
| 129 |
); |
| 130 |
|
| 131 |
// Button Space help |
| 132 |
$buttonSpace_help = array( |
| 133 |
'text' => esc_attr__( 'If there should be space between the buttons.', $this->plugin['text'] ), |
| 134 |
); |
| 135 |
|
| 136 |
// Label On |
| 137 |
$labelsOn = array( |
| 138 |
'name' => 'param[labelsOn]', |
| 139 |
'class' => '', |
| 140 |
'type' => 'select', |
| 141 |
'val' => isset( $param['labelsOn'] ) ? $param['labelsOn'] : 'true', |
| 142 |
'option' => array( |
| 143 |
'true' => esc_attr__( 'Yes', $this->plugin['text'] ), |
| 144 |
'false' => esc_attr__( 'No', $this->plugin['text'] ), |
| 145 |
), |
| 146 |
); |
| 147 |
|
| 148 |
// Label On help |
| 149 |
$labelsOn_help = array( |
| 150 |
'text' => esc_attr__( 'If the labels should be enabled.', $this->plugin['text'] ), |
| 151 |
); |
| 152 |
|
| 153 |
// Label Space |
| 154 |
$labelSpace = array( |
| 155 |
'name' => 'param[labelSpace]', |
| 156 |
'class' => '', |
| 157 |
'type' => 'select', |
| 158 |
'val' => isset( $param['labelSpace'] ) ? $param['labelSpace'] : 'true', |
| 159 |
'option' => array( |
| 160 |
'true' => esc_attr__( 'Yes', $this->plugin['text'] ), |
| 161 |
'false' => esc_attr__( 'No', $this->plugin['text'] ), |
| 162 |
), |
| 163 |
); |
| 164 |
|
| 165 |
// Label Space help |
| 166 |
$labelSpace_help = array( |
| 167 |
'text' => esc_attr__( 'If there should be space between the label and the button.', $this->plugin['text'] ), |
| 168 |
); |
| 169 |
|
| 170 |
// Label Connected |
| 171 |
$labelConnected = array( |
| 172 |
'name' => 'param[labelConnected]', |
| 173 |
'class' => '', |
| 174 |
'type' => 'select', |
| 175 |
'val' => isset( $param['labelConnected'] ) ? $param['labelConnected'] : 'true', |
| 176 |
'option' => array( |
| 177 |
'true' => esc_attr__( 'Yes', $this->plugin['text'] ), |
| 178 |
'false' => esc_attr__( 'No', $this->plugin['text'] ), |
| 179 |
), |
| 180 |
); |
| 181 |
|
| 182 |
// Label Connected help |
| 183 |
$labelConnected_help = array( |
| 184 |
'text' => esc_attr__( 'If the button and label should be visually connected or not. If they are connected, when the label appears, it looks like it expands from the button.', |
| 185 |
$this->plugin['text'] ), |
| 186 |
); |
| 187 |
|
| 188 |
// Label Animate |
| 189 |
$labelEffect = array( |
| 190 |
'name' => 'param[labelEffect]', |
| 191 |
'class' => '', |
| 192 |
'type' => 'select', |
| 193 |
'val' => isset( $param['labelEffect'] ) ? $param['labelEffect'] : 'none', |
| 194 |
'option' => array( |
| 195 |
'none' => esc_attr__( 'None', $this->plugin['text'] ), |
| 196 |
'fade' => esc_attr__( 'Fade', $this->plugin['text'] ), |
| 197 |
'slide' => esc_attr__( 'Slide', $this->plugin['text'] ), |
| 198 |
'slide-out' => esc_attr__( 'Slide-out', $this->plugin['text'] ), |
| 199 |
'slide-out-fade' => esc_attr__( 'Slide-out-fade', $this->plugin['text'] ), |
| 200 |
'slide-in' => esc_attr__( 'Slide-in', $this->plugin['text'] ), |
| 201 |
'slide-out-out' => esc_attr__( 'Slide-out-out', $this->plugin['text'] ), |
| 202 |
'slide-in-in' => esc_attr__( 'Slide-in-in', $this->plugin['text'] ), |
| 203 |
), |
| 204 |
); |
| 205 |
|
| 206 |
// Label Connected help |
| 207 |
$labelEffect_help = array( |
| 208 |
'text' => esc_attr__( 'The appearance effect of the button label', $this->plugin['text'] ), |
| 209 |
); |
| 210 |
|
| 211 |
// Label Speed |
| 212 |
$labelSpeed = array( |
| 213 |
'name' => 'param[labelSpeed]', |
| 214 |
'type' => 'number', |
| 215 |
'val' => isset( $param['labelSpeed'] ) ? $param['labelSpeed'] : '400', |
| 216 |
'option' => array( |
| 217 |
'min' => '0', |
| 218 |
'step' => '1', |
| 219 |
'placeholder' => '400', |
| 220 |
), |
| 221 |
); |
| 222 |
|
| 223 |
$labelSpeed_help = array( |
| 224 |
'text' => esc_attr__( 'Set the time is in milliseconds.', $this->plugin['text'] ), |
| 225 |
); |
| 226 |
|
| 227 |
// Sub Menu Settings |
| 228 |
|
| 229 |
// Sub Position |
| 230 |
$subPosition = array( |
| 231 |
'name' => 'param[subPosition]', |
| 232 |
'class' => '', |
| 233 |
'type' => 'select', |
| 234 |
'val' => isset( $param['subPosition'] ) ? $param['subPosition'] : 'under', |
| 235 |
'option' => array( |
| 236 |
'under' => esc_attr__( 'Under', $this->plugin['text'] ), |
| 237 |
'side' => esc_attr__( 'Side', $this->plugin['text'] ), |
| 238 |
'circular' => esc_attr__( 'Сircular', $this->plugin['text'] ), |
| 239 |
), |
| 240 |
); |
| 241 |
|
| 242 |
// Sub Position help |
| 243 |
$subPosition_help = array( |
| 244 |
'text' => esc_attr__( 'The position of the subbar.', $this->plugin['text'] ), |
| 245 |
); |
| 246 |
|
| 247 |
// Sub Space |
| 248 |
$subSpace = array( |
| 249 |
'name' => 'param[subSpace]', |
| 250 |
'class' => '', |
| 251 |
'type' => 'select', |
| 252 |
'val' => isset( $param['subSpace'] ) ? $param['subSpace'] : 'true', |
| 253 |
'option' => array( |
| 254 |
'true' => esc_attr__( 'Yes', $this->plugin['text'] ), |
| 255 |
'false' => esc_attr__( 'No', $this->plugin['text'] ), |
| 256 |
), |
| 257 |
); |
| 258 |
|
| 259 |
// Sub Space help |
| 260 |
$subSpace_help = array( |
| 261 |
'text' => esc_attr__( 'If there should be space between the subbar and the button.', $this->plugin['text'] ), |
| 262 |
); |
| 263 |
|
| 264 |
// Sub Open |
| 265 |
$subOpen = array( |
| 266 |
'name' => 'param[subOpen]', |
| 267 |
'class' => '', |
| 268 |
'type' => 'select', |
| 269 |
'val' => isset( $param['subOpen'] ) ? $param['subOpen'] : 'mouseover', |
| 270 |
'option' => array( |
| 271 |
'mouseover' => esc_attr__( 'Mouseover', $this->plugin['text'] ), |
| 272 |
'click' => esc_attr__( 'Click', $this->plugin['text'] ), |
| 273 |
), |
| 274 |
); |
| 275 |
|
| 276 |
// Sub Space help |
| 277 |
$subOpen_help = array( |
| 278 |
'text' => esc_attr__( 'If the subbar should be opened on mouseover or on click.', $this->plugin['text'] ), |
| 279 |
); |
| 280 |
|
| 281 |
|
| 282 |
// Sub Effect |
| 283 |
$subEffect = array( |
| 284 |
'name' => 'param[subEffect]', |
| 285 |
'class' => '', |
| 286 |
'type' => 'select', |
| 287 |
'val' => isset( $param['subEffect'] ) ? $param['subEffect'] : 'none', |
| 288 |
'option' => array( |
| 289 |
'none' => esc_attr__( 'None', $this->plugin['text'] ), |
| 290 |
'fade' => esc_attr__( 'Fade', $this->plugin['text'] ), |
| 291 |
'slide' => esc_attr__( 'Slide', $this->plugin['text'] ), |
| 292 |
'linear-fade' => esc_attr__( 'Linear-fade', $this->plugin['text'] ), |
| 293 |
'linear-slide' => esc_attr__( 'Linear-slide', $this->plugin['text'] ), |
| 294 |
), |
| 295 |
); |
| 296 |
|
| 297 |
// Sub Space help |
| 298 |
$subEffect_help = array( |
| 299 |
'text' => esc_attr__( 'The appearance effect of the subbar.', $this->plugin['text'] ), |
| 300 |
); |
| 301 |
|
| 302 |
// Sub Speed (ms) |
| 303 |
$subSpeed = array( |
| 304 |
'name' => 'param[subSpeed]', |
| 305 |
'type' => 'number', |
| 306 |
'val' => isset( $param['subSpeed'] ) ? $param['subSpeed'] : '400', |
| 307 |
'option' => array( |
| 308 |
'min' => '0', |
| 309 |
'step' => '1', |
| 310 |
'placeholder' => '400', |
| 311 |
), |
| 312 |
); |
| 313 |
|
| 314 |
$subSpeed_help = array( |
| 315 |
'text' => esc_attr__( 'Set the time is in milliseconds.', $this->plugin['text'] ), |
| 316 |
); |
| 317 |
|
| 318 |
// Popup Settings |
| 319 |
|
| 320 |
// Horizontal position |
| 321 |
$windowhorizontalPosition = array( |
| 322 |
'name' => 'param[windowhorizontalPosition]', |
| 323 |
'class' => '', |
| 324 |
'type' => 'select', |
| 325 |
'val' => isset( $param['windowhorizontalPosition'] ) ? $param['windowhorizontalPosition'] : 'center', |
| 326 |
'option' => array( |
| 327 |
'center' => esc_attr__( 'Center', $this->plugin['text'] ), |
| 328 |
'left' => esc_attr__( 'Left', $this->plugin['text'] ), |
| 329 |
'right' => esc_attr__( 'Right', $this->plugin['text'] ), |
| 330 |
), |
| 331 |
); |
| 332 |
|
| 333 |
$windowhorizontalPosition_help = array( |
| 334 |
'text' => esc_attr__( 'Set the horizontal position of the window.', $this->plugin['text'] ), |
| 335 |
); |
| 336 |
|
| 337 |
// Vertical position |
| 338 |
$windowverticalPosition = array( |
| 339 |
'name' => 'param[windowverticalPosition]', |
| 340 |
'class' => '', |
| 341 |
'type' => 'select', |
| 342 |
'val' => isset( $param['windowverticalPosition'] ) ? $param['windowverticalPosition'] : 'center', |
| 343 |
'option' => array( |
| 344 |
'center' => esc_attr__( 'Center', $this->plugin['text'] ), |
| 345 |
'top' => esc_attr__( 'Top', $this->plugin['text'] ), |
| 346 |
'bottom' => esc_attr__( 'Bottom', $this->plugin['text'] ), |
| 347 |
), |
| 348 |
); |
| 349 |
|
| 350 |
$windowverticalPosition_help = array( |
| 351 |
'text' => esc_attr__( 'Set the vertical position of the window.', $this->plugin['text'] ), |
| 352 |
); |
| 353 |
|
| 354 |
// Corners |
| 355 |
$windowCorners = array( |
| 356 |
'name' => 'param[windowCorners]', |
| 357 |
'class' => '', |
| 358 |
'type' => 'select', |
| 359 |
'val' => isset( $param['windowCorners'] ) ? $param['windowCorners'] : 'match', |
| 360 |
'option' => array( |
| 361 |
'match' => esc_attr__( 'Match', $this->plugin['text'] ), |
| 362 |
'square' => esc_attr__( 'Square', $this->plugin['text'] ), |
| 363 |
'round' => esc_attr__( 'Round', $this->plugin['text'] ), |
| 364 |
), |
| 365 |
); |
| 366 |
|
| 367 |
$windowCorners_help = array( |
| 368 |
'text' => esc_attr__( 'The type of the window corners.', $this->plugin['text'] ), |
| 369 |
); |
| 370 |
|
| 371 |
// Color |
| 372 |
$windowColor = array( |
| 373 |
'name' => 'param[windowColor]', |
| 374 |
'class' => '', |
| 375 |
'type' => 'select', |
| 376 |
'val' => isset( $param['windowColor'] ) ? $param['windowColor'] : 'default', |
| 377 |
'option' => array( |
| 378 |
'default' => esc_attr__( 'Default', $this->plugin['text'] ), |
| 379 |
'black' => esc_attr__( 'Black', $this->plugin['text'] ), |
| 380 |
'red' => esc_attr__( 'Red', $this->plugin['text'] ), |
| 381 |
'yellow' => esc_attr__( 'Yellow', $this->plugin['text'] ), |
| 382 |
'blue' => esc_attr__( 'Blue', $this->plugin['text'] ), |
| 383 |
), |
| 384 |
); |
| 385 |
|
| 386 |
$windowColor_help = array( |
| 387 |
'text' => esc_attr__( 'The color of the header of the window.', $this->plugin['text'] ), |
| 388 |
); |
| 389 |
|
| 390 |
// Icon & Label Size |
| 391 |
|
| 392 |
// Icon size (px) |
| 393 |
$iconSize = array( |
| 394 |
'name' => 'param[iconSize]', |
| 395 |
'type' => 'number', |
| 396 |
'val' => isset( $param['iconSize'] ) ? $param['iconSize'] : '24', |
| 397 |
'option' => array( |
| 398 |
'min' => '0', |
| 399 |
'step' => '1', |
| 400 |
'placeholder' => '24', |
| 401 |
), |
| 402 |
); |
| 403 |
|
| 404 |
$iconSize_help = array( |
| 405 |
'text' => esc_attr__( 'Set the size for menu icons.', $this->plugin['text'] ), |
| 406 |
); |
| 407 |
|
| 408 |
// Icon size for mobile |
| 409 |
$mobiliconSize = array( |
| 410 |
'name' => 'param[mobiliconSize]', |
| 411 |
'type' => 'number', |
| 412 |
'val' => isset( $param['mobiliconSize'] ) ? $param['mobiliconSize'] : '24', |
| 413 |
'option' => array( |
| 414 |
'min' => '0', |
| 415 |
'step' => '1', |
| 416 |
'placeholder' => '24', |
| 417 |
), |
| 418 |
); |
| 419 |
|
| 420 |
$mobiliconSize_help = array( |
| 421 |
'text' => esc_attr__( 'Set the Icons size on mobile devices.', $this->plugin['text'] ), |
| 422 |
); |
| 423 |
|
| 424 |
// Mobile Screen (px) |
| 425 |
$mobilieScreen = array( |
| 426 |
'name' => 'param[mobilieScreen]', |
| 427 |
'type' => 'number', |
| 428 |
'val' => isset( $param['mobilieScreen'] ) ? $param['mobilieScreen'] : '480', |
| 429 |
'option' => array( |
| 430 |
'min' => '0', |
| 431 |
'step' => '1', |
| 432 |
'placeholder' => '480', |
| 433 |
), |
| 434 |
); |
| 435 |
|
| 436 |
$mobilieScreen_help = array( |
| 437 |
'text' => esc_attr__( 'Set the size screen for mobile devices when use Icon size for mobile.', $this->plugin['text'] ), |
| 438 |
); |
| 439 |
|
| 440 |
// Label size (px) |
| 441 |
$labelSize = array( |
| 442 |
'name' => 'param[labelSize]', |
| 443 |
'type' => 'number', |
| 444 |
'val' => isset( $param['labelSize'] ) ? $param['labelSize'] : '15', |
| 445 |
'option' => array( |
| 446 |
'min' => '0', |
| 447 |
'step' => '1', |
| 448 |
'placeholder' => '24', |
| 449 |
), |
| 450 |
); |
| 451 |
|
| 452 |
$labelSize_help = array( |
| 453 |
'text' => esc_attr__( 'Set the size for menu labels.', $this->plugin['text'] ), |
| 454 |
); |
| 455 |
|
| 456 |
// Label size for mobile (px) |
| 457 |
$mobillabelSize = array( |
| 458 |
'name' => 'param[mobillabelSize]', |
| 459 |
'type' => 'number', |
| 460 |
'val' => isset( $param['mobillabelSize'] ) ? $param['mobillabelSize'] : '15', |
| 461 |
'option' => array( |
| 462 |
'min' => '0', |
| 463 |
'step' => '1', |
| 464 |
'placeholder' => '24', |
| 465 |
), |
| 466 |
); |
| 467 |
|
| 468 |
$mobillabelSize_help = array( |
| 469 |
'text' => esc_attr__( 'Set the Labels size on mobile devices.', $this->plugin['text'] ), |
| 470 |
); |
| 471 |
|
| 472 |
|
| 473 |
// Show After Position |
| 474 |
$showAfterPosition = array( |
| 475 |
'name' => 'param[showAfterPosition]', |
| 476 |
'type' => 'number', |
| 477 |
'val' => isset( $param['showAfterPosition'] ) ? $param['showAfterPosition'] : '0', |
| 478 |
'option' => array( |
| 479 |
'min' => '0', |
| 480 |
'step' => '1', |
| 481 |
'placeholder' => '0', |
| 482 |
), |
| 483 |
); |
| 484 |
|
| 485 |
// Show After Position helper |
| 486 |
$showAfterPosition_help = array( |
| 487 |
'text' => esc_attr__( 'If the sidebar should be shown only after the page was scrolled beyond a certain point.', |
| 488 |
$this->plugin['text'] ), |
| 489 |
); |
| 490 |
|
| 491 |
|
| 492 |
// Z-index |
| 493 |
$z_index = array( |
| 494 |
'name' => 'param[zindex]', |
| 495 |
'type' => 'number', |
| 496 |
'val' => isset( $param['zindex'] ) ? $param['zindex'] : '9999', |
| 497 |
'option' => array( |
| 498 |
'min' => '0', |
| 499 |
'step' => '1', |
| 500 |
), |
| 501 |
); |
| 502 |
|
| 503 |
// Show After Position |
| 504 |
$hideAfterPosition = array( |
| 505 |
'name' => 'param[hideAfterPosition]', |
| 506 |
'type' => 'number', |
| 507 |
'val' => isset( $param['hideAfterPosition'] ) ? $param['hideAfterPosition'] : '0', |
| 508 |
'option' => array( |
| 509 |
'min' => '0', |
| 510 |
'step' => '1', |
| 511 |
'placeholder' => '0', |
| 512 |
), |
| 513 |
); |
| 514 |
|
| 515 |
// Show After Position helper |
| 516 |
$hideAfterPosition_help = array( |
| 517 |
'text' => esc_attr__( 'If the sidebar should be hide only after the page was scrolled beyond a certain point.', |
| 518 |
$this->plugin['text'] ), |
| 519 |
); |