Skip to content

dol-lab/emoji-reaction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emoji Reaction

A Wordpress plugin which allows emoji reactions on posts and comments by logged in users.

Important: This is work in progress. Check issues for todos.


Display emoji buttons in your theme with the function emoji_reaction_display_buttons(array $args) or the action do_action('emoji_reaction_display_buttons', array $args). If you don't want to echo the result use the function emoji_reaction_get_buttons(array $args).

$args (array) (Required) An array of settings.

  • 'ID' (int) The post or comment ID. Default is the value of 'get_the_ID' function.
  • 'type' (string) The type of object. Accepts 'post' or 'comment'. Default 'post'.
  • 'align' (string) Alignment of emoji buttons. Accepts 'left' or 'right'. Default 'left'.
  • 'usernames' (int) Max number of usernames shown in tooltip. Default 10.

To change the default set of emojis (👍, ❤️, 🙏) add the filter emoji_reaction_emojis.

Example:

function my_emojis() {
	return array(
		array( '👍', 'thumbs up' ),
		array( '❤️', 'heart' ),
		array( '🔥', 'fire' ),
	);
}
add_filter('emoji_reaction_emojis', 'my_emojis');

Be aware: if you remove an emoji, the saved likes according to this emoji will remain in the database.

About

Emoji reactions for post(s/ types) & comments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published