A la hora de modificar Author exposed, no puedo lograr que aparezca el avatar que los usuarios suben, si alguien me pueda dar una ayuda con el codigo se los voy a agradecer, a continuación el código de author exposed:
Código PHP:
<?php
/*
Plugin Name: Author Exposed
Plugin URI: http://colorlightstudio.com/2010/06/01/wordpress-plugin-author-exposed-v-1-1/
Description: Simple and elegant way to get more information about author.
Version: 1.1
Author: Igor Penjivrag
Author URI: http://colorlightstudio.com
*/
/* Copyright 2008 Igor Penjivrag (email : [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
function author_exposed() {
global $authordata;
$nick = get_the_author();
// Gravatar Photo
$mail = get_the_author_email();
$gravatar = 'http://www.gravatar.com/avatar.php?gravatar_id=' .md5($mail);
// Get ID for hidden DIV
$div_id = 'a'.get_the_ID();
// Hidden DIV output
$author_posts_link = get_author_posts_url($authordata->ID, $authordata->user_nicename );
$hidden_div = '<span id="'.$div_id.'" class="mydiv" style="display:none;"><img src="'.$gravatar.'" alt="gravatar" /><span class="ae_close"><a href="javascript:;" onmousedown="toggleDiv(\''.$div_id.'\');">cerrar</a></span><span class="ae_top"><b>Autor: '.get_the_author().'</b></span>
<span class="ae_body"><b>Nombre</b>: '.get_the_author_firstname().' '.get_the_author_lastname().'<br /><b>Email:</b> '.get_the_author_email().'<br /><b>Sitio:</b> <a href="'.get_the_author_url().'">'.get_the_author_url().'</a><br /></span><span class="ae_about"><b>Mensaje:</b> '.get_the_author_description().'</span><span class="ae_body"><a href="'.$author_posts_link.'">Mas Juegos de '.get_the_author().'</a> ('.get_the_author_posts().')</span></span>';
// Show it
echo ('<a href="javascript:;" onmousedown="toggleDiv(\''.$div_id.'\');"><b>Autor: </b>'.$nick.'</a>'.$hidden_div);
}
// Hook
add_filter('the_author_posts_link', 'author_exposed');
// Add JavaScript and Styles to header
add_action('wp_head', 'add_head');
function add_head() {
echo '<script type="text/javascript" src="'.get_option(siteurl).'/wp-content/plugins/author-exposed/javascript/skripta.js"></script><link rel="stylesheet" href="'.get_option('siteurl').'/wp-content/plugins/author-exposed/css/ae_style.css" type="text/css" />';
}
?>