%4$s'; $on = __( 'updated on ', 'blossom-fashion' ); }else{ $time_string = ''; } }else{ $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); $posted_on = sprintf( '%1$s %2$s', esc_html( $on ), '' . $time_string . '' ); echo '' . $posted_on . ''; } endif; if( ! function_exists( 'blossom_fashion_posted_by' ) ) : /** * Posted By */ function blossom_fashion_posted_by(){ $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'blossom-fashion' ), '' ); echo ''; } endif; if( ! function_exists( 'blossom_fashion_comment_count' ) ) : /** * Comment Count */ function blossom_fashion_comment_count(){ if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( wp_kses( /* translators: %s: post title */ __( 'Leave a Comment on %s', 'blossom-fashion' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'blossom_fashion_category' ) ) : /** * Prints categories */ function blossom_fashion_category(){ // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( esc_html__( ', ', 'blossom-fashion' ) ); if ( $categories_list ) { echo '' . $categories_list . ''; } } } endif; if ( ! function_exists( 'blossom_fashion_tag' ) ) : /** * Prints tags */ function blossom_fashion_tag(){ // Hide category and tag text for pages. if ( 'post' === get_post_type() ) { /* translators: used between list items, there is a space after the comma */ $tags_list = get_the_tag_list( '', esc_html_x( ' ', 'list item separator', 'blossom-fashion' ) ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '
' . esc_html__( '%1$sTags:%2$s %3$s', 'blossom-fashion' ) . '
', '', '', $tags_list ); } } } endif; if( ! function_exists( 'blossom_fashion_latest_posts' ) ) : /** * Latest Posts */ function blossom_fashion_latest_posts(){ $args = array( 'post_type' => 'post', 'posts_per_page' => 4, 'posts_status' => 'publish', 'ignore_sticky_posts' => true ); $qry = new WP_Query( $args ); if( $qry->have_posts() ){ ?>

