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使用本地头像提高网页打开速度》的一些看法。更多内容请查看本栏目更多内容!
首先,你要在wp-content/plugins/下建设一个文件夹,文件夹的名字最好只由字母、数字、“-”和下...
update_user_option()函数 update_user_option()函数作用利用全局博客权限更新用户选项。 用户选项相似于用...
header_image() header_image() 函数是 WordPress 自定顶部图像的规范接口函数,该函数能够主动判别后盾设置...
WordPress主题教程之修正wordpress回复评论文字办法,首选需求建设个自定义的评论模板,而后经过调用此...
下文提到的一切代码,都是增加到主题的funshions.php 文件的最初一个 ?> 的后面。 制造一个名为 login_logo...
WordPress显示文章题目的时分,当文章题目过长而且文章的题目又在主页显示时,假如发作换行的景象就显得不美...