ID )){ $post_id = $post->ID; } } if( 0 == $post_id ){ return null; } $categories = get_the_category($post_id); $separator = ' '; $output = ''; if($categories) { $output .= ''; foreach($categories as $category) { $output .= ''.esc_html( $category->cat_name ).''.$separator; } $output .=''; echo trim($output, $separator); } } endif; /** * Callback functions for comments * * @since acmeblog 1.0.0 * * @param $comment * @param $args * @param $depth * @return void * */ if ( !function_exists('acmeblog_commment_list') ) : function acmeblog_commment_list($comment, $args, $depth) { $GLOBALS['comment'] = $comment; extract($args, EXTR_SKIP); if ('div' == $args['style']) { $tag = 'div'; $add_below = 'comment'; } else { $tag = 'li'; $add_below = 'div-comment'; } ?> < id="comment-">
%s', 'acmeblog' ), get_comment_author_link()); ?>
comment_approved == '0') : ?>
$add_below, 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
ID )) { $post_class = get_post_meta( $post->ID, 'acmeblog_sidebar_layout', true ); if ( 'default-sidebar' != $post_class ){ if ( $post_class ) { $acmeblog_body_classes = $post_class; } else { $acmeblog_body_classes = $acmeblog_body_global_class; } } else{ $acmeblog_body_classes = $acmeblog_body_global_class; } } elseif ( is_archive() ) { if( isset( $acmeblog_customizer_all_values['acmeblog-archive-sidebar-layout'] ) ){ $acmeblog_archive_sidebar_layout = $acmeblog_customizer_all_values['acmeblog-archive-sidebar-layout']; if( 'right-sidebar' == $acmeblog_archive_sidebar_layout || 'left-sidebar' == $acmeblog_archive_sidebar_layout || 'both-sidebar' == $acmeblog_archive_sidebar_layout || 'no-sidebar' == $acmeblog_archive_sidebar_layout ){ $acmeblog_body_classes = $acmeblog_archive_sidebar_layout; } else{ $acmeblog_body_classes = $acmeblog_body_global_class; } } else{ $acmeblog_body_classes= $acmeblog_body_global_class; } } else { $acmeblog_body_classes = $acmeblog_body_global_class; } return $acmeblog_body_classes; } endif; /** * Return content of fixed lenth * * @since acmeblog 1.0.0 * * @param string $acmeblog_content * @param int $length * @return string * */ if ( ! function_exists( 'acmeblog_words_count' ) ) : function acmeblog_words_count( $acmeblog_content = null, $length = 16 ) { $length = absint( $length ); $source_content = preg_replace( '`\[[^\]]*\]`', '', $acmeblog_content ); $trimmed_content = wp_trim_words( $source_content, $length, '...' ); return $trimmed_content; } endif; /** * BreadCrumb Settings */ if( ! function_exists( 'acmeblog_breadcrumbs' ) ): function acmeblog_breadcrumbs() { wp_reset_postdata(); global $post; $trans_here = __( 'You are here', 'acmeblog' ); $trans_home = __( 'Home', 'acmeblog' ); $search_result_text = __( 'Search Results for ', 'acmeblog' ); $showOnHome = 0; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = ' > '; // delimiter between crumbs $home = $trans_home; // text for the 'Home' link $showHomeLink = 1; $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $before = ''; // tag before the current crumb $after = ''; // tag after the current crumb $homeLink = esc_url( home_url() ); if (is_home() || is_front_page()) { if ($showOnHome == 1) echo '
'; } else { if($showHomeLink == 1){ echo '
'.esc_attr( $trans_here ).'