','

' ); } else { $sep = ' » '; if (!is_front_page()) { // Start the breadcrumb with a link to your homepage echo '
'; echo ''; echo _esc_html__( 'Home', 'buddyx'); echo '' . $sep; // Check if the current page is a category, an archive or a single page. If so show the category or archive name. if ( is_category() || is_single() ){ the_category(' > '); } elseif ( is_archive() || is_single() ){ if ( is_day() ) { printf( __( '%s', 'buddyx' ), get_the_date() ); } elseif ( is_month() ) { printf( __( '%s', 'buddyx' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'buddyx' ) ) ); } elseif ( is_year() ) { printf( __( '%s', 'buddyx' ), get_the_date( _x( 'Y', 'yearly archives date format', 'buddyx' ) ) ); } elseif( is_shop() ) { _e( 'Shop', 'buddyx' ); }elseif( is_archive('post-type-archive-forum') ) { _e( 'Forums Archives', 'buddyx' ); } else { _e( 'Blog Archives', 'buddyx' ); } } // If the current page is a single post, show its title with the separator if (is_single()) { echo $sep; the_title(); } // If the current page is a static page, show its title. if (is_page()) { echo the_title(); } // if you have a static page assigned to be you posts list page. It will find the title of the static page and display it. i.e Home > Blog if (is_home()){ _e( 'Blog', 'buddyx' ); } echo '
'; } } } } // Site Loader if ( !function_exists( 'buddyx_site_loader' ) ) { function buddyx_site_loader() { $loader = get_theme_mod( 'site_loader', buddyx_defaults( 'site-loader' ) ); if ( $loader == "1" ) { echo '
'; } } } // Site Search and Woo icon if ( !function_exists( 'buddyx_site_menu_icon' ) ) { function buddyx_site_menu_icon () { // menu icons $searchicon = (int) get_theme_mod( 'site_search', buddyx_defaults( 'site-search' ) ); $carticon = (int) get_theme_mod( 'site_cart', buddyx_defaults( 'site-cart' ) ); if( !empty($searchicon) || !empty($carticon) ) : ?> activity->component ); } } /** * Is the current user online * * @param $user_id * * @return bool */ if ( !function_exists( 'buddyx_is_user_online' ) ) { function buddyx_is_user_online( $user_id ) { if( !function_exists( 'bp_get_user_last_activity' ) ) { return; } $last_activity = strtotime( bp_get_user_last_activity( $user_id ) ); if ( empty( $last_activity ) ) { return false; } // the activity timeframe is 5 minutes $activity_timeframe = 5 * MINUTE_IN_SECONDS; return ( time() - $last_activity <= $activity_timeframe ); } } /** * BuddyPress user status * * @param $user_id * */ if ( !function_exists( 'buddyx_user_status' ) ) { function buddyx_user_status( $user_id ) { if( buddyx_is_user_online( $user_id ) ) { echo ''; } } } /** * woocommerce_cart_collaterals */ remove_action( 'woocommerce_cart_collaterals', 'woocommerce_cross_sell_display' ); add_action( 'woocommerce_after_cart_form', 'woocommerce_cross_sell_display', 10 ); /* Ensure cart contents update when products are added to the cart via AJAX */ add_filter( 'woocommerce_add_to_cart_fragments', 'buddyx_header_add_to_cart_fragment' ); if ( !function_exists( 'buddyx_header_add_to_cart_fragment' ) ) { function buddyx_header_add_to_cart_fragment( $fragments ) { $count = WC()->cart->get_cart_contents_count(); ob_start(); ?> bp_displayed_user_id(), 'display' => true ) ); if ( is_array( $achievements ) && !empty( $achievements ) ) { $number_to_show = 5; $thecount = 0; wp_enqueue_script( 'badgeos-achievements' ); wp_enqueue_style( 'badgeos-widget' ); //load widget setting for achievement types to display $set_achievements = ( isset( $instance[ 'set_achievements' ] ) ) ? $instance[ 'set_achievements' ] : ''; //show most recently earned achievement first $achievements = array_reverse( $achievements ); echo ''; } } } }