'; $linkend = ''; endif;
$routput = ''; $routput = $linkstart . $contentt . $linkend;
if ( $nolnknotxt == '1' && $routput == $contentt ) $routput = '';
return $routput;
else:
return '';
endif;
}
// WooCommerce Check
function associationx_woo_check() {
if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) )): return true; else: return false; endif;
}
// WooCommerce Cart Icon Add
if ( associationx_get_option('woo-cart-icon', '1') && associationx_woo_check() ) {
function associationx_wc_cart_count($d5wmenu, $wargs) {
if( $wargs->theme_location == 'main-menu'):
$wcsccount = WC()->cart->get_cart_contents_count();
$wclink = function_exists( 'wc_get_cart_url' ) ? wc_get_cart_url() : WC()->cart->get_cart_url();
$newmenup = '
%title ' . esc_html__(':Newer', 'associationx')); ?>
%title '); ?>
' . esc_html__('Newer', 'associationx') ); ?>
' ); ?>
'. get_avatar( get_the_author_meta('user_email') , 110 ). '
'.esc_html($authorname).' ' . esc_html(get_the_author()) .'
' . wp_kses_post(get_the_author_meta('description')). '
';
if ( is_single() && $singpost == 1 ): echo $authorbio; endif;
if ( is_page() && $singpage == 1 ): echo $authorbio; endif;
endif;
}
// Breadcrumbs
function associationx_breadcrumbs() { associationx_breadcrumb_trail(); }
add_action('associationx_starting_content', 'associationx_breadcrumbs');
// Menu Description
function associationx_description_to_menu($item_output, $item, $depth, $args) {
if (strlen($item->description) > 0 ) {
$item_output .= sprintf('', esc_html($item->description));
}
return $item_output;
}
add_filter('walker_nav_menu_start_el', 'associationx_description_to_menu', 10, 4);
// Add a Close Menu Item with the Main Mneu
function associationx_main_menu_close($d5xmenu, $wargs) {
if( $wargs->theme_location == 'main-menu'):
$newmenup = '';
$newmenun = $d5xmenu . $newmenup;
return $newmenun;
else:
return $d5xmenu;
endif;
}
add_filter('wp_nav_menu_items','associationx_main_menu_close', 10, 2);