library/Theme/Navigation.php
public function addSearchMagnifier($items, $args = null)
    {
        if (!is_object($args)) {
            $args = (object)$args;
        }

        if ($args && $args->theme_location != apply_filters('Municipio/main_menu_theme_location', 'main-menu')) {
            return $items;
        }

        //Not in child (if inherited from main)
        if ($args && (isset($args->child_menu) && $args->child_menu == true) && $args->theme_location == "main-menu") {
            return $items;
        }

        $search = '<li class="menu-item-search"><a href="#search" class="search-icon-btn toggle-search-top" aria-label="' . __('Search', 'municipio') . '"><span data-tooltip="' . __('Search', 'municipio') . '"><i class="pricon pricon-search"></i></span></a></li>';

        if (isset($args->include_top_level)) {
            $items = $search . $items;
        } else {
            $items .= $search;
        }

        return $items;
    }
public function addSearchMagnifier($items, $args = null)
    {
        if (!is_object($args)) {
            $args = (object)$args;
        }

        if ($args && $args->theme_location != apply_filters('Municipio/main_menu_theme_location', 'main-menu')) {
            return $items;
        }

        //Not in child (if inherited from main)
        if ($args && (isset($args->child_menu) && $args->child_menu == true) && $args->theme_location == "main-menu") {
            return $items;
        }

        $search = '<li class="menu-item-search"><a href="#search" class="search-icon-btn toggle-search-top" aria-label="' . __('Search', 'municipio') . '"><span data-tooltip="' . __('Search', 'municipio') . '"><i class="pricon pricon-search"></i></span></a></li>';

        if (isset($args->include_top_level)) {
            $items = $search . $items;
        } else {
            $items .= $search;
        }

        return $items;
    }
public function addSearchMagnifier ( $ items , $ args = null ) { if ( ! is_object ( $ args ) ) { $ args = ( object ) $ args ; } if ( $ args && $ args -> theme_location != apply_filters ( 'Municipio/main_menu_theme_location' , 'main-menu' ) ) { return $ items ; } //Not in child (if inherited from main) if ( $ args && ( isset ( $ args -> child_menu ) && $ args -> child_menu == true ) && $ args -> theme_location == "main-menu" ) { return $ items ; } $ search = '<li class="menu-item-search"><a href="#search" class="search-icon-btn toggle-search-top" aria-label="' . __ ( 'Search' , 'municipio' ) . '"><span data-tooltip="' . __ ( 'Search' , 'municipio' ) . '"><i class="pricon pricon-search"></i></span></a></li>' ; if ( isset ( $ args -> include_top_level ) ) { $ items = $ search . $ items ; } else { $ items .= $ search ; } return $ items ; }
Adds a search icon to the main menu
@param string $items Menu items html markup
@param object $args  Menu args
Adds a search icon to the main menu