Gravatar 头像Ⅱ

  • 内容
  • 相关

 V3EHQD)K7$R4A{EY0@TQMD8.png

修改自ZSX 的Gravatar插件,修改了链接处理方式为Gravatar官方代码 

1,加入验证是否设置了 Gravatar 头像 而不是 Gravatar 默认的头像 

2,加入随机头像 

3,留两个开发者自定义的函数

4,可以设置头像大小,越大越清晰

5,可以设置其他官方默认头像和限制级别

6,开发者可以直接使用函数

 

更新日志:

20170225 给判断开通G头像后是否是默认头像 加个开关...网络判断毕竟是有点慢的...但是缓存后就没关系了;

 

使用此gravatar插件请停用原gravatar插件,开启这个插件即可,如果你的主题没有判断gravatar的支持那么可以直接使用;

HAJXPURGUZ$1%]Q71DT6M8F.png

验证是否设置了 Gravatar 头像 而不是 Gravatar 默认的头像

ggravatar_check($email);

 

直接获取头像

 $atts=array( 'alt'=>'Gravatar', 'class'=>'ggravatar' ) ;

ggravatar_get( $email, $s = null, $d = null, $r = null,$img = false, $atts = array());

$img为true的时候会利用网络判断头像是否默认为更改;

$atts非空才输出 img标签

atts array有值的时候会在img标签内 输出相关标签比如上面的代码里面的alt 和 class

 再也不用担心留言头像不美观了!

 

管理员设置回复可下载

本文标签:

版权声明:若无特殊注明,本文皆为《吴凯旋》原创,转载请保留文章出处。

本文链接:Gravatar 头像Ⅱ - https://xiaokai521.cn/post-78.html

发表评论

电子邮件地址不会被公开。 必填项已用*标注

评论

3条评论
  1. avatar

    Douglasplult Lv.1 Chrome 58.0.3029.81 Chrome 58.0.3029.81 Windows 8.1 x64 Edition Windows 8.1 x64 Edition 回复

    Trying To Find The Best Diet Pill?

    Trying to find the best diet pill may seem like an impossible task, especially with the multitude of diet pills available for purchase. Many people purchase a diet pill only to find out that the pill makes them feel jittery, nervous, or often has no effect at all.

    Diet pills frequently contain the same or similar combination of ingredients and rarely contain anything new, innovative, or undiscovered to the supplement / weight loss industry. So, how can you find the best diet pill when most diet pills are made with similar ingredients?

    One of the most common problems associated with taking diet pills is that the person taking the diet pill is uneducated about the dosage, effects, and promises offered as they relate to each diet pill. The research at website finds that there are three factors that should be taken into consideration when deciding to take a diet pill.

    Dosage:
    It is important to take the pill exactly as recommended on the product label. Some people choose to increase the dosage thinking that the product will work faster or better. This is not the case, and many people become sick in response to the large dose. Reviewers at website often suggest that the recommended dosage be cut in half to give the body time to adjust to the stimulant in the diet pill. After the body has adjusted, it is fine to begin taking the regular dosage as recommended on the product label.

    Effects:
    The effects listed on the product label are there because these are the effects that the product has had on 'some' of the test group. Some of the diet pill testers may be fine taking the product, while others may have adverse effects. The diet pill companies print this information to educate the buyer as well as to protect themselves from lawsuits. The consumer needs to read the label and educate themselves before taking the product. Many people who are sensitive to caffeine are surprised when the diet pill makes them feel nervous or nauseous, but this information is likely printed on the product, so with a little research these affects can be avoided.

    Promises:
    If you read the fine print on product claims for diet pills and other weight loss supplements, you will see 'results not typical' printed very small somewhere where you are not expected to look. The diet pills advertised on television are responsible for some of the most outlandish claims. The results claimed in these advertisements are often unattainable within the given amount of time outlined in the ad. Don't expect to see results in two weeks like a lot of ads claim.

    Wouldn't it be great if you could read reviews for diet pills from actual users of each diet pill? Diet Pill Reviews website has taken the trouble out of searching for the best diet pill. You can read reviews of over 150 of the most popular diet pills available.

    Copyright 2006, Diet Pill Reviews  [url=https://www.viagrapascherfr.com/]viagra pas cher[/url]

    俄罗斯

    1. avatar

      冷知识 Lv.1 Firefox 54.0 Firefox 54.0 Windows 7 x64 Edition Windows 7 x64 Edition 回复

      我用163的邮箱就没有申请成功过Gravatar头像

      北京市 联通

      1. 吴凯旋 Sogou Explorer Sogou Explorer Windows 8.1 x64 Edition Windows 8.1 x64 Edition 回复

        回复了冷知识:表情 好吧

        河北省保定市 电信

    00:00 / 00:00
    顺序播放