PluginProbe
Floating Button – Easily Create Sticky, Fixed & Floating Buttons / 4.0
Floating Button – Easily Create Sticky, Fixed & Floating Buttons v4.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 / public / partials / public.php

public.php in Floating Button – Easily Create Sticky, Fixed & Floating Buttons 4.0, at public/partials/public.php

113 lines 3.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Public code
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 if ( ! defined( 'ABSPATH' ) ) {
11 exit;
12 }
13
14 $menu_icon = '<i class="' . $param['button_icon'] . '"></i>';
15
16
17 $menu = '<div class="flBtn flBtn-position-br flBtn-size-medium flBtn-shape-circle" id="floatBtn-' . $id . '">';
18 $menu .= '<input type="checkbox">';
19 $menu .= '<a role="button" data-role="main">' . $menu_icon . '</a>';
20
21 // Build Vertical button menu
22
23 if ( ! empty( $param['menu_1']['item_type'] ) ) :
24 $menu .= '<ul class="flBtn-first">';
25 $count_i = count( $param['menu_1']['item_type'] );
26
27 for ( $i = 0; $i < $count_i; $i ++ ) {
28 $menu .= '<li>';
29
30 $icon = '<i class="' . $param['menu_1']['item_icon'][ $i ] . '"></i>';
31
32 if ( ! empty( $param['menu_1']['item_tooltip_include'][ $i ] ) ) {
33 $tooltip = ' tooltip="' . $param['menu_1']['item_tooltip'][ $i ] . '"';
34 } else {
35 $tooltip = '';
36 }
37
38 $item_type = $param['menu_1']['item_type'][ $i ];
39 $link_param = $tooltip;
40 $link = $param['menu_1']['item_link'][ $i ];
41
42 switch ( $item_type ) {
43 case 'link':
44 $menu .= '<a href="' . $link . '" ' . $link_param . '>' . $icon . '</a>';
45 break;
46 case 'login':
47 $menu .= '<a rel="nofollow" href="' . wp_login_url( $link ) . '" ' . $link_param . '>' . $icon
48 . '</a>';
49 break;
50 case 'logout':
51 $menu .= '<a rel="nofollow" href="' . wp_logout_url( $link ) . '" ' . $link_param . '>' . $icon
52 . '</a>';
53 break;
54 case 'register':
55 $menu .= '<a rel="nofollow" href="' . wp_registration_url() . '" ' . $link_param . '>' . $icon
56 . '</a>';
57 break;
58 case 'lostpassword':
59 $menu .= '<a rel="nofollow" href="' . wp_lostpassword_url( $link ) . '" ' . $link_param . '>'
60 . $icon . '</a>';
61 break;
62
63 }
64 $menu .= '</li>';
65 }
66 $menu .= '</ul>';
67 endif;
68
69 // Build Horizontal button menu
70 if ( ! empty( $param['menu_2']['item_type'] ) ) :
71 $menu .= '<ul class="flBtn-second">';
72 $count_i = count( $param['menu_2']['item_type'] );
73 for ( $i = 0; $i < $count_i; $i ++ ) {
74 $menu .= '<li>';
75 $icon = '<i class="' . $param['menu_2']['item_icon'][ $i ] . '"></i>';
76 if ( ! empty( $param['menu_2']['item_tooltip_include'][ $i ] ) ) {
77
78 $tooltip = ' tooltip="' . $param['menu_2']['item_tooltip'][ $i ] . '"';
79 } else {
80 $tooltip = '';
81 }
82 $item_type = $param['menu_2']['item_type'][ $i ];
83 $link_param = $tooltip;
84 $link = $param['menu_2']['item_link'][ $i ];
85
86 switch ( $item_type ) {
87 case 'link':
88 $menu .= '<a href="' . $link . '" ' . $link_param . '>' . $icon . '</a>';
89 break;
90 case 'login':
91 $menu .= '<a rel="nofollow" href="' . wp_login_url( $link ) . '" ' . $link_param . '>' . $icon
92 . '</a>';
93 break;
94 case 'logout':
95 $menu .= '<a rel="nofollow" href="' . wp_logout_url( $link ) . '" ' . $link_param . '>' . $icon
96 . '</a>';
97 break;
98 case 'register':
99 $menu .= '<a rel="nofollow" href="' . wp_registration_url() . '" ' . $link_param . '>' . $icon
100 . '</a>';
101 break;
102 case 'lostpassword':
103 $menu .= '<a rel="nofollow" href="' . wp_lostpassword_url( $link ) . '" ' . $link_param . '>'
104 . $icon . '</a>';
105 break;
106 }
107 $menu .= '</li>';
108 }
109 $menu .= '</ul>';
110 endif;
111 $menu .= '</div>';
112 echo $menu;
113