// '; return $output; } /** Bandana Post Sticky */ function bandana_post_sticky() { $output = ''; if ( is_sticky() ) { $output = sprintf( '%2$s %1$s', __( 'Featured', 'bandana' ), bandana_entry_meta_sep() ); } return $output; } /** Bandana Post Date */ function bandana_post_date() { $post_date = esc_html( get_the_date() ) . " " . esc_attr( get_the_time() ); /** Output */ $output = sprintf( '%1$s', $post_date, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ) ); return $output; } /** Bandana Post Author */ function bandana_post_author() { $output = sprintf( '%3$s', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ), bandana_entry_meta_sep() ); return $output; } /** Bandana Post Edit Link */ function bandana_post_edit_link() { /** Manipulation */ ob_start(); if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) : edit_post_link( __( 'Edit', 'bandana' ), sprintf( '%1$s', bandana_entry_meta_sep() ), '' ); else: edit_post_link( __( 'Edit', 'bandana' ), '', '' ); endif; $output = ob_get_clean(); return $output; } /** Bandana Post Comments */ function bandana_post_comments() { if ( ( ! comments_open() || post_password_required() ) ) { return; } ob_start(); comments_number( __( 'Leave a Comment', 'bandana' ), __( '1 Comment', 'bandana' ), __( '% Comments', 'bandana' ) ); $comments = ob_get_clean(); /** Output */ $comments = sprintf( '%s', esc_url( get_comments_link() ), $comments ); $output = sprintf( '%2$s%1$s', $comments, bandana_entry_meta_sep() ); return $output; } /** Bandana Post Categories */ function bandana_post_category() { $categories_list = get_the_category_list( ', ' ); if ( ! $categories_list ) { return; } $output = sprintf( ''. __( 'Posted in:', 'bandana' ) .' %2$s', 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); return $output; } /** Bandana Post Tags */ function bandana_post_tags() { $tags_list = get_the_tag_list( '', ', ' ); if ( ! $tags_list ) { return; } $output = sprintf( '%3$s'. __( 'Tagged:', 'bandana' ) .' %2$s', 'entry-utility-prep entry-utility-prep-tag-links', $tags_list, bandana_entry_meta_sep() ); return $output; } /** Bandana Link Pages */ function bandana_link_pages() { return wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', 'echo' => 0 ) ); } /** Bandana Post Style */ function bandana_post_style() { $bandana_options = bandana_get_settings(); if( $bandana_options['bandana_post_style'] == 'excerpt' ) { the_excerpt(); } else { the_content(); } } /** Bandana Featured Image */ function bandana_featured_image() { $bandana_options = bandana_get_settings(); if( $bandana_options['bandana_featured_image_control'] == 'no' ) { return; } $img = bandana_get_image( array( 'format' => 'html', 'size' => 'featured', 'mode' => $bandana_options['bandana_featured_image_control'], 'attr' => array( 'class' => 'entry-image' ) ) ); if( empty( $img ) ): return; endif; printf( '
%s
', esc_url( get_permalink() ), the_title_attribute( 'echo=0' ), $img ); } /** Bandana Loop Navigation */ function bandana_loop_nav() { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : $bandana_options = bandana_get_settings(); if ( $bandana_options['bandana_nav_style'] == 'numeric' ) : bandana_loop_nav_numeric(); else: bandana_loop_nav_next_prev(); endif; endif; } /** Bandana Loop Navigation Numeric */ function bandana_loop_nav_numeric() { global $wp_query; $big = 999999999; // Need an unlikely integer $args = array( 'base' => str_replace( $big, '%#%', get_pagenum_link( $big ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'total' => $wp_query->max_num_pages ); ?> ← '. __( 'Older Posts', 'bandana' ) ); $next_posts_link = ob_get_clean(); ob_start(); previous_posts_link( __( 'Newer Posts', 'bandana' ) .' ' ); $previous_posts_link = ob_get_clean(); $next_posts_link = ( empty( $next_posts_link ) )? ' ' : $next_posts_link; $previous_posts_link = ( empty( $previous_posts_link ) )? ' ' : $previous_posts_link; ?>

← '. __( 'Previous Post', 'bandana' ) ); $previous_post_link = ob_get_clean(); ob_start(); next_post_link( '%link', __( 'Next Post', 'bandana' ) . ' ' ); $next_post_link = ob_get_clean(); $previous_post_link = ( empty( $previous_post_link ) )? ' ' : $previous_post_link; $next_post_link = ( empty( $next_post_link ) )? ' ' : $next_post_link; ?>

post_parent ); ?>
' . $previous_image_link . '

'; $next_image_link = ( empty( $next_image_link ) )? ' ' : '

' . $next_image_link . '

'; ?>

'. get_bloginfo( 'name' ) .''; if( $bandana_options['bandana_copyright_control'] == 1 ) { $bandana_copyright_code = ' '; if( ! empty( $bandana_options['bandana_copyright'] ) ) { $bandana_copyright_code = wp_specialchars_decode( $bandana_options['bandana_copyright'], ENT_QUOTES ); } } ?>
Bandana Theme WordPress
comment_type ) { case 'pingback': case 'trackback': ?>
  • ', '' ); ?>

  • id="li-comment-">
    comment_parent ) { $avatar_size = 60; } echo get_avatar( $comment, $avatar_size ); ?> %3$s', sprintf( '%s', get_comment_author_link() ), sprintf( '%3$s', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), sprintf( '%1$s at %2$s', get_comment_date(), get_comment_time() ) ), __( 'said:', 'bandana' ) ); ?> ', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply', 'bandana' ) . '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    comment_type ) } /** Filter 'wp_title' to output contextual content. */ add_filter( 'wp_title', 'bandana_wp_title', 10, 2 ); function bandana_wp_title( $title, $separator ) { /** Don't affect wp_title() calls in feeds. */ if ( is_feed() ) { return $title; } /** * The $paged global variable contains the page number of a listing of posts. * The $page global variable contains the page number of a single post that is paged. * We'll display whichever one applies, if we're not looking at the first page. */ global $paged, $page; if ( is_search() ) { /** If we're a search, let's start over: */ $title = sprintf( 'Search results for %s', '"' . get_search_query() . '"' ); /** Add a page number if we're on page 2 or more: */ if ( $paged >= 2 ) { $title .= " ". $separator ." " . sprintf( 'Page %s', $paged ); } /** Add the site name to the end: */ $title .= " ". $separator ." " . get_bloginfo( 'name', 'display' ); /** We're done. Let's send the new title back to wp_title(): */ return $title; } /** Otherwise, let's start by adding the site name to the end: */ $title .= get_bloginfo( 'name', 'display' ); /** If we have a site description and we're on the home/front page, add the description: */ $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) { $title .= " ". $separator ." " . $site_description; } /** Add a page number if necessary: */ if ( $paged >= 2 || $page >= 2 ) { $title .= " $separator " . sprintf( 'Page %s', max( $paged, $page ) ); } /** Return the new title to wp_title(): */ return $title; } /** Sets the post excerpt length. */ add_filter( 'excerpt_length', 'bandana_excerpt_length' ); function bandana_excerpt_length( $length ) { return 20; } /** Returns a "Read more" link for content */ add_filter( 'the_content_more_link', 'bandana_content_more_link', 10, 2 ); function bandana_content_more_link( $more_link, $more_link_text ) { return str_replace( $more_link_text, ''. __( 'Read More →', 'bandana' ) .'', $more_link ); } /** Returns a "Read more" link for excerpts */ function bandana_continue_reading_link() { return ''. __( 'Read More →', 'bandana' ) .''; } /** Replaces "[...]" (appended to automatically generated excerpts) with bandana_continue_reading_link(). */ add_filter( 'excerpt_more', 'bandana_auto_excerpt_more' ); function bandana_auto_excerpt_more( $more ) { return ' ' . bandana_continue_reading_link(); } /** Adds a pretty "Read more" link to custom post excerpts. */ add_filter( 'get_the_excerpt', 'bandana_custom_excerpt_more' ); function bandana_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= ' ' . bandana_continue_reading_link(); } return $output; } /** Remove WP Gallery CSS */ add_filter( 'use_default_gallery_style', '__return_false' );