have_posts() ){ $qry->the_post(); ?>
'; echo '
  • ' . esc_html__( 'Click here to add a menu', 'blossom-fashion' ) . '
  • '; echo ''; } } endif; if( ! function_exists( 'blossom_fashion_social_links' ) ) : /** * Social Links */ function blossom_fashion_social_links( $echo = true ){ $defaults = array( array( 'font' => 'fa fa-facebook', 'link' => 'https://www.facebook.com/', ), array( 'font' => 'fa fa-twitter', 'link' => 'https://twitter.com/', ), array( 'font' => 'fa fa-youtube-play', 'link' => 'https://www.youtube.com/', ), array( 'font' => 'fa fa-instagram', 'link' => 'https://www.instagram.com/', ), array( 'font' => 'fa fa-google-plus-circle', 'link' => 'https://plus.google.com', ), array( 'font' => 'fa fa-odnoklassniki', 'link' => 'https://ok.ru/', ), array( 'font' => 'fa fa-vk', 'link' => 'https://vk.com/', ), array( 'font' => 'fa fa-xing', 'link' => 'https://www.xing.com/', ) ); $social_links = get_theme_mod( 'social_links' ); $ed_social = get_theme_mod( 'ed_social_links', true ); if( is_customize_preview() && ! $social_links ){ $social_links = $defaults; } if( $ed_social && $social_links && $echo ){ ?> '; $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb if( get_theme_mod( 'ed_breadcrumb', true ) ){ echo ''; } } endif; if( ! function_exists( 'blossom_fashion_theme_comment' ) ) : /** * Callback function for Comment List * * * @link https://codex.wordpress.org/Function_Reference/wp_list_comments */ function blossom_fashion_theme_comment( $comment, $args, $depth ){ if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">
    comment_approved == '0' ) : ?>
    %s says:', 'blossom-fashion' ), get_comment_author_link() ); ?>
    $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ID, '_sidebar_layout', true ) ){ $sidebar_layout = get_post_meta( $post->ID, '_sidebar_layout', true ); }else{ $sidebar_layout = 'default-sidebar'; } if( is_page() ){ if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'no-sidebar' ){ $return = 'full-width'; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = 'rightsidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = 'leftsidebar'; }elseif( $sidebar_layout == 'default-sidebar' && $page_layout == 'no-sidebar' ){ $return = 'full-width'; } }else{ $return = 'full-width'; } }elseif( is_single() ){ if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'no-sidebar' ){ $return = 'full-width'; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = 'rightsidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = 'leftsidebar'; }elseif( $sidebar_layout == 'default-sidebar' && $post_layout == 'no-sidebar' ){ $return = 'full-width'; } }else{ $return = 'full-width'; } } }elseif( blossom_fashion_is_woocommerce_activated() && ( is_shop() || is_product_category() || is_product_tag() || get_post_type() == 'product' ) ){ if( is_active_sidebar( 'shop-sidebar' ) ){ $return = 'rightsidebar'; }else{ $return = 'full-width'; } }else{ if( is_active_sidebar( 'sidebar' ) ){ $return = 'rightsidebar'; }else{ $return = 'full-width'; } } return $return; } endif; if( ! function_exists( 'blossom_fashion_get_posts' ) ) : /** * Fuction to list Custom Post Type */ function blossom_fashion_get_posts( $post_type = 'post' ){ $args = array( 'posts_per_page' => -1, 'post_type' => $post_type, 'post_status' => 'publish', 'suppress_filters' => true ); $posts_array = get_posts( $args ); // Initate an empty array $post_options = array(); $post_options[''] = __( ' -- Choose -- ', 'blossom-fashion' ); if ( ! empty( $posts_array ) ) { foreach ( $posts_array as $posts ) { $post_options[ $posts->ID ] = $posts->post_title; } } return $post_options; wp_reset_postdata(); } endif; if( ! function_exists( 'blossom_fashion_get_categories' ) ) : /** * Function to list post categories in customizer options */ function blossom_fashion_get_categories( $select = true, $taxonomy = 'category', $slug = false ){ /* Option list of all categories */ $categories = array(); $args = array( 'hide_empty' => false, 'taxonomy' => $taxonomy ); $catlists = get_terms( $args ); if( $select ) $categories[''] = __( 'Choose Category', 'blossom-fashion' ); foreach( $catlists as $category ){ if( $slug ){ $categories[$category->slug] = $category->name; }else{ $categories[$category->term_id] = $category->name; } } return $categories; } endif; if( ! function_exists( 'blossom_fashion_get_all_fonts' ) ) : /** * Return Web safe font and google font */ function blossom_fashion_get_all_fonts(){ $google = array(); $standard = array( 'georgia-serif' => __( 'Georgia', 'blossom-fashion' ), 'palatino-serif' => __( 'Palatino Linotype, Book Antiqua, Palatino', 'blossom-fashion' ), 'times-serif' => __( 'Times New Roman, Times', 'blossom-fashion' ), 'arial-helvetica' => __( 'Arial, Helvetica', 'blossom-fashion' ), 'arial-gadget' => __( 'Arial Black, Gadget', 'blossom-fashion' ), 'comic-cursive' => __( 'Comic Sans MS, cursive', 'blossom-fashion' ), 'impact-charcoal' => __( 'Impact, Charcoal', 'blossom-fashion' ), 'lucida' => __( 'Lucida Sans Unicode, Lucida Grande', 'blossom-fashion' ), 'tahoma-geneva' => __( 'Tahoma, Geneva', 'blossom-fashion' ), 'trebuchet-helvetica' => __( 'Trebuchet MS, Helvetica', 'blossom-fashion' ), 'verdana-geneva' => __( 'Verdana, Geneva', 'blossom-fashion' ), 'courier' => __( 'Courier New, Courier', 'blossom-fashion' ), 'lucida-monaco' => __( 'Lucida Console, Monaco', 'blossom-fashion' ), ); $fonts = include wp_normalize_path( get_template_directory() . '/inc/custom-controls/typography/webfonts.php' ); foreach( $fonts['items'] as $font ){ $google[$font['family']] = $font['family']; } $all_fonts = array_merge( $standard, $google ); return $all_fonts; } endif; /** * Is Blossom Theme Toolkit active or not */ function blossom_fashion_is_bttk_activated(){ return class_exists( 'Blossomthemes_Toolkit' ) ? true : false; } /** * Is BlossomThemes Email Newsletters active or not */ function blossom_fashion_is_btnw_activated(){ return class_exists( 'Blossomthemes_Email_Newsletter' ) ? true : false; } /** * Is BlossomThemes Instagram Feed active or not */ function blossom_fashion_is_btif_activated(){ return class_exists( 'Blossomthemes_Instagram_Feed' ) ? true : false; } /** * Query WooCommerce activation */ function blossom_fashion_is_woocommerce_activated() { return class_exists( 'woocommerce' ) ? true : false; } if( ! function_exists( 'blossom_fashion_escape_text_tags' ) ) : /** * Remove new line tags from string * * @param $text * * @return string */ function blossom_fashion_escape_text_tags( $text ) { return (string) str_replace( array( "\r", "\n" ), '', strip_tags( $text ) ); } endif;