, ' ); if ( $tags_list ) { $output = ''.$tags_list.''; } return apply_filters( 'bstone_single_post_footer_tags', $output ); } } // End if /** * Bstone entry after - Post Single */ if ( ! function_exists( 'bstone_post_single_after_post_sections' ) ) { /** * Get After Post Sections */ function bstone_post_single_after_post_sections() { if ( is_single() ) { // Get Post After Elements $elements_after = bstone_options( 'after-single-post-structure' ); foreach ( $elements_after as $element ) { if( 'post-next-prev' == $element ) { echo bstone_get_post_nav(); } if( 'post-author' == $element ) { echo bstone_get_author_info_box(); } if( 'post-comments' == $element ) { // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) : comments_template(); endif; } } } } } // End if add_action( 'bstone_entry_after', 'bstone_post_single_after_post_sections' ); /** * Author Info Box */ if ( ! function_exists( 'bstone_get_author_info_box' ) ) { function bstone_get_author_info_box() { global $post; $author_box_content = $author_details = ''; // Detect if it is a single post with a post author if ( is_single() && isset( $post->post_author ) ) { // Get author's display name $display_name = get_the_author_meta( 'display_name', $post->post_author ); // If display name is not available then use nickname as display name if ( empty( $display_name ) ) { $display_name = get_the_author_meta( 'nickname', $post->post_author ); } // Get author's biographical information or description $user_description = get_the_author_meta( 'user_description', $post->post_author ); // Get author's website URL $user_website = get_the_author_meta('url', $post->post_author); // Get link to the author archive page $user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author)); $author_details = ''; // Pass all this info to post content $author_box_content = $author_details; } return apply_filters( 'bstone_get_author_info_box', $author_box_content ); } } // End if /** * Post Nav */ if ( ! function_exists( 'bstone_get_post_nav' ) ) { function bstone_get_post_nav() { $post_nav_taxonomy = bstone_options( 'nex-prev-liks-taxonomy' ); $post_nav_content = ''; if( 'default' == $post_nav_taxonomy ) { $post_nav_content = get_the_post_navigation(); } else if( 'category' == $post_nav_taxonomy ) { $post_nav_content = get_the_post_navigation( array( 'prev_text' => '%title', 'next_text' => '%title', 'in_same_term' => true, 'taxonomy' => 'category', 'screen_reader_text' => __( 'Post Navigation', 'bstone' ), ) ); } else if( 'tag' == $post_nav_taxonomy ) { $post_nav_content = get_the_post_navigation( array( 'prev_text' => '%title', 'next_text' => '%title', 'in_same_term' => true, 'taxonomy' => 'post_tag', 'screen_reader_text' => __( 'Post Navigation', 'bstone' ), ) ); } return apply_filters( 'bstone_get_post_nav', $post_nav_content ); } }// End if /** * Change default fields, add placeholder and change type attributes. * * @param array $fields * @return array */ function bstone_comment_placeholders( $fields ) { $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $label = $req ? '*' : ' ' . __( '(optional)', 'bstone' ); $aria_req = $req ? "aria-required='true'" : ''; $fields['author'] = '

'; $fields['email'] = '

'; $fields['url'] = '

'; return $fields; } add_filter( 'comment_form_default_fields', 'bstone_comment_placeholders' ); /** * Add placeholder to comment area. */ function bstone_comment_placeholders_textarea( $comment_field ) { $comment_field = '

'; return $comment_field; } add_filter( 'comment_form_field_comment', 'bstone_comment_placeholders_textarea' );