GitXplorerGitXplorer
t

adorable-avatars

public
4 stars
2 forks
1 issues

Commits

List of commits on branch main.
Unverified
e13ec4917a31885f8582edf9f6a286b461298240

CI: Add PHP 7.1, and remove obsolete Xdebug stuff.

ttfrommen committed 8 years ago
Unverified
c11c8075e526a41f460d918dd685c1960a2d7fa9

Update readme and changelog.

ttfrommen committed 8 years ago
Unverified
ff43eee665dd553df47cd062b3b4ad3b64645c45

Build: Update JavaScript dependencies.

ttfrommen committed 8 years ago
Unverified
cf309499a644c547a169488543d70fcdcda92407

Tests: Adapt to new behavior.

ttfrommen committed 8 years ago
Unverified
6e3ae4629ad060e683eead1e2027fe85fcc677b2

Fix and improve avatar handling. #3 #5

ttfrommen committed 8 years ago
Unverified
566e5a2ef1ddf456f4676d25f1e2b47d74f013af

Composer: Bump Mockery version.

ttfrommen committed 8 years ago

README

The README file for this repository.

Adorable Avatars

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.