term_id, 'category_color', true);
$color = get_theme_mod('category_' .absint($cat->term_id). '_color' , '');
if($color){
$style = "--cat-color:".esc_attr($color);
}
?>
cat_name);?>
'; the_post_thumbnail( '', array( 'class'=>'img-fluid' ) ); echo ''; ?>
$blogdata_meta_order) {
if ($blogdata_meta_order == 'author') {
blogdata_author_content();
}
if ($blogdata_meta_order == 'date') {
blogdata_date_content();
}
if ($blogdata_meta_order == 'comments') {
blogdata_post_comments();
}
}
blogdata_edit_link(); ?>
';
$blogdata_blog_post_category = blogdata_get_option('blogdata_blog_post_category');
if ($blogdata_blog_post_category == true) {
blogdata_post_categories();
} ?>
';
}
do_action('blogdata_breadcrumb_content'); ?>
post_content;
if ( ! empty( get_the_excerpt($post_obj) ) ) {
$source_content = get_the_excerpt($post_obj);
}
// Check if non-breaking space exists in the text with variations
if (preg_match('/\s*( |\xA0)\s*/u', $source_content)) {
// Remove non-breaking space and its variations from the text
$source_content = preg_replace('/\s*( |\xA0)\s*/u', ' ', $source_content);
}
$source_content = preg_replace( '`\[[^\]]*\]`', '', $source_content );
$trimmed_content = wp_trim_words( $source_content, $length, '…' );
return $trimmed_content;
}
endif;
if ( ! function_exists( 'blogdata_breadcrumb_trail' ) ) :
/**
* Theme default breadcrumb function.
*
* @since 1.0.0
*/
function blogdata_breadcrumb_trail() {
if ( ! function_exists( 'breadcrumb_trail' ) ) {
// load class file
require_once get_template_directory() . '/inc/ansar/breadcrumb-trail/breadcrumb-trail.php';
}
$breadcrumb_args = array(
'container' => 'div',
'show_browse' => false,
);
breadcrumb_trail( $breadcrumb_args );
}
add_action( 'blogdata_breadcrumb_trail_content', 'blogdata_breadcrumb_trail' );
endif;
if( ! function_exists( 'blogdata_breadcrumb' ) ) :
/**
*
* @package blogdata
*/
function blogdata_breadcrumb() {
if ( is_front_page() || is_home() ) return;
$breadcrumb_settings = get_theme_mod('breadcrumb_settings','true');
if($breadcrumb_settings == true) {
$blogdata_site_breadcrumb_type = get_theme_mod('blogdata_site_breadcrumb_type','default'); ?>
theme_location != 'primary') return $item_output;
if ( !empty( $item->description ) ) {
$item_output = str_replace( $args->link_after . '', '' . $args->link_after . '', $item_output );
}
return $item_output;
}
add_filter( 'walker_nav_menu_start_el', 'blogdata_add_menu_description', 10, 4 );
endif;
if ( ! function_exists( 'blogdata_search_count' ) ) :
function blogdata_search_count() {
global $wp_query;
$total_results = $wp_query->found_posts;
?>
0 ) {
// Translators: %s is the number of found results.
echo sprintf(
_n( '%s result found', '%s results found', $total_results, 'blogdata' ),
number_format_i18n( $total_results )
);
} else {
echo esc_html__( 'No results found', 'blogdata' );
}
?>