%2$s%1$s>';
$output = sprintf( $format, $tag, get_custom_logo() );
echo apply_filters( 'businessx_logo___image', $output, $format, $tag );
} else {
// Text link format
$format = '<%1$s class="logo-wrap">%3$s%1$s>';
$output = sprintf( $format, $tag, esc_url( home_url('/') ), get_bloginfo( 'name', 'display' ) );
echo apply_filters( 'businessx_logo___text', $output, $format, $tag );
}
}
}
}
/* -- Display main menu */
if ( ! function_exists( 'businessx_menu_main_area' ) ) {
function businessx_menu_main_area() {
if( has_nav_menu( 'primary' ) ) {
?>
'actions',
'items_wrap' => '',
'container' => false,
'depth' => 1,
'fallback_cb' => '__return_false',
'echo' => false,
) );
echo wp_nav_menu( $args );
}
}
/* -- Action buttons - Search */
if ( ! function_exists( 'businessx_search_button' ) ) {
function businessx_search_button() {
$disabled = get_theme_mod( 'header_misc_hide_search_btn', false );
if( ! $disabled ) : ?>
';
if ( has_nav_menu( 'primary' ) ) :
$output = sprintf( $format, businessx_icon( $btn_icon, false ), esc_html( $menu_btn ) );
echo apply_filters( 'businessx_mobile_menu_button___output', $output, $format, $btn_icon, $menu_btn );
endif;
}
}
/* -- Action buttons - Mobile menu for actions */
if ( ! function_exists( 'businessx_mobile_actions_menu_button' ) ) {
function businessx_mobile_actions_menu_button() {
$menu_btn = '';
$btn_icon = 'star';
$format = '';
if ( has_nav_menu( 'actions' ) ) :
$output = sprintf( $format, businessx_icon( $btn_icon, false ), esc_html( $menu_btn ) );
echo apply_filters( 'businessx_mobile_actions_menu_button___output', $output, $format, $btn_icon, $menu_btn );
endif;
}
}
/* -- Search overlay - when header search button is clicked */
if ( ! function_exists( 'businessx_search_display' ) ) {
function businessx_search_display() {
$disabled = get_theme_mod( 'header_misc_hide_search_btn', false );
if( ! $disabled ) : ?>
array(
'href' => array(),
'title' => array()
),
) );
$copyright = get_theme_mod( 'footer_credits_creds_line', businessx_return_copyright_templ() );
?>
' . businessx_icon( 'tags', false ) . esc_html__( 'Tagged with: ', 'businessx' ) . '' );
$sep = apply_filters( 'businessx_single_tags_display___sep', " • " );
$after = apply_filters( 'businessx_single_tags_display___after', '' );
$tags = get_the_tags();
if( is_single() && ! $hide && ! empty( $tags ) ) {
?>
' . businessx_icon( 'tags', false ) . esc_html__( 'Tagged with: ', 'businessx' ) . '' );
$sep = apply_filters( 'businessx_single_tags_display___sep', " • " );
$after = apply_filters( 'businessx_single_tags_display___after', '' );
$output = get_the_term_list( $post->ID, 'jetpack-portfolio-tag', $before, $sep, $after );
if( $display && ! empty( $output ) ) {
?>
';
$output .= '';
$new_output = apply_filters( 'businessx_portfolio_page_masonry___sizers', $output );
echo wp_kses_post( $new_output );
}
}
/* -- Masonry script for Portfolio */
if ( ! function_exists( 'businessx_portfolio_page_masonry_script' ) ) {
function businessx_portfolio_page_masonry_script() {
$id = apply_filters( 'businessx_portfolio_page_masonry_script___id', 'sec-portfolio-wrap' );
wp_add_inline_script( 'jquery-masonry', '(function( $ ) { $( document ).ready(function() { var $sec_portwrap = $("#' . esc_attr( $id ) . ' ").masonry(); $sec_portwrap.imagesLoaded( function() { $sec_portwrap.masonry(); }); });})(jQuery);' );
}
}
endif; // Jetpack check
/* ------------------------------------------------------------------------- *
* WooCommerce
/* ------------------------------------------------------------------------- */
if( businessx_wco_is_activated() ) {
/* -- Change number or products per row to 3 */
if ( ! function_exists( 'businessx_wco_loop_columns' ) ) {
function businessx_wco_loop_columns() {
return ( ! businessx_hide_sidebar( 'product' ) ) ? 3 : 4;
}
}
/* -- Related products */
if ( ! function_exists( 'businessx_wco_related_loop_columns' ) ) {
function businessx_wco_related_loop_columns( $args ) {
$cols = ( ! businessx_hide_sidebar( 'product' ) ) ? 3 : 4;
$args['posts_per_page'] = apply_filters( 'businessx_wco_filter_related___ppp', $cols );
$args['columns'] = apply_filters( 'businessx_wco_filter_related___columns', $cols );
return $args;
}
}
/* Before shop loop */
if ( ! function_exists( 'businessx_wco_before_shop_loop_start' ) ) {
function businessx_wco_before_shop_loop_start() {
echo '';
}
}
if ( ! function_exists( 'businessx_wco_before_shop_loop_end' ) ) {
function businessx_wco_before_shop_loop_end() {
echo '
';
}
}
/* Shopping Cart */
if ( ! function_exists( 'businessx_wco_cart_link_fragment' ) ) {
function businessx_wco_cart_link_fragment( $fragments ) {
global $woocommerce;
ob_start();
businessx_wco_cart_link();
$fragments['span.shopping-button'] = ob_get_clean();
return $fragments;
}
}
if ( ! function_exists( 'businessx_wco_cart_link' ) ) {
function businessx_wco_cart_link() {
if( ! get_theme_mod( 'woocommerce_cart_disable', 0 ) ) {
?>
cart->get_cart_contents_count() ); ?>