comments_by_type['comment'] ) ) { printf( '
', bizznis_attr( 'entry-comments' ) ); echo apply_filters( 'bizznis_title_comments', __( '

Comments

', 'bizznis' ) ); printf( '
    ', bizznis_attr( 'comment-list' ) ); do_action( 'bizznis_list_comments' ); echo '
'; # Comment Navigation $prev_link = get_previous_comments_link( apply_filters( 'bizznis_prev_comments_link_text', '' ) ); $next_link = get_next_comments_link( apply_filters( 'bizznis_next_comments_link_text', '' ) ); if ( $prev_link || $next_link ) { printf( ''; } echo '
'; } # No comments so far elseif ( 'open' == get_post()->comment_status && $no_comments_text = apply_filters( 'bizznis_no_comments_text', '' ) ) { echo sprintf( '
', bizznis_attr( 'entry-comments' ) ) . $no_comments_text . '
'; } elseif ( $comments_closed_text = apply_filters( 'bizznis_comments_closed_text', '' ) ) { echo sprintf( '
', bizznis_attr( 'entry-comments' ) ) . $comments_closed_text . '
'; } } endif; add_action( 'bizznis_comments', 'bizznis_do_pings', 10 ); /** * Echo Bizznis default trackback structure. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_do_pings' ) ) : function bizznis_do_pings() { global $wp_query; # Stop here if pings are off if ( get_option( 'default_ping_status' ) === 'closed' ) { return; } # If have pings if ( have_comments() && !empty( $wp_query->comments_by_type['pings'] ) ) { printf( '
', bizznis_attr( 'entry-pings' ) ); echo apply_filters( 'bizznis_title_pings', __( '

Trackbacks

', 'bizznis' ) ); echo '
    '; do_action( 'bizznis_list_pings' ); echo '
'; echo '
'; } else { echo apply_filters( 'bizznis_no_pings_text', '' ); } } endif; add_action( 'bizznis_list_pings', 'bizznis_default_list_pings' ); /** * Output the list of trackbacks. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_default_list_pings' ) ) : function bizznis_default_list_pings() { $args = apply_filters( 'bizznis_ping_list_args', array( 'type' => 'pings', ) ); wp_list_comments( $args ); } endif; add_action( 'bizznis_list_comments', 'bizznis_default_list_comments' ); /** * Output the list of comments. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_default_list_comments' ) ) : function bizznis_default_list_comments() { $defaults = array( 'type' => 'comment', 'avatar_size' => 60, 'format' => 'html5', # Not necessary, but a good example 'callback' => 'bizznis_comment_callback', ); $args = apply_filters( 'bizznis_comment_list_args', $defaults ); wp_list_comments( $args ); } endif; /** * Does 'bizznis_before_comment' and 'bizznis_after_comment' actions. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_comment_callback' ) ) : function bizznis_comment_callback( $comment, array $args, $depth ) { $GLOBALS['comment'] = $comment; ?>
  • id="comment-">
    >
    >

    > %s', esc_url( $url ), bizznis_attr( 'comment-author-link' ), $author ); } /** * Filter the "comment author says" text. * * Allows developer to filter the "comment author says" text so it can say something different, or nothing at all. * * @since 1.1.0 * * @param string $text Comment author says text. */ $comment_author_says_text = apply_filters( 'comment_author_says_text', __( 'says', 'bizznis' ) ); if ( ! empty( $comment_author_says_text ) ) { $comment_author_says_text = '' . $comment_author_says_text . ''; } printf( '%s %s', $author, $comment_author_says_text ); edit_comment_link( __( '(Edit)', 'bizznis' ), ' ' ); ?>

    ', bizznis_attr( 'comment-meta' ) ); printf( '

    '; } ?>
    > comment_approved ) : ?>

    $depth, 'before' => sprintf( '
    ', bizznis_attr( 'comment-reply' ) ), 'after' => '
    ', ) ) ); ?>
    tag because of comment threading } endif; add_action( 'bizznis_comments', 'bizznis_do_comment_form', 15 ); /** * Optionally show the comment form. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_do_comment_form' ) ) : function bizznis_do_comment_form() { comment_form( array( 'format' => 'html5' ) ); } endif; /** * Filter the default comment form arguments, used by 'comment_form()'. * * @since 1.0.0 */ // add_filter( 'comment_form_defaults', 'bizznis_comment_form_args' ); if ( ! function_exists( 'bizznis_comment_form_args' ) ) : function bizznis_comment_form_args( array $defaults ) { global $user_identity; $commenter = wp_get_current_commenter(); $req = get_option( 'require_name_email' ); $aria_req = ( $req ? ' aria-required="true"' : '' ); $author = '
    ' . '' . '' . '
    '; $email = '
    ' . '' . '' . '
    '; $url = '
    ' . '' . '' . '
    '; $comment_field = '
    ' . '' . '
    '; $args = array( 'comment_field' => $comment_field, 'title_reply' => __( 'Leave a Reply', 'bizznis' ), 'comment_notes_before' => '', 'comment_notes_after' => '', 'fields' => array( 'author' => $author, 'email' => $email, 'url' => $url, ), ); # Merge $args with $defaults $args = wp_parse_args( $args, $defaults ); # Return filterable array of $args, along with other optional variables return apply_filters( 'bizznis_comment_form_args', $args, $user_identity, get_the_ID(), $commenter, $req, $aria_req ); } endif; add_filter( 'get_comments_link', 'bizznis_comments_link_filter', 10, 2 ); /** * Filter the comments link. If post has comments, link to #comments div. If no, link to #respond div. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_comments_link_filter' ) ) : function bizznis_comments_link_filter( $link, $post_id ) { if ( 0 == get_comments_number() ) { return get_permalink( $post_id ) . '#respond'; } return $link; } endif;