%4$s'; }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', '' . $time_string . '' ); echo '' . $posted_on . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'blossom_pin_posted_by' ) ) : /** * Prints HTML with meta information for the current author. */ function blossom_pin_posted_by() { $ed_post_author = get_theme_mod( 'ed_post_author', false ); if( $ed_post_author ) return false; $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'blossom-pin' ), '' ); echo ''; } endif; if( ! function_exists( 'blossom_pin_comment_count' ) ) : /** * Comment Count */ function blossom_pin_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-pin' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'blossom_pin_category' ) ) : /** * Prints categories */ function blossom_pin_category(){ $ed_cat_single = get_theme_mod( 'ed_category', false ); // Hide category and tag text for pages. if ( 'post' === get_post_type() && !$ed_cat_single ) { /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list( ' ' ); if ( $categories_list ) { echo '' . $categories_list . ''; } } } endif; if ( ! function_exists( 'blossom_pin_tag' ) ) : /** * Prints tags */ function blossom_pin_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( ' ' ); if ( $tags_list ) { /* translators: 1: list of tags. */ printf( '
' . esc_html__( '%1$sTags:%2$s %3$s', 'blossom-pin' ) . '
', '', '', $tags_list ); } } } endif; if( ! function_exists( 'blossom_pin_get_posts_list' ) ) : /** * Returns Latest, Related & Popular Posts */ function blossom_pin_get_posts_list( $status ){ global $post; $args = array( 'post_type' => 'post', 'posts_status' => 'publish', 'ignore_sticky_posts' => true ); switch( $status ){ case 'latest': $args['posts_per_page'] = 3; $title = __( 'Recommended Articles', 'blossom-pin' ); $class = 'recommended-post'; $image_size = 'blossom-pin-related'; break; case 'related': $args['posts_per_page'] = 3; $args['post__not_in'] = array( $post->ID ); $args['orderby'] = 'rand'; $title = get_theme_mod( 'related_post_title', __( 'Recommended Articles', 'blossom-pin' ) ); $class = 'recommended-post'; $image_size = 'blossom-pin-related'; $cats = get_the_category( $post->ID ); if( $cats ){ $c = array(); foreach( $cats as $cat ){ $c[] = $cat->term_id; } $args['category__in'] = $c; } break; } $qry = new WP_Query( $args ); if( $qry->have_posts() ){ ?>
' . esc_html( $title ) . ''; ?>
have_posts() ){ $qry->the_post(); ?>
'; if( ( is_front_page() || is_home() ) && $mobile == false ){ ?>

'; endif; ?>
'; echo '
  • ' . esc_html__( 'Click here to add a menu', 'blossom-pin' ) . '
  • '; echo ''; } } endif; if( ! function_exists( 'blossom_pin_social_links' ) ) : /** * Social Links */ function blossom_pin_social_links( $echo = true, $show_title = false ){ $social_links = get_theme_mod( 'social_links' ); $social_title = get_theme_mod( 'social_title', esc_html__( 'Follow Blossom Pin','blossom-pin') ); $ed_social = get_theme_mod( 'ed_social_links', false ); if( $ed_social && $social_links && $echo ){ ?>
    ' .esc_html( $social_title ) . ''; ?>
    < id="comment-">
    comment_approved == '0' ) : ?>
    %s says:', 'blossom-pin' ), get_comment_author_link() ); ?>
    $add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ID, '_blossom_pin_sidebar_layout', true ) ){ $sidebar_layout = get_post_meta( $post->ID, '_blossom_pin_sidebar_layout', true ); }else{ $sidebar_layout = 'default-sidebar'; } if( is_page() ){ if( is_page_template( 'templates/blossom-portfolio.php' ) ){ $return = $class ? 'full-width centered' : false; }elseif( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'centered' || ( $sidebar_layout == 'default-sidebar' && $page_layout == 'centered' ) ){ $return = $class ? 'full-width centered' : false; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = $class ? 'rightsidebar hassidebar' : 'sidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $page_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = $class ? 'leftsidebar hassidebar' : 'sidebar'; } }else{ $return = $class ? 'full-width centered' : false; } }elseif( is_single() ){ if( is_active_sidebar( 'sidebar' ) ){ if( $sidebar_layout == 'centered' || ( $sidebar_layout == 'default-sidebar' && $post_layout == 'centered' ) ){ $return = $class ? 'full-width centered' : false; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'right-sidebar' ) || ( $sidebar_layout == 'right-sidebar' ) ){ $return = $class ? 'rightsidebar hassidebar' : 'sidebar'; }elseif( ( $sidebar_layout == 'default-sidebar' && $post_layout == 'left-sidebar' ) || ( $sidebar_layout == 'left-sidebar' ) ){ $return = $class ? 'leftsidebar hassidebar' : 'sidebar'; } }else{ $return = $class ? 'full-width centered' : false; } } }elseif( blossom_pin_is_woocommerce_activated() && ( is_shop() || is_product_category() || is_product_tag() || get_post_type() == 'product' ) ){ if( $layout == 'no-sidebar' ){ $return = $class ? 'full-width' : false; }elseif( is_active_sidebar( 'shop-sidebar' ) ){ if( $class ){ if( $layout == 'right-sidebar' ) $return = 'rightsidebar hassidebar'; //With Sidebar if( $layout == 'left-sidebar' ) $return = 'leftsidebar hassidebar'; } }else{ $return = $class ? 'full-width' : false; } }else{ if( $layout == 'no-sidebar' ){ $return = $class ? 'full-width' : false; }elseif( is_active_sidebar( 'sidebar' ) ){ if( $class ){ if( $layout == 'right-sidebar' ) $return = 'rightsidebar hassidebar'; //With Sidebar if( $layout == 'left-sidebar' ) $return = 'leftsidebar hassidebar'; }else{ $return = 'sidebar'; } }else{ $return = $class ? 'full-width' : false; } } return $return; } endif; if( ! function_exists( 'blossom_pin_get_posts' ) ) : /** * Fuction to list Custom Post Type */ function blossom_pin_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-pin' ); 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_pin_get_categories' ) ) : /** * Function to list post categories in customizer options */ function blossom_pin_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-pin' ); 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_pin_escape_text_tags' ) ) : /** * Remove new line tags from string * * @param $text * @return string */ function blossom_pin_escape_text_tags( $text ) { return (string) str_replace( array( "\r", "\n" ), '', strip_tags( $text ) ); } endif; /** * Is Blossom Theme Toolkit active or not */ function blossom_pin_is_bttk_activated(){ return class_exists( 'Blossomthemes_Toolkit' ) ? true : false; } /** * Is BlossomThemes Email Newsletters active or not */ function blossom_pin_is_btnw_activated(){ return class_exists( 'Blossomthemes_Email_Newsletter' ) ? true : false; } /** * Is BlossomThemes Instagram Feed active or not */ function blossom_pin_is_btif_activated(){ return class_exists( 'Blossomthemes_Instagram_Feed' ) ? true : false; } /** * Query WooCommerce activation */ function blossom_pin_is_woocommerce_activated() { return class_exists( 'woocommerce' ) ? true : false; } if( ! function_exists( 'blossom_pin_secondary_navigation' ) ) : /** * Secondary Navigation */ function blossom_pin_secondary_navigation(){ ?> '; echo '
  • ' . esc_html__( 'Click here to add a menu', 'blossom-pin' ) . '
  • '; echo ''; } } endif; if ( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * * Added for backwards compatibility to support pre 5.2.0 WordPress versions. * */ function wp_body_open() { /** * Triggered after the opening tag. * */ do_action( 'wp_body_open' ); } endif; if( ! function_exists( 'blossom_pin_breadcrumb' ) ) : /** * Breadcrumbs */ function blossom_pin_breadcrumb(){ global $post; $post_page = get_option( 'page_for_posts' ); //The ID of the page that displays posts. $show_front = get_option( 'show_on_front' ); //What to show on the front page $home = get_theme_mod( 'home_text', __( 'Home', 'blossom-pin' ) ); // text for the 'Home' link $delimiter = ''; $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb if( get_theme_mod( 'ed_breadcrumb', true ) ){ $depth = 1; echo ''; } } endif;