';
}
return $items;
}
endif;
add_filter('wp_nav_menu_items', 'rox_search_menu_icon', 10, 2);
/*----------------------------------------------------------------------
* Function for mobile menu icon
*----------------------------------------------------------------------*/
if (!function_exists('rox_mobile_icon')) {
function rox_mobile_icon()
{
/*
* Function Name : rox_mobile_icon
* Description : Function to show mobile menu , Applied in master head
* Function Hooked : rox_master_head
* Function return Type : html
* Function Since : 1.0.0
*/
$mobile_iocn_grid = rox_get_mod('layout_header_menu_mobileshow');
switch ($mobile_iocn_grid) {
case 'sm':
$mobile_iocn_grid = ' d-block d-md-none';
break;
case 'md':
$mobile_iocn_grid = ' d-block d-lg-none';
break;
case 'lg':
$mobile_iocn_grid = ' d-block d-xl-none';
break;
case 'xl':
$mobile_iocn_grid = ' d-block';
break;
default:
$mobile_iocn_grid = ' d-block d-xl-none';
};
ob_start() ?>
'mobile'));
} else {
wp_nav_menu(array('theme_location' => 'primary', 'mobile' => true));
}
$output = ob_get_clean();
return $output;
}
}
/*----------------------------------------------------------------------
* Right Nav panel
*----------------------------------------------------------------------*/
if (!function_exists('rox_header_user_account_info')) {
/*
* Function Name : rox_right_nav_panel
* Description : Function For Right Panel
* Function Hooked : NA
* Function return Type : html output
* Function Since : rox_site
*/
function rox_header_user_account_info()
{
?>
'menu_order, post_title',
'menu_class' => 'menu',
'echo' => true,
'link_before' => '',
'link_after' => ''
);
$args = wp_parse_args($args, $defaults);
/**
* Filter the arguments used to generate a page-based menu.
*
* @since 2.7.0
*
* @see wp_page_menu()
*
* @param array $args An array of page menu arguments.
*/
$args = apply_filters('wp_page_menu_args', $args);
$menu = '';
$list_args = $args;
// Show Home in the menu
if (!empty($args['show_home'])) {
if (true === $args['show_home'] || '1' === $args['show_home'] || 1 === $args['show_home']) {
$text = __('Home', 'ayyash');
} else {
$text = $args['show_home'];
}
$class = '';
if (is_front_page() && !is_paged()) {
$class = 'class="current_page_item"';
}
$menu .= '
';
// If the front page is a page, add it to the exclude list
if (get_option('show_on_front') == 'page') {
if (!empty($list_args['exclude'])) {
$list_args['exclude'] .= ',';
} else {
$list_args['exclude'] = '';
}
$list_args['exclude'] .= get_option('page_on_front');
}
}
$list_args['echo'] = false;
$list_args['depth'] = 1;
$list_args['title_li'] = '';
$menu .= str_replace(array("\r", "\n", "\t"), '', wp_list_pages($list_args));
if ($menu) {
$menu = '
' . $menu . '
';
}
$menu = '
' . $menu . "
\n";
/**
* Filter the HTML output of a page-based menu.
*
* @since 2.7.0
*
* @see wp_page_menu()
*
* @param string $menu The HTML output.
* @param array $args An array of arguments.
*/
$menu = apply_filters('wp_page_menu', $menu, $args);
if ($args['echo']) {
var_dump($menu);
} else {
return $menu;
}
return '';
}
endif;
/*----------------------------------------------------------------------
* Blog Favicon for custom favicon
*----------------------------------------------------------------------*/
if (!function_exists('rox_blog_favicon')):
/*
* Function Name : rox_blog_favicon
* Description : Add custom favicon for the theme
* Function Hooked : wp_head
* Function return Type : html
* Function Since : 1.0.0
*/
function rox_blog_favicon()
{
$favicon = rox_get_mod('logo_favicon');
if ($favicon !== ''): ?>
ID)) {
?>