PluginProbe
Bubble Menu – Floating Button Menu with Sticky Navigation / 3.0.4
Bubble Menu – Floating Button Menu with Sticky Navigation v3.0.4
trunk 1.3 2.0 2.2 2.2.1 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1 3.1.1 4.0 4.0.1 4.0.2 4.0.3 4.0.4 4.0.5 4.0.6 4.0.7 4.1 4.1.1
bubble-menu / public / partials / public.php

public.php in Bubble Menu – Floating Button Menu with Sticky Navigation 3.0.4, at public/partials/public.php

112 lines 3.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! defined( 'ABSPATH' ) ) {
2 exit;
3 }
4
5
6 $position = ' ' . $param['menu'];
7 $shapes = ' ' . $param['shapes'];
8 $animation = ' ' . $param['animation'];
9
10 $menu = '<div class="wow-bmp bmp-mobile-' . $id . $position . $shapes . $animation . '">';
11
12 $menu .= '<input type="checkbox">';
13
14 $color_class = 'color-white hcolor-black';
15 $add_main_class = ! empty( $param['main_class'] ) ? ' ' . $param['main_class'] : '';
16
17 $add_main_id = ! empty( $param['main_id'] ) ? ' id="' . $param['main_id'] . '""' : '';
18
19 $menu .= '<a href="#" class="' . $color_class . $add_main_class . '"' . $add_main_id . '>';
20
21 if ( ! empty( $param['main_icon_custom'] ) ) {
22 $menu .= '<img src="' . $param['main_item_custom_link'] . '">';
23 } else {
24 $icon_color = 'color-black hcolor-white';
25 $menu .= '<i class="' . $icon_color . ' ' . $param['menu_icon'] . '"></i>';
26 }
27
28 $menu .= '</a>';
29
30 $menu .= '<ul>';
31 if ( $param['menu'] == 'wow-bmp-pos-t'
32 || $param['menu'] == 'wow-bmp-pos-r'
33 || $param['menu'] == 'wow-bmp-pos-b'
34 || $param['menu'] == 'wow-bmp-pos-l'
35 ) {
36 $items = 9;
37 } else {
38 $items = 5;
39 }
40
41 switch ( $param['menu'] ) {
42 case 'wow-bmp-pos-tl':
43 $tooltip_position = array( 'br', 'br', 'br', 'br', 'br', 'br' );
44 break;
45 case 'wow-bmp-pos-tr':
46 $tooltip_position = array( 'bl', 'bl', 'bl', 'bl', 'bl', 'bl' );
47 break;
48 case 'wow-bmp-pos-br':
49 $tooltip_position = array( 'tl', 'tl', 'tl', 'tl', 'tl', 'tl' );
50 break;
51 case 'wow-bmp-pos-bl':
52 $tooltip_position = array( 'tr', 'tr', 'tr', 'tr', 'tr', 'tr' );
53 break;
54 case 'wow-bmp-pos-t':
55 $tooltip_position = array( 'br', 'br', 'br', 'br', 'br', 'br', 'bl', 'bl', 'bl', 'bl' );
56 break;
57 case 'wow-bmp-pos-r':
58 $tooltip_position = array( 'bl', 'bl', 'bl', 'bl', 'l', 'l', 'l', 'tl', 'tl', 'tl' );
59 break;
60 case 'wow-bmp-pos-b':
61 $tooltip_position = array( 'tl', 'tl', 'tl', 'tl', 'tl', 'tr', 'tr', 'tr', 'tr', 'tr' );
62 break;
63 case 'wow-bmp-pos-l':
64 $tooltip_position = array( 'tr', 'tr', 'tr', 'tr', 'r', 'r', 'r', 'br', 'br', 'br' );
65 break;
66 }
67
68
69 $count_i = count( $param['item_type'] );
70
71 for ( $i = 0; $i < $count_i; $i ++ ) {
72
73 $menu .= '<li>';
74
75 $item_color = 'color-white hcolor-black';
76 $add_class = ! empty( $param['button_class'][ $i ] ) ? ' ' . $param['button_class'][ $i ] : '';
77
78 $item_class = 'class="' . $item_color . $add_class . '"';
79
80 $item_id = ! empty( $param['button_id'][ $i ] ) ? ' id="' . $param['button_id'][ $i ] . '""' : '';
81 $link_rel = ! empty( $param['link_rel'][ $i ] ) ? ' rel="' . esc_attr( $param['link_rel'][ $i ] ) . '"' : '';
82
83 $item_param = $item_class . $item_id . $link_rel;
84
85
86 $item_icon_color = 'color-black hcolor-white';
87 $icon = '<i class="' . $item_icon_color . ' ' . $param['item_icon'][ $i ] . '"></i>';
88
89
90 if ( ! empty( $param['item_tooltip_include'][ $i ] ) ) {
91
92 if ( $param['item_tooltip_show'][ $i ] == 2 ) {
93 $tooltip_class = $tooltip_position[ $i ] . 'em';
94 } else {
95 $tooltip_class = $tooltip_position[ $i ];
96 }
97 $tooltip = '<em class="' . $tooltip_class . '" >' . $param['item_tooltip'][ $i ] . '</em>';
98 } else {
99 $tooltip = '';
100 }
101
102 $target = ! empty( $param['open_link'][ $i ] ) ? $param['open_link'][ $i ] : '_self';
103 $link = $param['item_link'][ $i ];
104 $menu .= '<a href="' . $link . '" ' . $item_param . ' target="' . $target . '">' . $icon . '</a>' . $tooltip;
105
106 $menu .= '</li>';
107
108 }
109 $menu .= '</ul>';
110 $menu .= '</div>';
111 echo $menu;
112