if ( !function_exists( 'get_avatar' ) ) :
/**
* Retrieve the avatar for a user who provided a user ID or email address.
*
* @since 2.5
* @param int|string|object $id_or_email A user ID, email address, or comment object
* @param int $size Size of the avatar image
* @param string $default URL to a default image to use if no avatar is available
* @param string $alt Alternate text to use in image tag. Defaults to blank
* @return string tag for the user's avatar
*/
function get_avatar( $id_or_email, $size = '96', $default = '', $alt = false ) {
if ( ! get_option('show_avatars') )
return false;
if ( false === $alt)
$safe_alt = '';
else
$safe_alt = esc_attr( $alt );
if ( !is_numeric($size) )
$size = '96';
$default = includes_url('images/blank.gif');
$avatar = "";
return apply_filters('get_avatar', $avatar, $id_or_email, $size, $default, $alt);
}
endif;
以上就是安达网络工作室关于《禁用wordpress gravatar使用本地头像提高网页打开速度》的一些看法。更多内容请查看本栏目更多内容!
1、要有一个确定图片地址的办法:文章中的第一张图片,或许应用自定义栏目添加一个自定义值。2、在前台调用...
获取特定分类文章数 有时分咱们想获取某个分类(category)下的文章数目,以便在博客的某个中央显示进去。上面...
尚未装置WordPress 在初始配置WordPress之前,将wp-config.php中的$table_prefix值(默许为wp_)修正为所需求...
此时假如上传一个不在预约义的平安扩大名列表,如.lrc,会报错: File type does not meet security guidel...
装置SAE上的wordpress,创立使用抉择wordpress模板,装置后是3.4版本 新建一个版本2,下载最新wordpress装置...
1. 代码形式第一步,关上wp-config.php,增加复制代码代码如下:define('SAVEQUERIES', true);开启SAVEQUERI...