function dt_sc_slider_search($atts, $content = null) { extract(shortcode_atts(array('title' => '', 'button_title' => '', 'button_link' => '#'), $atts)); $content = DTCoreShortcodesDefination::dtShortcodeHelper($content); $search_text = empty($_REQUEST['s']) ? '' : get_search_query(); if (dttheme_get_page_permalink_by_its_template('tpl-courses-search.php') != '') { $action = dttheme_get_page_permalink_by_its_template('tpl-courses-search.php'); $srch_str = 'searchtext'; } else { $action = esc_url(home_url('/')); $srch_str = 's'; } $out = '<div class="slider-search"> <form method="post" id="courses-search" class="courses-search" action="' . $action . '"> <input id="' . $srch_str . '" name="' . $srch_str . '" type="text" value="' . $search_text . '" placeholder="' . __('Search Course', 'dt_themes') . '" /> <input type="hidden" name="search-type" value="courses" /> <input type="hidden" name="lang" value="' . ICL_LANGUAGE_CODE . '"/>; <input type="submit" value=""> </form>'; if ($title != '') { $out .= '<h4>' . $title . '</h4>'; } if ($button_title != '') { $out .= '<a href="' . $button_link . '" title="' . $button_title . '"> ' . $button_title . ' <span class="fa fa-angle-double-right"> </span> </a>'; } $out .= '</div>'; return $out; }
} } ?> <!-- ** Primary Section ** --> <section id="primary" class="<?php echo $page_layout; ?> "><?php if (have_posts()) { while (have_posts()) { the_post(); if (is_user_logged_in()) { get_template_part('framework/loops/content', 'userdashboard'); } else { $link = dttheme_get_page_permalink_by_its_template('tpl-login.php'); $link = !empty($link) ? $link : home_url(); echo "<a href='{$link}' class='dt-sc-button small'><i class='fa fa-sign-in'></i>" . __("Login", "dt_themes") . "</a>"; } } } ?> </section><!-- ** Primary Section End ** --><?php if ($show_sidebar) { if ($show_right_sidebar) { ?> <!-- Secondary Right --> <section id="secondary-right" class="secondary-sidebar <?php echo $sidebar_class; ?> "><?php
$login = is_null($login) ? home_url() . "/wp-login.php" : $login; ?> <li><a href="<?php echo $login; ?> " title="<?php _e('Login / Register Now', 'dt_themes'); ?> "><i class="fa fa-user"></i><?php echo __('Login', 'dt_themes') . '<span> | </span>' . __('Register', 'dt_themes'); ?> </a></li> <?php } else { $current_user = wp_get_current_user(); $welcome = dttheme_get_page_permalink_by_its_template('tpl-welcome.php'); if (dttheme_is_plugin_active('s2member/s2member.php')) { $login_welcome_page = get_option('ws_plugin__s2member_cache'); $login_welcome_page = $login_welcome_page['login_welcome_page']; $page = $login_welcome_page['page']; if (!empty($page)) { $link = $login_welcome_page['link']; $title = get_the_title($page); echo '<li><a href="' . $link . '">' . get_avatar($current_user->ID, 30) . '<span>' . __('Welcome, ', 'dt_themes') . ' ' . $current_user->display_name . ' | </span>' . '</a></li>'; } elseif (!is_null($welcome)) { echo '<li><a href="' . $welcome . '">' . get_avatar($current_user->ID, 30) . '<span>' . __('Welcome, ', 'dt_themes') . ' ' . $current_user->display_name . ' | </span>' . '</a></li>'; } } elseif (!is_null($welcome)) { echo '<li><a href="' . $welcome . '">' . get_avatar($current_user->ID, 30) . '<span>' . __('Welcome, ', 'dt_themes') . ' ' . $current_user->display_name . ' | </span>' . '</a></li>'; } else { echo '<li><a href="#">' . get_avatar($current_user->ID, 30) . '<span>' . __('Welcome, ', 'dt_themes') . ' ' . $current_user->display_name . ' | </span>' . '</a></li>';