'. __( 'Sticky', 'blazeblog' ) .''); } if ( 'post' === get_post_type() ) { $author_avatar_size = apply_filters( 'ggfx_author_avatar_size', 49 ); printf( '%1$s%2$s %4$s', get_avatar( get_the_author_meta( 'user_email' ), $author_avatar_size ), _x( 'Author', 'Used before post author name.', 'blazeblog' ), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), get_the_author() ); } if ( in_array( get_post_type(), array( 'post', 'attachment' ) ) ) { ggfx_entry_date(); } $format = get_post_format(); if ( current_theme_supports( 'post-formats', $format ) ) { printf( '%1$s%3$s', sprintf( '%s ', _x( 'Format', 'Used before post format.', 'blazeblog' ) ), esc_url( get_post_format_link( $format ) ), get_post_format_string( $format ), $format ); } if ( 'post' === get_post_type() ) { ggfx_entry_taxonomies(); } if ( ! is_singular() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo ''; comments_popup_link( sprintf( __( 'Leave a comment on %s', 'blazeblog' ), get_the_title() ) ); echo ''; } } endif; if ( ! function_exists( 'ggfx_entry_date' ) ) : /** * Prints HTML with date information for current post. * * Create your own ggfx_entry_date() function to override in a child theme. * * @since BlazeBlog 1.0 */ function ggfx_entry_date() { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), get_the_date(), esc_attr( get_the_modified_date( 'c' ) ), get_the_modified_date() ); printf( '%1$s %3$s', _x( 'Posted on', 'Used before publish date.', 'blazeblog' ), esc_url( get_permalink() ), $time_string ); } endif; if ( ! function_exists( 'ggfx_entry_taxonomies' ) ) : /** * Prints HTML with category and tags for current post. * * Create your own ggfx_entry_taxonomies() function to override in a child theme. * * @since BlazeBlog 1.0 */ function ggfx_entry_taxonomies() { $categories_list = get_the_category_list( _x( ' ', 'Used between list items, there is a space after the comma.', 'blazeblog' ) ); if ( $categories_list && ggfx_categorized_blog() ) { printf( '%1$s %2$s', _x( 'Categories', 'Used before category names.', 'blazeblog' ), $categories_list ); } $tags_list = get_the_tag_list( '', _x( ' ', 'Used between list items, there is a space after the comma.', 'blazeblog' ) ); if ( $tags_list ) { printf( '%1$s %2$s', _x( 'Tags', 'Used before tag names.', 'blazeblog' ), $tags_list ); } } endif; if ( ! function_exists( 'ggfx_post_thumbnail' ) ) : /** * Displays an optional post thumbnail. * * Wraps the post thumbnail in an anchor element on index views, or a div * element when on single views. * * Create your own ggfx_post_thumbnail() function to override in a child theme. * * @since BlazeBlog 1.0 */ function ggfx_post_thumbnail() { if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) { return; } if ( is_singular() ) : ?>
the_title_attribute( 'echo=0' ), 'class' => 'img-responsive' ) ); ?>
' . $string . '

'; if($more) { $string .= sprintf( ''. __( 'Continue reading "%1$s"', 'blazeblog' ) . ' »', $post->post_title, esc_url( get_permalink( $post->ID ) ) ); } // Make sure to return the content return $string; } function ggfx_link_pages() { return wp_link_pages( array( 'before' => '', 'link_before' => '', 'link_after' => '', 'pagelink' => '' . __( 'Page', 'blazeblog' ) . ' %', 'separator' => ', ', ) ); } /** * Determines whether blog/site has more than one category. * * Create your own ggfx_categorized_blog() function to override in a child theme. * * @since BlazeBlog 1.0 * * @return bool True if there is more than one category, false otherwise. */ function ggfx_categorized_blog() { if ( false === ( $all_the_cool_cats = get_transient( 'ggfx_categories' ) ) ) { // Create an array of all the categories that are attached to posts. $all_the_cool_cats = get_categories( array( 'fields' => 'ids', // We only need to know if there is more than one category. 'number' => 2, ) ); // Count the number of categories that are attached to the posts. $all_the_cool_cats = count( $all_the_cool_cats ); set_transient( 'ggfx_categories', $all_the_cool_cats ); } if ( $all_the_cool_cats > 1 ) { // This blog has more than 1 category so ggfx_categorized_blog should return true. return true; } else { // This blog has only 1 category so ggfx_categorized_blog should return false. return false; } } /** * Flushes out the transients used in ggfx_categorized_blog(). * * @since BlazeBlog 1.0 */ function ggfx_category_transient_flusher() { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { return; } // Like, beat it. Dig? delete_transient( 'ggfx_categories' ); } add_action( 'edit_category', 'ggfx_category_transient_flusher' ); add_action( 'save_post', 'ggfx_category_transient_flusher' ); // modifies html template of categories posts count if ( ! function_exists( 'categories_postcount_filter' ) ) : function categories_postcount_filter ( $links ) { $links = str_replace(' (', '', $links); $links = str_replace(')', '', $links); return $links; } add_filter('wp_list_categories','categories_postcount_filter'); endif; // returns HTML template for WordPress Comments Form if ( ! function_exists( 'ggfx_comment_form' ) ) : function ggfx_comment_form(){ $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? " aria-required='true'" : '' ); $user = wp_get_current_user(); $user_identity = $user->display_name; $comment_form_fields = array( 'author' => '
' . '
' . '' . '
' . '
' , 'email' => '
' . '
' . '' . '
' . '
' , ); $comment_form_args = array( 'title_reply_before' => '

', 'title_reply_after' => '

', 'title_reply' => __('Leave a Comment', 'blazeblog'), 'comment_notes_before' => '

'. __('All fields are required. Your email address will not be published.', 'blazeblog') .'

', 'label_submit' => __('Post Comment', 'blazeblog'), 'fields' => $comment_form_fields, 'comment_field' => '
' . '
' . '' . '
' . '
', 'comment_notes_after' => '', 'logged_in_as' => '

' . sprintf( __('Logged in as %2$s. Log out?', 'blazeblog'), admin_url( 'profile.php' ), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '

', 'must_log_in' => '

' . sprintf( __('You must be logged in to post a comment.', 'blazeblog'), wp_login_url( apply_filters( 'the_permalink', get_permalink( ) ) ) ) . '

' ); echo '
'; echo '
'; comment_form($comment_form_args); echo '
'; echo '
'; echo '
'; } endif; // returns HTML template for comments/discussion threads under the post or page. if ( ! function_exists( 'ggfx_comment' ) ) : function ggfx_comment($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-">
%2$s', get_comment_author_url(), get_comment_author(), ((get_comment_author() == get_the_author()) ? ' original-author' : '') ); ?>
comment_approved == '0') : ?>
%2$s at %3$s', get_comment_link(), get_comment_date(), get_comment_time()); ?>