function vid_list_3() { $menu_list = _op_launch_menu_list(); $str = ' <ul class="video-list video-list-3">'; foreach ($menu_list as $menu) { $str .= '<li' . ($menu['selected'] ? ' class="selected"' : '') . '>' . ($menu['active'] ? '<a href="' . $menu['link'] . '">' . $menu['text'] . '</a>' : '<span>' . $menu['text'] . '</span>') . '</li>'; } $str .= ' </ul>'; return $str; }
function launch_navigation($atts) { $op_fonts = new OptimizePress_Fonts(); extract(shortcode_atts(array('style' => 1, 'font_size' => '', 'font_family' => '', 'font_style' => '', 'font_color' => '', 'font_spacing' => '', 'font_shadow' => ''), $atts)); $active = $inactive = ''; switch ($style) { case 1: case 2: $active = '<a href="{link}"><img width="163" height="102" src="{image}" alt="" /> {text}</a>'; $inactive = '<p><img width="163" height="102" src="{image}" alt="" /> {text}</p>'; break; case 3: $active = '<p><a href="{link}">{text}</a></p>'; $inactive = '<p><span>{text}</span></p>'; break; case 4: case 7: case 8: case 9: $active = '<a href="{link}">{text}</a>'; $inactive = '<span>{text}</span>'; break; case 10: $active = '<a href="{link}"><div class="thumb"><img src="{image}" class="scale-with-grid" /></div><span>{text}</span></a>'; $inactive = '<div class="thumb"><img src="{image}" class="scale-with-grid" /></div><span>{text}</span>'; break; } $str = ''; $menu_items = _op_launch_menu_list(); if (!empty($menu_items)) { foreach ($menu_items as $menu) { $tpl = $inactive; $class = ''; if ($menu['active'] === true) { /*$class = 'active';*/ $class = ''; $tpl = $active; } if ($menu['selected'] === true) { $class .= ($class == '' ? '' : ' ') . 'active current-page'; } if (!empty($menu['text'])) { $menu['text'] = stripslashes($menu['text']); } $str .= '<li' . ($class == '' ? '' : ' class="' . $class . '"') . '>' . op_convert_template($tpl, $menu) . '</li>'; } $font_family_css = ''; $font_style_css = ''; $font_shadow_css = ''; if (!empty($font_family) && $font_family != 'undefined') { $font_family_css = 'font-family: ' . $font_family . ';'; $op_fonts->add_font($font_family); } if (!empty($font_style) && $font_style != 'undefined') { if ($font_style == 'italic') { $font_style_css = 'font-style: italic;'; } elseif ($font_style == 'bold italic') { $font_style_css = 'font-style: italic; font-weight: bold;'; } else { $font_style_css = 'font-weight: ' . $font_style . ';'; } } if (!empty($font_shadow) && $font_shadow != 'undefined') { switch (strtolower(str_replace(' ', '', $font_shadow))) { case '': case 'none': $font_shadow_css = 'none'; break; case 'light': $font_shadow_css = '1px 1px 0px rgba(255,255,255,0.5)'; break; case 'dark': default: $font_shadow_css = '0 1px 1px #000000, 0 1px 1px rgba(0, 0, 0, 0.5)'; } $font_shadow_css = 'text-shadow: ' . $font_shadow_css . ';'; } $id = op_generate_id(); $className = $style >= 7 && $style <= 10 ? 'launch-nav-style-' . $style : 'video-navigation-' . $style; $str = ' <style> #video-navigation-' . $id . ' ul li a{ ' . (!empty($font_size) && $font_size != 'undefined' ? 'font-size: ' . $font_size . 'px;' : '') . ' ' . (!empty($font_family_css) ? $font_family_css : '') . ' ' . (!empty($font_style_css) ? $font_style_css : '') . ' ' . (!empty($font_color) && $font_color != 'undefined' ? 'color: ' . $font_color . ';' : '') . ' ' . (!empty($font_spacing) && $font_spacing != 'undefined' ? 'letter-spacing: ' . $font_spacing . 'px;' : '') . ' ' . (!empty($font_shadow_css) ? $font_shadow_css : '') . ' } </style> <div id="video-navigation-' . $id . '" class="video-navigation ' . $className . '"> <ul class="cf">' . $str . '</ul> </div>'; } else { if (is_admin()) { $str = '<p>' . __('This navigation bar will only display when added to a page which has been added to funnel as a funnel stage', OP_SN) . '</p>'; } } return $str; }