定制 tfrommen/adorable-avatars 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tfrommen/adorable-avatars

Composer 安装命令:

composer require tfrommen/adorable-avatars

包简介

This plugin integrates the Adorable Avatars avatar placeholder service into WordPress.

README 文档

README

Version Status Build Downloads License

This plugin integrates the Adorable Avatars avatar placeholder service into WordPress.

Installation

  1. Download ZIP.
  2. Upload contents to the /wp-content/plugins directory on your web server.
  3. Activate the plugin through the Plugins menu in WordPress.
  4. Select Adorable Avatars as default avatar setting on the Discussion Settings page in your WordPress back end.

Filters

Need to customize anything? Just use the provided filters.

adorable_avatars.force

In case you want to have Adorable Avatars all over your site (i.e., not only as default when there is no Gravatar), use this filter.

Arguments:

  • bool $force Force Adorable Avatars?
  • mixed $id_or_email User identifier.
  • array $args Avatar args.

Usage Example:

Use Adorable Avatars no matter what:

<?php

add_filter( 'adorable_avatars.force', '__return_true' );

Use Adorable Avatars for anyone but the user with ID 42:

<?php

add_filter( 'adorable_avatars.force', function ( $force, $id_or_email ) {

	if ( is_numeric( $id_or_email ) ) {
		$id_or_email = (int) $id_or_email;
	} elseif ( $id_or_email instanceof WP_Post ) {
		$id_or_email = $id_or_email->ID;
	} elseif ( $id_or_email instanceof WP_Comment ) {
		$id_or_email = $id_or_email->user_id;
	}

	return 42 !== $id_or_email;
}, 10, 2 );

Screenshots

Setting
Default Avatar setting - Here you can select Adorable Avatars as default avatar setting.

Contribution

If you have a feature request, or if you have developed the feature already, please feel free to use the Issues and/or Pull Requests section.

Of course, you can also provide me with translations if you would like to use the plugin in another not yet included language.

License

Copyright (c) 2016 Thorsten Frommen

This code is licensed under the MIT License.

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 6
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固