| 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 |
|
| 82 |
$item_param = $item_class . $item_id; |
| 83 |
|
| 84 |
|
| 85 |
$item_icon_color = 'color-black hcolor-white'; |
| 86 |
$icon = '<i class="' . $item_icon_color . ' ' . $param['item_icon'][ $i ] . '"></i>'; |
| 87 |
|
| 88 |
|
| 89 |
if ( ! empty( $param['item_tooltip_include'][ $i ] ) ) { |
| 90 |
|
| 91 |
if ( $param['item_tooltip_show'][ $i ] == 2 ) { |
| 92 |
$tooltip_class = $tooltip_position[ $i ] . 'em'; |
| 93 |
} else { |
| 94 |
$tooltip_class = $tooltip_position[ $i ]; |
| 95 |
} |
| 96 |
$tooltip = '<em class="' . $tooltip_class . '" >' . $param['item_tooltip'][ $i ] . '</em>'; |
| 97 |
} else { |
| 98 |
$tooltip = ''; |
| 99 |
} |
| 100 |
|
| 101 |
$target = ! empty( $param['open_link'][ $i ] ) ? $param['open_link'][ $i ] : '_self'; |
| 102 |
$link = $param['item_link'][ $i ]; |
| 103 |
$menu .= '<a href="' . $link . '" ' . $item_param . ' target="' . $target . '">' . $icon . '</a>' . $tooltip; |
| 104 |
|
| 105 |
$menu .= '</li>'; |
| 106 |
|
| 107 |
} |
| 108 |
$menu .= '</ul>'; |
| 109 |
$menu .= '</div>'; |
| 110 |
echo $menu; |
| 111 |
|