Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( ! function_exists( 'kleo_search_menu_item' ) ) {
- /**
- * Add search to menu
- *
- * @param string $items
- * @param object $args
- *
- * @return string
- */
- function kleo_search_menu_item( $items, $args ) {
- if ( sq_option( 'ajax_search', 1 ) == 'logged_in' && ! is_user_logged_in() ) {
- return $items;
- }
- $location = sq_option( 'menu_search_location', 'primary' );
- if ( $args->theme_location == $location ) {
- $form = echo do_shortcode('[wpdreams_ajaxsearchpro id=1])');
- $items .= '<li id="nav-menu-item-search" class="menu-item kleo-search-nav">' . $form . '</li>';
- }
- return $items;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement