%1$s', $post_date, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ) ); return $output; } /** Alkane Post Author */ function alkane_post_author() { $output = sprintf( '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_html( get_the_author() ) ); return $output; } /** Alkane Post Edit Link */ function alkane_post_edit_link() { /** Manipulation */ ob_start(); if ( 'post' == get_post_type() ) : edit_post_link( __( 'Edit', 'alkane' ), '', '' ); else: edit_post_link( __( 'Edit', 'alkane' ), '', '' ); endif; $output = ob_get_clean(); return $output; } /** Alkane Post Comments */ function alkane_post_comments() { if ( ( ! comments_open() || post_password_required() ) ) { return; } ob_start(); comments_number( __( 'Leave a Comment', 'alkane' ), __( '1 Comment', 'alkane' ), __( '% Comments', 'alkane' ) ); $comments = ob_get_clean(); /** Output */ $comments = sprintf( '%s', esc_url( get_comments_link() ), $comments ); $output = sprintf( '%1$s', $comments ); return $output; } /** Alkane Post Categories */ function alkane_post_category() { $categories_list = get_the_category_list( ', ' ); if ( ! $categories_list ) { return; } $output = sprintf( ''. __( 'Posted in:', 'alkane' ) .' %2$s', 'entry-utility-prep entry-utility-prep-cat-links', $categories_list ); return $output; } /** Alkane Post Tags */ function alkane_post_tags() { $tags_list = get_the_tag_list( '', ', ' ); if ( ! $tags_list ) { return; } $output = sprintf( ''. __( 'Tagged:', 'alkane' ) .' %2$s', 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); return $output; } /** Alkane Link Pages */ function alkane_link_pages() { return wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', 'echo' => 0 ) ); } /** Alkane Post Style */ function alkane_post_style() { $alkane_options = alkane_get_settings(); if( $alkane_options['alkane_post_style'] == 'excerpt' ): the_excerpt(); else: the_content( __( 'Read More', 'alkane' ) . ' ' ); endif; } /** Alkane Featured Image */ function alkane_featured_image() { $alkane_options = alkane_get_settings(); if( $alkane_options['alkane_post_style'] != 'excerpt' ): return; endif; $img = alkane_get_image( array( 'format' => 'html', 'size' => 'featured', 'attr' => array( 'class' => 'entry-image' ) ) ); if( empty( $img ) ): return; endif; printf( '
%s
', esc_url( get_permalink() ), the_title_attribute( 'echo=0' ), $img ); } /** Alkane Loop Navigation */ function alkane_loop_nav() { global $wp_query; if ( $wp_query->max_num_pages > 1 ) : $alkane_options = alkane_get_settings(); if ( $alkane_options['alkane_post_nav_style'] == 'numeric' ) : alkane_loop_nav_numeric(); else: alkane_loop_nav_next_prev(); endif; endif; } /** Alkane Loop Navigation Numeric */ function alkane_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', 'alkane' ) ); $next_posts_link = ob_get_clean(); ob_start(); previous_posts_link( __( 'Newer Posts', 'alkane' ) .' ' ); $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', 'alkane' ) ); $previous_post_link = ob_get_clean(); ob_start(); next_post_link( '%link', __( 'Next Post', 'alkane' ) . ' ' ); $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 . '

'; ?>

WPAlkaneWordPress
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:', 'alkane' ) ); ?> ', '' ); ?>
    comment_approved == '0' ) : ?>
    __( 'Reply', 'alkane' ) . '', 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    comment_type ) } /** Filter 'wp_title' to output contextual content. */ add_filter( 'wp_title', 'alkane_wp_title', 10, 2 ); function alkane_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', 'alkane_excerpt_length' ); function alkane_excerpt_length( $length ) { return 65; } /** Returns a "Read more" link for content */ add_filter( 'the_content_more_link', 'alkane_content_more_link', 10, 2 ); function alkane_content_more_link( $more_link, $more_link_text ) { return str_replace( $more_link_text, ''. __( 'Read More →', 'alkane' ) .'', $more_link ); } /** Returns a "Read more" link for excerpts */ function alkane_continue_reading_link() { return ''. __( 'Read More →', 'alkane' ) .''; } /** Replaces "[...]" (appended to automatically generated excerpts) with alkane_continue_reading_link(). */ add_filter( 'excerpt_more', 'alkane_auto_excerpt_more' ); function alkane_auto_excerpt_more( $more ) { return ' ' . alkane_continue_reading_link(); } /** Adds a pretty "Read more" link to custom post excerpts. */ add_filter( 'get_the_excerpt', 'alkane_custom_excerpt_more' ); function alkane_custom_excerpt_more( $output ) { if ( has_excerpt() && ! is_attachment() ) { $output .= ' ' . alkane_continue_reading_link(); } return $output; } /** Remove WP Gallery CSS */ add_filter( 'use_default_gallery_style', '__return_false' ); ?>