All Projects → mengkunsoft → mk-letter-avatar

mengkunsoft / mk-letter-avatar

Licence: MIT License
🅰 WordPress 字母头像插件(纯前端实现版) WordPress letter avatar plugin

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to mk-letter-avatar

vue-letter-avatar
A simple and elegant letter avatar component for vue.js
Stars: ✭ 62 (+47.62%)
Mutual labels:  avatar, letter-avatar
Avatar
Plug n play avatar, turn name, email, and any other string into beautiful avatar (or gravatar), effortless.
Stars: ✭ 1,525 (+3530.95%)
Mutual labels:  avatar, gravatar
ng-person
A universal avatar component for Angular 2+ applications that generates truly unique colored letter avatar based on provided name.
Stars: ✭ 19 (-54.76%)
Mutual labels:  avatar, letter-avatar
avatars-io
👤 Wanna get a social media avatar? Avatars-io makes it easy for you. Just give a username then get an avatar!
Stars: ✭ 13 (-69.05%)
Mutual labels:  avatar, gravatar
Gravatar
👤 Gravatar Helper & Generator (Laravel supported)
Stars: ✭ 19 (-54.76%)
Mutual labels:  avatar, gravatar
WooCommerce-Plugin-Extension-Boilerplate
Plugin boilerplate to create extensions of WooCommerce
Stars: ✭ 16 (-61.9%)
Mutual labels:  wordpress-plugin
tainacan
A flexible and powerful repository platform for WordPress
Stars: ✭ 67 (+59.52%)
Mutual labels:  wordpress-plugin
bea-beautiful-flexible
Transform ACF's flexible layouts list into a nice and UX popup.
Stars: ✭ 19 (-54.76%)
Mutual labels:  wordpress-plugin
graphql-gutenblock-example
Example Gutenberg Block using WPGraphQL to populate the data
Stars: ✭ 17 (-59.52%)
Mutual labels:  wordpress-plugin
WP-Performance
Speed optimization plugin for Wordpress
Stars: ✭ 22 (-47.62%)
Mutual labels:  wordpress-plugin
gutenberg-i18n-block
Gutenberg block to demo internationalization functionality.
Stars: ✭ 35 (-16.67%)
Mutual labels:  wordpress-plugin
wordpress-zero-spam
The WordPress Zero Spam plugin makes blocking spam a cinch without all the bloated options. Just install, activate, and say goodbye to spam.
Stars: ✭ 67 (+59.52%)
Mutual labels:  wordpress-plugin
tutty-meta-box
Create custom fields with simple and easy to use WordPress meta box framework.
Stars: ✭ 16 (-61.9%)
Mutual labels:  wordpress-plugin
WPGrabInfo
WP Grab Info v2
Stars: ✭ 43 (+2.38%)
Mutual labels:  wordpress-plugin
civicrm-wp-member-sync
CiviCRM WordPress Member Sync plugin keeps a WordPress user in sync with a CiviCRM membership by granting either a role or capabilities to a WordPress user who has that membership.
Stars: ✭ 13 (-69.05%)
Mutual labels:  wordpress-plugin
jquery-manager
Manage jQuery and jQuery Migrate on a WordPress website, activate a specific jQuery and/or jQuery Migrate version. The ultimate jQuery debugging tool for WordPress
Stars: ✭ 27 (-35.71%)
Mutual labels:  wordpress-plugin
devBanner
Create your own devRant banner
Stars: ✭ 45 (+7.14%)
Mutual labels:  avatar
gravityforms-repeater
A Gravity Forms add-on that allows specified groups of fields to be repeated by the user.
Stars: ✭ 59 (+40.48%)
Mutual labels:  wordpress-plugin
acf-phone-number
A real ACF phone number field powered by libphonenumber and intl-tel-input
Stars: ✭ 68 (+61.9%)
Mutual labels:  wordpress-plugin
Scripts-n-Styles
Allows WordPress admin users the ability to add custom CSS and JavaScript directly to individual Post, Pages or custom post types.
Stars: ✭ 16 (-61.9%)
Mutual labels:  wordpress-plugin

mk-letter-avatar

GitHub stars GitHub forks GitHub issues GitHub license

mk-letter-avatar 是一个简单好用的 WordPress 字母头像插件。

WordPress 默认采用的是 Gravatar 头像,但很多人可能没有设置 Gravatar 头像,因而只能显示出默认的头像。本插件就是将无头像用户的头像显示成动态生成的昵称首字符头像。

说到字母头像,其实之前已有多种方案。本插件与其它同类插件不同的是字母头像的生成完全是在前端实现的,而且支持中文。整个插件大小只有 5kb 左右。插件启用后不会在服务器产生任何缓存文件,纯净好用!

本插件无需任何设置,直接在 WordPress 后台上传并启用即可。

插件的头像生成代码基于 https://github.com/daolavi/LetterAvatarhttps://gist.github.com/leecrossley/6027780

在线演示


参考 孟坤博客 的评论区头像

常见问题


启用插件后不生效

请检查所用的主题是否使用的 WordPress 自带的评论模板或者使用 WordPress 默认函数 get_avatar() 获取头像,如若不是,请改用 get_avatar()

启用插件后控制台多了很多 404 报错

因为插件需要根据 Gravatar 返回的状态来判断是否有头像,所以会产生这样的问题。除此之外,无任何“毒副作用”。如果觉得看着难受,可以在页面加载完成后使用 console.clear(); 清除控制台的错误输出。

相关推荐


使用 LetterAvatar 实现纯前端生成字母头像

mk-sitemap 站点地图插件

mkBlog 简约主题

更新日志


v1.1.0 2020/2/25

  • 优化代码,适配更多主题
  • 支持在后台也显示字母头像

v1.0.4 2019/4/27

  • 修改为仅绘制一个字符作为头像
  • 过滤 emoji

v1.0.3 2019/4/14

  • 修复头像链接被 htmlspecialchars 后无效的 bug(感谢 @sy-records 提交反馈)

v1.0.2 2019/4/5

  • 不限制生成头像的颜色列表元素个数

v1.0.1 2019/3/25

  • 如果没有 alt 信息,直接返回默认头像

v1.0.0 2019/3/24

  • 横空出世!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].