1 comment', '% comments', 'commentslink', 'comments closed' ); return '' . ob_get_clean() . ''; } endif; /** * evolve_comment_name() - short description * * @since 0.3 */ if ( ! function_exists( 'evolve_comment_name' ) ): function evolve_comment_name() { $commenter = get_comment_author_link(); // Get comentor's details return "{$commenter}"; // Commentor vcard } endif; /** * evolve_comment_avatar() - short description * * @since 0.3 */ if ( ! function_exists( 'evolve_comment_avatar' ) ): function evolve_comment_avatar( $avatar = true, $gravatar_size = 60 ) { $author = get_comment_author(); if ( $avatar ) { // Get author's gavatar $gravatar_email = get_comment_author_email(); $gravatar_size = apply_filters( 'evolve_gravatar_size', (int) $gravatar_size ); // Available filter: evolve_gravatar_size $gravatar = get_avatar( $gravatar_email, $gravatar_size ); // get the $src data from $gavatar if ( preg_match( '/src=\'(.*?)\'/i', $gravatar, $matches ) ) $src = $matches[1]; // Rebuild Gravatar link because get_avatar() produces invalid code :/ (P.S. adds "gravatar" class) $output = "\"{$author}'s"; if (get_option('show_avatars')){ // Avatars enabled? return apply_filters( 'evolve_comment_avatar', (string) $output ); // Available filter: evolve_comment_avatar } } } endif; /** * evolve_entry_time() - Displays the current post time * * @since 0.3 */ if ( ! function_exists( 'evolve_entry_time' ) ): function evolve_entry_time() { return '' . get_the_time( get_option('time_format') ) . ''; } endif; /** * evolve_comment_date() - short description * * @since 0.3.1 */ if ( ! function_exists( 'evolve_comment_date' ) ): function evolve_comment_date() { $date = ''; $date .= get_comment_date(); $date .= '' . "\n"; return apply_filters( 'evolve_comment_date', (string) $date ); // Available filter: evolve_comment_date } endif; /** * evolve_comment_time() - short description * * @since 0.3.1 */ if ( ! function_exists( 'evolve_comment_time' ) ): function evolve_comment_time() { $time = ''; $time .= get_comment_time(); $time .= '' . "\n"; return apply_filters( 'evolve_comment_time', (string) $time ); // Available filter: evolve_comment_time } endif; /** * evolve_comment_link() - short description * * @since 0.3.1 */ if ( ! function_exists( 'evolve_comment_link' ) ): function evolve_comment_link() { $link = ''; $link .= ''; $link .= apply_filters( 'evolve_comment_link_text', (string) 'Permalink' ); $link .= '' . "\n"; return apply_filters( 'evolve_comment_link', (string) $link ); // Available filter: evolve_comment_link } endif; /** * evolve_comment_edit() - short description * * @since 0.3.1 */ if ( ! function_exists( 'evolve_comment_edit' ) ): function evolve_comment_edit() { ob_start(); edit_comment_link( 'EDIT', '', '' ); return ob_get_clean(); } endif; /** * evolve_comment_reply() - short description * * @since - 0.3.1 */ if ( ! function_exists( 'evolve_comment_reply' ) ): function evolve_comment_reply( $return = false ) { global $comment_depth; $max_depth = get_option( 'thread_comments_depth' ); $reply_text = apply_filters( 'evolve_reply_text', (string) 'Reply' ); // Available filter: evolve_reply_text $login_text = apply_filters( 'evolve_login_text', (string) 'Log in to reply.' ); // Available filter: evolve_login_text if ( ( get_option( 'thread_comments' ) ) && get_comment_type() == 'comment' ) { if ( $return ) { return get_comment_reply_link( array( 'reply_text' => $reply_text, 'login_text' => $login_text, 'depth' => $comment_depth, 'max_depth' => $max_depth, 'before' => '', 'after' => '' )); } else { comment_reply_link( array( 'reply_text' => $reply_text, 'login_text' => $login_text, 'depth' => $comment_depth, 'max_depth' => $max_depth, 'before' => '
', 'after' => '
' )); } } } endif; add_filter( 'wp_get_attachment_link' , 'add_lighbox_rel' ); function add_lighbox_rel( $attachment_link ) { if( strpos( $attachment_link , 'a href') != false && strpos( $attachment_link , 'img src') != false ) $attachment_link = str_replace( 'a href' , 'a rel="gallery" href' , $attachment_link ); return $attachment_link; } ?>