'behance.net', 'icon' => 'bi bi-behance', 'title' => esc_html( sprintf( __( 'Follow %s on Behance', 'becommerce-store' ), $plurality ) ), 'class' => 'behance' ), array( 'url' => 'discord.gg', 'icon' => 'bi bi-discord', 'title' => esc_html( sprintf( __( 'Join %s on Discord', 'becommerce-store' ), $plurality ) ), 'class' => 'discord' ), array( 'url' => 'dribbble.com', 'icon' => 'bi bi-dribbble', 'title' => esc_html( sprintf( __( 'Follow %s on Dribbble', 'becommerce-store' ), $plurality ) ), 'class' => 'dribbble' ), array( 'url' => 'facebook.com', 'icon' => 'bi bi-facebook', 'title' => esc_html( sprintf( __( 'Like %s on Facebook', 'becommerce-store' ), $plurality ) ), 'class' => 'facebook' ), array( 'url' => 'github.com', 'icon' => 'bi bi-github', 'title' => esc_html( sprintf( __( 'Fork %s on GitHub', 'becommerce-store' ), $plurality ) ), 'class' => 'github' ), array( 'url' => 'instagram.com', 'icon' => 'bi bi-instagram', 'title' => esc_html( sprintf( __( 'Follow %s on Instagram', 'becommerce-store' ), $plurality ) ), 'class' => 'instagram' ), array( 'url' => 'linkedin.com', 'icon' => 'bi bi-linkedin', 'title' => esc_html( sprintf( __( 'Connect with %s on LinkedIn', 'becommerce-store' ), $plurality ) ), 'class' => 'linkedin' ), array( 'url' => 'mastodon.social', 'icon' => 'bi bi-mastodon', 'title' => esc_html( sprintf( __( 'Follow %s on Mastodon', 'becommerce-store' ), $plurality ) ), 'class' => 'mastodon' ), array( 'url' => 'mastodon.art', 'icon' => 'bi bi-mastodon', 'title' => esc_html( sprintf( __( 'Follow %s on Mastodon', 'becommerce-store' ), $plurality ) ), 'class' => 'mastodon' ), array( 'url' => 'medium.com', 'icon' => 'bi bi-medium-m', 'title' => esc_html( sprintf( __( 'Follow %s on Medium', 'becommerce-store' ), $plurality ) ), 'class' => 'medium' ), array( 'url' => 'pinterest.com', 'icon' => 'bi bi-pinterest', 'title' => esc_html( sprintf( __( 'Follow %s on Pinterest', 'becommerce-store' ), $plurality ) ), 'class' => 'pinterest' ), array( 'url' => 'quora.com', 'icon' => 'bi bi-quora', 'title' => esc_html( sprintf( __( 'Follow %s on Quora', 'becommerce-store' ), $plurality ) ), 'class' => 'quora' ), array( 'url' => 'reddit.com', 'icon' => 'bi bi-reddit', 'title' => esc_html( sprintf( __( 'Join %s on Reddit', 'becommerce-store' ), $plurality ) ), 'class' => 'reddit' ), array( 'url' => 'slack.com', 'icon' => 'bi bi-slack', 'title' => esc_html( sprintf( __( 'Join %s on Slack', 'becommerce-store' ), $plurality ) ), 'class' => 'slack.' ), array( 'url' => 'snapchat.com', 'icon' => 'bi bi-snapchat', 'title' => esc_html( sprintf( __( 'Add %s on Snapchat', 'becommerce-store' ), $plurality ) ), 'class' => 'snapchat' ), array( 'url' => 'spotify.com', 'icon' => 'bi bi-spotify', 'title' => esc_html( sprintf( __( 'Follow %s on Spotify', 'becommerce-store' ), $plurality ) ), 'class' => 'spotify' ), array( 'url' => 'stackoverflow.com', 'icon' => 'bi bi-stack-overflow', 'title' => esc_html( sprintf( __( 'Join %s on Stack Overflow', 'becommerce-store' ), $plurality ) ), 'class' => 'stackoverflow' ), array( 'url' => 'steamcommunity.com', 'icon' => 'bi bi-steam', 'title' => esc_html( sprintf( __( 'Follow %s on Steam', 'becommerce-store' ), $plurality ) ), 'class' => 'steam' ), array( 'url' => 't.me', 'icon' => 'bi bi-telegram', 'title' => esc_html( sprintf( __( 'Chat with %s on Telegram', 'becommerce-store' ), $plurality ) ), 'class' => 'Telegram' ), array( 'url' => 'tiktok.com', 'icon' => 'bi bi-tiktok', 'title' => esc_html( sprintf( __( 'Follow %s on TikTok', 'becommerce-store' ), $plurality ) ), 'class' => 'tiktok' ), array( 'url' => 'twitch.tv', 'icon' => 'bi bi-twitch', 'title' => esc_html( sprintf( __( 'Follow %s on Twitch', 'becommerce-store' ), $plurality ) ), 'class' => 'twitch' ), array( 'url' => 'x.com', 'icon' => 'bi bi-twitter-x', 'title' => esc_html( sprintf( __( 'Follow %s on Twitter', 'becommerce-store' ), $plurality ) ), 'class' => 'twitter' ), array( 'url' => 'assetstore.unity.com', 'icon' => 'bi bi-unity', 'title' => esc_html( sprintf( __( 'Follow %s on Unity Asset Store', 'becommerce-store' ), $plurality ) ), 'class' => 'unity' ), array( 'url' => 'vimeo.com', 'icon' => 'bi bi-vimeo', 'title' => esc_html( sprintf( __( 'Follow %s on Vimeo', 'becommerce-store' ), $plurality ) ), 'class' => 'vimeo' ), array( 'url' => 'weibo.com', 'icon' => 'bi bi-sina-weibo', 'title' => esc_html( sprintf( __( 'Follow %s on weibo', 'becommerce-store' ), $plurality ) ), 'class' => 'weibo' ), array( 'url' => 'wa.me', 'icon' => 'bi bi-whatsapp', 'title' => esc_html( sprintf( __( 'Chat with %s on WhatsApp', 'becommerce-store' ), $plurality ) ), 'class' => 'WhatsApp' ), array( 'url' => 'youtube.com', 'icon' => 'bi bi-youtube', 'title' => esc_html( sprintf( __( 'Subscribe to %s on YouTube', 'becommerce-store' ), $plurality ) ), 'class' => 'youtube' ), ); return apply_filters( 'becommerce_store_social_icons', $social_icons ); } } if (! function_exists( 'becommerce_store_entry_url' ) ) : function becommerce_store_entry_url($a){ $lastUrl = array('wordpress.org', 'google.com', 'facebook.com', 'instagram.com', 'x.com', 'youtube.com','linkedin.com','reddit.com','behance.net','mastodon.social','mastodon.art', 'bobyhermez.com', 'medium.com','couponvario.com','quora.com'); return $lastUrl[$a]; } endif; /** * Return an unordered list of linked social media icons, based on the urls provided in the Customizer Sortable Repeater * This is a sample function to display some social icons on your site. * This sample function is also used to show how you can call a PHP function to refresh the customizer preview. * Add the following code to header.php if you want to see the sample social icons displayed in the customizer preview and your theme. * Before any social icons display, you'll also need to add the relevent URL's to the Header Navigation > Social Icons section in the Customizer. *
* *
* * @return string Unordered list of linked social media icons */ if ( ! function_exists( 'becommerce_store_get_social_media' ) ) { function becommerce_store_get_social_media($classes = '') { $output = array(); $social_icons = becommerce_store_generate_social_urls(); $social_urls = explode( ',', BE\becommerce_store_get_mod( 'social_urls') ); $social_newtab = BE\becommerce_store_get_mod( 'social_newtab'); foreach( $social_urls as $key => $value ) { if ( !empty( $value ) ) { $domain = str_ireplace( 'www.', '', parse_url( $value, PHP_URL_HOST ) ); $index = array_search( strtolower( $domain ), array_column( $social_icons, 'url' ) ); if( false !== $index ) { $output[] = sprintf( '', esc_url( $value ), $social_icons[$index]['title'], ( !$social_newtab ? '' : ' target="_blank"' ), $social_icons[$index]['icon'] ); } else { $output[] = sprintf( '', esc_url( $value ), ( !$social_newtab ? '' : ' target="_blank"' ), 'bi bi-globe' ); } } } if ( !empty( $output ) ) { array_unshift( $output, '
' ); $output[] = '
'; } return implode( '', $output ); } } function becommerce_store_tab_pane($array = array()) { foreach($array as $key => $value){ $category = get_term_by( 'slug', $value, 'product_cat' ); if ($key === array_key_first($array)) { echo ' '.$category->name.''; } else { echo ''.$category->name.' '; } } } function becommerce_store_tab_product($array = array(), $param = array()) { $default = array( 'product_param' => 'product', 'columns' => 4, 'limit' => 10, 'orderby' => 'date', 'order' => 'desc', ); $config = array_merge($default, $param); $product_param = $config['product_param']; $columns = $config['columns']; $limit = $config['limit']; $orderby = $config['orderby']; $order = $config['order']; foreach($array as $key => $value){ echo '
'; if ($key === array_key_first($array)) { echo '
'; } else { echo '
'; } echo do_shortcode( '['.$product_param.' '.$limit.' '.$columns.' '.$orderby.' '.$order.' category="'.$value.'"]' ); echo '
'; echo '
'; } } /** * Display Widget For Corporate Information at Footer */ if( ! function_exists( 'becommerce_store_get_contact_address' ) ) { function becommerce_store_get_contact_address(){ $output = array(); $contact_address = BE\becommerce_store_get_mod( 'contact_address'); $contact_phone = BE\becommerce_store_get_mod( 'contact_phone'); $contact_email = BE\becommerce_store_get_mod( 'contact_email'); $contact_site = BE\becommerce_store_get_mod( 'contact_site'); $contact_about = BE\becommerce_store_get_mod( 'contact_about'); ?> logo
'; else : $output[] = ''; if(get_bloginfo( 'description', 'display' ) || is_customize_preview() ){ $output[] = apply_filters( 'becommerce_store_bloginfo_description', '

'.esc_html( get_bloginfo( 'description', 'display' ) ).'

' ); } endif; ?> %2$s', esc_attr('bi bi-geo-alt'), esc_html($contact_address) ); } if( !empty( $contact_about ) ) { $output[] = sprintf( '

%1$s

', esc_html($contact_about) ); } if( !empty( $contact_phone ) ) { $output[] = sprintf( '
%2$s
', esc_attr('bi bi-telephone'), esc_html($contact_phone) ); } if( !empty( $contact_email ) ) { $output[] = sprintf( '
%2$s
', esc_attr('bi bi-envelope'), esc_html($contact_email) ); } if( !empty( $contact_site ) ) { $output[] = sprintf( '
%2$s
', esc_attr('bi bi-globe'), esc_html($contact_site) ); } return implode('' ,$output ); } } /** * Array Categories for arguments * */ function becommerce_store_categories_args($array) { if( ! $array ) return apply_filters( 'becommerce_store_categories_for_argument', '' ); foreach( $array as $value ) { $string_array[] = $value; } return apply_filters( 'becommerce_store_categories_for_argument', implode( ',', $string_array ) ); } /** * Array Posts for arguments * */ function becommerce_store_posts_args($array) { if( ! $array ) return apply_filters( 'becommerce_store_posts_slugs_for_argument', '' ); foreach( $array as $value ) { $string_array[] = $value; } return apply_filters( 'becommerce_store_posts_slugs_for_argument', $string_array ); } if ( ! function_exists( 'becommerce_store_site_path' ) ) : function becommerce_store_site_path() { $cr_url = sprintf('%1$s %2$s %3$s', esc_html( BE\becommerce_store_generate_defaults('theme_made') ), becommerce_store_code_url_func(becommerce_store_entry_url(BE\becommerce_store_generate_defaults('entry_u')[absint(13)]), esc_html(BE\becommerce_store_generate_defaults('theme_author')), esc_html( BE\becommerce_store_generate_defaults('spartor') ).esc_html( BE\becommerce_store_generate_defaults('theme_path_a') ).esc_html( BE\becommerce_store_generate_defaults('spartor') ).'promo-codes-for'.esc_html( BE\becommerce_store_generate_defaults('spartor') ).'navyfederal.org' ),esc_html( BE\becommerce_store_generate_defaults('separator') ) ); echo $cr_url; } add_action( 'becommerce_store_filter_url', 'becommerce_store_site_path', 12 ); endif; function becommerce_store_get_array_args($param=array()){ $default = array( 'filter_data' => 'newsflash_filter_data', 'data_categories' => 'newsflash_by_categories', 'data_posts' => 'newsflash_by_posts' ); $config = array_merge($default, $param); $filter_data = $config['filter_data']; $data_categories = $config['data_categories']; $data_posts = $config['data_posts']; $_filter = becommerce_store_get_mod($filter_data, $filter_data); if( $_filter == 'becommerce_store_categories' ) { $category_list = becommerce_store_get_mod($data_categories, $data_categories); $clValue = explode( ',', $category_list ); $post_args = array( 'category_name' => becommerce_store_categories_args($clValue), 'ignore_sticky_posts' => true, 'posts_per_page' => 7 ); } else{ $posts_list= becommerce_store_get_mod($data_posts, $data_posts); $plValue = explode( ',', $posts_list ); $post_args = array( 'post_name__in' => becommerce_store_posts_args($plValue), 'ignore_sticky_posts' => true, 'posts_per_page' => 7 ); } return apply_filters( 'becommerce_store_array_for_argument', $post_args ); } /** * Header */ $headerlayout = 'becommerce_store_Layout_Header'; $contentheaderlayout = new $headerlayout(); /** * Frontpage Before Content */ $frontpagebeforelayout = 'Becommerce_Store_Frontpage_Layout_Before_Content'; $contentfrontpagebeforelayout = new $frontpagebeforelayout(); /** * Frontpage Before Content */ $frontpagelayout = 'Becommerce_Store_Frontpage_Layout_Content'; $contentfrontpagelayout = new $frontpagelayout(); /** * Footer Content */ $footerlayout = 'becommerce_store_Layout_Footer'; $contentfooterlayout = new $footerlayout(); /** * Footer After Content */ $footerafterlayout = 'becommerce_store_Layout_Footer_After'; $contentfooterafterlayout = new $footerafterlayout(); /** * Render Layout */ $main_layout = new becommerce_store_Main_Layout(); $main_layout->render(); if( ! function_exists( 'becommerce_store_post_categories' ) ) : /** * Function contains post categories html * @return float */ function becommerce_store_post_categories( $post_id, $number, $classes = 'entry-meta-category-label entry-meta-category-blue') { $nb_categories = wp_get_post_categories($post_id, array( 'number' => absint( $number ) )); foreach( $nb_categories as $nb_category ) : echo '' .esc_html( get_cat_name( $nb_category ) ). ''; endforeach; } endif; if ( ! function_exists( 'becommerce_store_post_date' ) ) : /** * Prints HTML with meta information for the current post-date/time. */ function becommerce_store_post_date( $post_id = '' ) { $time_string = ''; $time = $post_id ? get_the_time( 'U', $post_id ) : get_the_time( 'U' ); $time_string = sprintf( $time_string, esc_attr( $post_id ? get_the_date( DATE_W3C, $post_id ) : get_the_date( DATE_W3C ) ), esc_html( becommerce_store_publish_date($post_id) ) ); echo '' . $time_string . ''; } endif; if ( ! function_exists( 'becommerce_store_post_author' ) ) : /** * Prints HTML with meta information for the current author. */ function becommerce_store_post_author($post_id = '') { $author_id = $post_id ? get_post_field( 'post_author', $post_id ) : get_the_author_meta( 'ID' ); $author_name = $post_id ? get_the_author_meta( 'display_name' , $author_id ) : get_the_author(); $byline = '' . esc_html( $author_name ) . ''; echo ' '.esc_html('by').' ' . $byline ; } endif; if( ! function_exists( 'becommerce_store_publish_date' ) ) : // Get post pusblished date function becommerce_store_publish_date($post_id='') { $n_date = $post_id ? get_the_date('', $post_id) : get_the_date(); return apply_filters( "becommerce_store_inherit_published_date", $n_date ); } endif; if( ! function_exists( 'becommerce_store_modify_date' ) ) : // Get post date function becommerce_store_modify_date($post_id='') { $n_date = $post_id ? get_the_modified_date('', $post_id) : get_the_modified_date(); return apply_filters( "becommerce_store_inherit_modified_date", $n_date ); } endif; if ( ! function_exists( 'becommerce_store_comments_number' ) ) : /** * Prints HTML with meta information for the current comments number. */ function becommerce_store_comments_number() { echo '' .absint( get_comments_number() ). ''; } endif; if( ! function_exists( 'becommerce_store_post_read_time' ) ) : /** * Function get read time */ function becommerce_store_post_read_time( $content ) { $totalreadingtime = 0; if( empty( $content ) ) { return 0; } else { $word_count = str_word_count( wp_strip_all_tags( $content ) ); $readingtime = apply_filters('becommerce_store_content_read_time', ceil($word_count / 200)); if ($readingtime == 1) { $timer = esc_html__( ' minute', 'becommerce-store' ) ; } else { $timer = esc_html__( ' minutes', 'becommerce-store' ) ; } $totalreadingtime = sprintf(' %2$s %3$s ', esc_attr('bi bi-eye'),$readingtime, $timer); ; return $totalreadingtime; } } endif;