';
$before = ''; // tag before the current crumb
$after = ''; // tag after the current crumb
if( get_theme_mod( 'ed_breadcrumb', true ) ){
$depth = 1;
echo '
';
echo '';
}
}
endif;
if( ! function_exists( 'blossom_magazine_get_category_posts' ) ) :
/**
* Category posts
*
* @param int $post_no The number of posts according to category section
* @param int $cat The ID of category
* @param boolean $show_date The value of true or false
* @param boolean $image_crop The value of true or false
* @param boolean $show_author The value of true or false
* @param string $btn_lbl button label
*/
function blossom_magazine_get_category_posts( $post_no, $cat, $show_date, $image_crop, $show_author, $btn_lbl ){
echo '
';
echo '';
}
endif;
if( ! function_exists( 'blossom_magazine_posts_loop' ) ) :
/**
* Category posts loop
*
* @param int $post_no The number of posts according to category section
* @param int $single_cat The ID of category
* @param boolean $show_date The value of true or false
* @param boolean $image_crop The value of true or false
* @param boolean $show_author The value of true or false
*/
function blossom_magazine_posts_loop( $post_no, $single_cat, $show_date, $image_crop, $show_author ){
$query = blossom_magazine_query_calculation( $post_no, $single_cat );
if( $query->have_posts() ) { ?>
'post',
'posts_per_page' => $post_no
);
if( $cat1 ){
$args['tax_query'] = array(
array(
'taxonomy' => 'category',
'field' => 'term_id',
'terms' => $cat1,
)
);
}
$query = new WP_Query($args);
return $query;
}
endif;
if( ! function_exists( 'blossom_magazine_get_categories_section' ) ):
/**
* Categories section
*
* @param int $cat1 The ID of first category
* @param int $cat2 The ID of second category
* @param int $cat3 The ID of third category
* @param int $post_no The number of posts according to category section
* @param int $show_author The value of true or false
* @param int $show_date The value of true or false
* @param int $image_crop The value of true or false
* @param string $btn_lbl The label of section button
*
*/
function blossom_magazine_get_categories_section( $cat1, $cat2, $cat3, $post_no, $show_author, $show_date, $image_crop, $btn_lbl ) {
global $cat_variable;
$cat_variable = $cat2;
( ! $cat1 ) ? $category_one_class = ' no-category-one' : $category_one_class = '';
( ! $cat2 ) ? $category_two_class = ' no-category-two' : $category_two_class = '';
( ! $cat3 ) ? $category_three_class = ' no-category-three' : $category_three_class = ''; ?>
';
if( $cat1 ) blossom_magazine_get_category_posts( $posts_no, $cat1, $show_date, $image_crop, $show_author, $btn_lbl );
if( $cat2 ) blossom_magazine_get_category_posts( $posts_no, $cat2, $show_date, $image_crop, $show_author, $btn_lbl );
if( $cat3 ) blossom_magazine_get_category_posts( $posts_no, $cat3, $show_date, $image_crop, $show_author, $btn_lbl );
echo '';
}
endif;
if( ! function_exists( 'blossom_magazine_cat_image_size' ) ):
/**
* Category image sizes
*
* @param object $query
* @param boolean $image_crop The value of true or false
*
*/
function blossom_magazine_cat_image_size( $query, $image_crop ){
if( $image_crop ){
if( $query->current_post == 0 ){
$image_size = 'blossom-magazine-pop-cat';
}else{
$image_size = 'thumbnail';
}
}else{
$image_size = 'full';
}
return $image_size;
}
endif;
if( ! function_exists( 'blossom_magazine_get_single_post_details' ) ):
/**
*
* @param object $query
* @param boolean $show_date The value of true or false
* @param boolean $image_crop The value of true or false
* @param boolean $show_author The value of true or false
*/
function blossom_magazine_get_single_post_details( $query, $show_date, $image_crop, $show_author ){
$current_post_no = $query->current_post;
$image_size = blossom_magazine_cat_image_size( $query, $image_crop ); ?>
'image' ) );
}else{
blossom_magazine_get_fallback_svg( $image_size );
} ?>
%s says:', 'blossom-magazine' ), get_comment_author_link() ); ?>