Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a requested function to check if user has liked a post #51

Merged
merged 2 commits into from
Jul 2, 2019
Merged

Added a requested function to check if user has liked a post #51

merged 2 commits into from
Jul 2, 2019

Conversation

hozerapha
Copy link
Contributor

Referencing issue #42, a function has been added, wp_ulike_user_liked_post, to check if an user has liked a post.

It can be used inside the loop with wp_ulike_user_liked_post(get_current_user_id(), get_the_ID())

Returns boolean true if the user liked the post, false if the user hasn't liked the post or if there's not a logged user.

Added 'wp_ulike_user_liked_post' function to determine if the currently logged in user has liked the post or not. Can be used inside the loop sending the user ID and post ID loop functions as parameters.
Fixed version number
@Alimir Alimir changed the base branch from master to develop July 2, 2019 10:24
@Alimir Alimir merged commit 9b6bc58 into Alimir:develop Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants