Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package WordPress
- * @subpackage Sweetdate
- * @author SeventhQueen <themesupport@seventhqueen.com>
- * @since Sweetdate 1.0
- */
- /**
- * Sweetdate Child Theme Functions
- * Add extra code or replace existing functions
- */
- if ( ! function_exists( 'kleo_search_menu_item' ) ) {
- /**
- * Add search to menu
- *
- * @param string $items
- * @param oject $args
- *
- * @return string
- */
- function kleo_search_menu_item( $items, $args ) {
- if ( $args->theme_location == 'primary' ) {
- ob_start();
- get_template_part( 'page-parts/header-ajaxsearch' );
- $form = ob_get_clean();
- if(is_user_logged_in()) {
- $items .= '<li id="nav-menu-item-search" class="menu-item kleo-menu-item-search"><i class="icon icon-search"></i>' . $form . '';
- }
- }
- return $items;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement