%4$s'; $on = __( 'updated on ', 'blossom-feminine' ); }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 . ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'blossom_feminine_posted_by' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function blossom_feminine_posted_by() { $byline = sprintf( /* translators: %s: post author. */ esc_html_x( 'by %s', 'post author', 'blossom-feminine' ), '' ); echo ''; // WPCS: XSS OK. } endif; if ( ! function_exists( 'blossom_feminine_comment_count' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function blossom_feminine_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-feminine' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'blossom_feminine_categories' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function blossom_feminine_categories() { // 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-feminine' ) ); if ( $categories_list ) { echo '' . $categories_list . ''; } } } endif; if ( ! function_exists( 'blossom_feminine_tags' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function blossom_feminine_tags() { // 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 ) { echo ''; } } } endif; if ( ! function_exists( 'blossom_feminine_edit_post_link' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function blossom_feminine_edit_post_link() { if ( get_edit_post_link() ){ edit_post_link( sprintf( wp_kses( /* translators: %s: Name of current post. Only visible to screen readers */ __( 'Edit %s', 'blossom-feminine' ), array( 'span' => array( 'class' => array(), ), ) ), get_the_title() ), '', '' ); } } endif; if( ! function_exists( 'blossom_feminine_sidebar_layout' ) ) : /** * Return sidebar layouts for pages/posts */ function blossom_feminine_sidebar_layout(){ global $post; $return = false; $page_layout = get_theme_mod( 'page_sidebar_layout', 'right-sidebar' ); //Default Layout Style for Pages $post_layout = get_theme_mod( 'post_sidebar_layout', 'right-sidebar' ); //Default Layout Style for Posts if( is_archive() && blossom_feminine_is_woocommerce_activated() && ( is_shop() || is_product_category() || is_product_tag() ) ){ if( is_active_sidebar( 'shop-sidebar' ) ){ $return = 'rightsidebar'; //With Sidebar }else{ $return = 'full-width'; } }elseif( is_singular() ){ if( get_post_meta( $post->ID, '_sidebar_layout', true ) ){ $sidebar_layout = get_post_meta( $post->ID, '_sidebar_layout', true ); }else{ $sidebar_layout = 'default-sidebar'; } if( is_page() ){ if( is_page_template( 'templates/blossom-portfolio.php' ) ) { $return = 'full-width'; }elseif( 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( 'blossom-portfolio' === get_post_type() ){ //For Portfolio Post Type $return = 'full-width'; //Fullwidth }elseif( blossom_feminine_is_woocommerce_activated() && 'product' === get_post_type() ){ if( is_active_sidebar( 'shop-sidebar' ) ){ if( $post_layout == 'right-sidebar' ) $return = 'rightsidebar'; //With Sidebar if( $post_layout == 'left-sidebar' ) $return = 'leftsidebar'; if( $post_layout == 'no-sidebar' ) $return = 'full-width'; }else{ $return = 'full-width'; } }elseif( 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'; } } }else{ if( is_active_sidebar( 'sidebar' ) ){ $return = 'rightsidebar'; }else{ $return = 'full-width'; } } return $return; } endif; if( ! function_exists( 'blossom_feminine_primary_menu_fallback' ) ) : /** * Fallback for primary menu */ function blossom_feminine_primary_menu_fallback(){ if( current_user_can( 'manage_options' ) ){ echo '
'; } } endif; if( ! function_exists( 'blossom_feminine_secondary_menu_fallback' ) ) : /** * Fallback for secondary menu */ function blossom_feminine_secondary_menu_fallback(){ if( current_user_can( 'manage_options' ) ){ echo ''; } } endif; if( ! function_exists( 'blossom_feminine_theme_comment' ) ) : /** * Callback function for Comment List * * * @link https://codex.wordpress.org/Function_Reference/wp_list_comments */ function blossom_feminine_theme_comment( $comment, $args, $depth ){ if ( 'div' == $args['style'] ) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-"> __( 'Georgia', 'blossom-feminine' ), 'palatino-serif' => __( 'Palatino Linotype, Book Antiqua, Palatino', 'blossom-feminine' ), 'times-serif' => __( 'Times New Roman, Times', 'blossom-feminine' ), 'arial-helvetica' => __( 'Arial, Helvetica', 'blossom-feminine' ), 'arial-gadget' => __( 'Arial Black, Gadget', 'blossom-feminine' ), 'comic-cursive' => __( 'Comic Sans MS, cursive', 'blossom-feminine' ), 'impact-charcoal' => __( 'Impact, Charcoal', 'blossom-feminine' ), 'lucida' => __( 'Lucida Sans Unicode, Lucida Grande', 'blossom-feminine' ), 'tahoma-geneva' => __( 'Tahoma, Geneva', 'blossom-feminine' ), 'trebuchet-helvetica' => __( 'Trebuchet MS, Helvetica', 'blossom-feminine' ), 'verdana-geneva' => __( 'Verdana, Geneva', 'blossom-feminine' ), 'courier' => __( 'Courier New, Courier', 'blossom-feminine' ), 'lucida-monaco' => __( 'Lucida Console, Monaco', 'blossom-feminine' ), ); $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; if( ! function_exists( 'blossom_feminine_escape_text_tags' ) ) : /** * Remove new line tags from string * * @param $text * * @return string */ function blossom_feminine_escape_text_tags( $text ) { return (string) str_replace( array( "\r", "\n" ), '', strip_tags( $text ) ); } endif; /** * Is Blossom Theme Toolkit active or not */ function blossom_feminine_is_bttk_activated(){ return class_exists( 'Blossomthemes_Toolkit' ) ? true : false; } /** * Is BlossomThemes Email Newsletters active or not */ function blossom_feminine_is_btnw_activated(){ return class_exists( 'Blossomthemes_Email_Newsletter' ) ? true : false; } /** * Is BlossomThemes Instagram Feed active or not */ function blossom_feminine_is_btif_activated(){ return class_exists( 'Blossomthemes_Instagram_Feed' ) ? true : false; } /** * Query WooCommerce activation */ function blossom_feminine_is_woocommerce_activated() { return class_exists( 'woocommerce' ) ? true : false; } if( ! function_exists( 'blossom_feminine_get_image_sizes' ) ) : /** * Get information about available image sizes */ function blossom_feminine_get_image_sizes( $size = '' ) { global $_wp_additional_image_sizes; $sizes = array(); $get_intermediate_image_sizes = get_intermediate_image_sizes(); // Create the full array with sizes and crop info foreach( $get_intermediate_image_sizes as $_size ) { if ( in_array( $_size, array( 'thumbnail', 'medium', 'medium_large', 'large' ) ) ) { $sizes[ $_size ]['width'] = get_option( $_size . '_size_w' ); $sizes[ $_size ]['height'] = get_option( $_size . '_size_h' ); $sizes[ $_size ]['crop'] = (bool) get_option( $_size . '_crop' ); } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) { $sizes[ $_size ] = array( 'width' => $_wp_additional_image_sizes[ $_size ]['width'], 'height' => $_wp_additional_image_sizes[ $_size ]['height'], 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'] ); } } // Get only 1 size if found if ( $size ) { if( isset( $sizes[ $size ] ) ) { return $sizes[ $size ]; } else { return false; } } return $sizes; } endif; if ( ! function_exists( 'blossom_feminine_get_fallback_svg' ) ) : /** * Get Fallback SVG */ function blossom_feminine_get_fallback_svg( $post_thumbnail ) { if( ! $post_thumbnail ){ return; } $image_size = blossom_feminine_get_image_sizes( $post_thumbnail ); if( $image_size ){ ?>
%s says:', 'blossom-feminine' ), get_comment_author_link() ); ?>