' . sprintf( __( 'You must be logged in to post a comment.', 'athenea' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( get_the_ID() ) ) ) ) . '
',
), $defaults );
}
add_filter( 'comment_form_defaults', 'athenea_comment_form_defaults' );
if ( ! function_exists( 'athenea_comment' ) ) :
/**
* Template for comments and pingbacks.
*
* To override this walker in a child theme without modifying the comments template
* simply create your own athenea_comment(), and that function will be used instead.
*
* Used as a callback by wp_list_comments() for displaying the comments.
*
* @author IBERMEGA digital
* @since 1.0.0 - 10.10.2013
*
* @param object $comment Comment data object.
* @param array $args
* @param int $depth Depth of comment in reference to parents.
*
* @return void
*/
function athenea_comment( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
if ( 'pingback' == $comment->comment_type OR 'trackback' == $comment->comment_type ) : ?>
';
}
add_action( 'comment_form_top', 'athenea_comment_form_top' );
/**
* Adds markup to the comment form which is needed to make it work with Bootstrap
* needs
*
* @author IBERMEGA digital
* @since 1.0.0 - 10.10.2013
*
* @param string $html
*
* @return string
*/
function athenea_comment_form() {
echo '
';
}
add_action( 'comment_form', 'athenea_comment_form' );
/**
* Custom author form field for the comments form
*
* @author IBERMEGA digital
* @since 1.0.0 - 10.10.2013
*
* @param string $html
*
* @return string
*/
function athenea_comment_form_field_author( $html ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
return '
' . ( $req ? '
' . __('required', 'athenea') . '
' : '' ) . '
';
}
add_filter( 'comment_form_field_author', 'athenea_comment_form_field_author');
/**
* Custom HTML5 email form field for the comments form
*
* @author IBERMEGA digital
* @since 1.0.0 - 10.10.2013
*
* @param string $html
*
* @return string
*/
function athenea_comment_form_field_email( $html ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
return '