comment_type || 'trackback' === $comment->comment_type ) : ?>
  • >
    ', '' ); ?>
  • >
    get_comment_ID() ) ); ?>>
    >
    > %s', get_comment_author_link() ); ?>
    comment_approved ) : // phpcs:ignore ?>

    'div-comment', 'depth' => $depth, 'max_depth' => $args['max_depth'], 'before' => '', 'after' => '', ) ) ); } add_filter( 'comment_form_defaults', 'generate_set_comment_form_defaults' ); /** * Set the default settings for our comments. * * @since 2.3 * * @param array $defaults The existing defaults. * @return array */ function generate_set_comment_form_defaults( $defaults ) { $defaults['comment_field'] = sprintf( '

    ', esc_html__( 'Comment', 'generatepress' ) ); $defaults['comment_notes_before'] = null; $defaults['comment_notes_after'] = null; $defaults['id_form'] = 'commentform'; $defaults['id_submit'] = 'submit'; $defaults['title_reply'] = apply_filters( 'generate_leave_comment', __( 'Leave a Comment', 'generatepress' ) ); $defaults['label_submit'] = apply_filters( 'generate_post_comment', __( 'Post Comment', 'generatepress' ) ); return $defaults; } add_filter( 'comment_form_default_fields', 'generate_filter_comment_fields' ); /** * Customizes the existing comment fields. * * @since 2.1.2 * @param array $fields The existing fields. * @return array */ function generate_filter_comment_fields( $fields ) { $commenter = wp_get_current_commenter(); $required = get_option( 'require_name_email' ); $fields['author'] = sprintf( '', esc_html__( 'Name', 'generatepress' ), esc_attr( $commenter['comment_author'] ), $required ? ' *' : '', $required ? ' required' : '' ); $fields['email'] = sprintf( '', esc_html__( 'Email', 'generatepress' ), esc_attr( $commenter['comment_author_email'] ), $required ? ' *' : '', $required ? ' required' : '' ); $fields['url'] = sprintf( '', esc_html__( 'Website', 'generatepress' ), esc_attr( $commenter['comment_author_url'] ) ); return $fields; } add_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15 ); /** * Add the comments template to pages and single posts. * * @since 3.0.0 * @param string $template The template we're targeting. */ function generate_do_comments_template( $template ) { if ( 'single' === $template || 'page' === $template ) { // If comments are open or we have at least one comment, load up the comment template. // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Intentionally loose. if ( comments_open() || '0' != get_comments_number() ) : /** * generate_before_comments_container hook. * * @since 2.1 */ do_action( 'generate_before_comments_container' ); ?>