theme_location === "primary-menu" ) {
$disable_search = Busify_Theme_Options::get_option( 'field-header-menu-disable-search' );
if ( ! $disable_search ) {
$items .= '
';
$items .= '';
}
if ( ! empty( $header_last_item ) && $header_last_item === "button" ) {
$btn_text = Busify_Theme_Options::get_option( 'field-header-menu-last-item-button-texxt' );
$btn_link = Busify_Theme_Options::get_option( 'field-header-menu-last-item-btn-link' );
if ( ! empty( $btn_link ) && ! empty( $btn_text ) ) {
$items .= '';
}
}
if ( ! empty( $header_last_item ) && $header_last_item === "text/html" ) {
$html = Busify_Theme_Options::get_option( 'field-header-menu-last-item-btn-custom-text' );
$items .= '';
}
}
return $items;
}
/**
* Add further menus before to main menu
*
* @param $items
* @param $args
*
* @return string
*/
function busify_after_menu_items_adds_before( $items, $args ) {
$header_last_item = Busify_Theme_Options::get_option( 'field-header-menu-last-item' );
if ( $args->theme_location === "primary-menu" ) {
$disable_search = Busify_Theme_Options::get_option( 'field-header-menu-disable-search' );
$new_items = '';
if ( ! $disable_search ) {
$new_items .= '';
$new_items .= '';
}
if ( ! empty( $header_last_item ) && $header_last_item === "button" ) {
$btn_text = Busify_Theme_Options::get_option( 'field-header-menu-last-item-button-texxt' );
$btn_link = Busify_Theme_Options::get_option( 'field-header-menu-last-item-btn-link' );
if ( ! empty( $btn_link ) && ! empty( $btn_text ) ) {
$items .= '';
}
}
if ( ! empty( $header_last_item ) && $header_last_item === "text/html" ) {
$html = Busify_Theme_Options::get_option( 'field-header-menu-last-item-btn-custom-text' );
$items .= '';
}
$items = $new_items . $items;
}
return $items;
}