Abilitare i Gravatar nei commenti



gravatar

Automattic ha acquisito Gravatar.

Esistono già dei plugin che vi permettono di mostrare i gravatar nei commenti.

Ecco come farlo senza utilizzare plugin inserendo solo alcune righe di codice nel file comments.php.

<?php
if ( !empty( $comment->comment_author_email ) ) {
$md5 = md5( $comment->comment_author_email );
$default = urlencode( ‘http://use.perl.org/images/pix.gif’ );
echo “<img style=’float: right; margin-left: 10px;’ src=’http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=60&default=$default’ alt=” />”;

}
?>


Fonte : wordpress-it

Bookmark and Share



AddThis Social Bookmark Button

Commenti : NO COMMENT
Categorie : Senza categoria
Tags : , , , , , , , , , , , , ,

Post simili



Fatal error: Call to undefined function wikiovote() in /home/blogmast/public_html/wp-content/themes/mio/comments.php on line 1