• ashleyyoung

    (@ashleyyoung)


    Hello

    Is there a function/action that fires when a user likes a post? I need to hook into it in order to create a notification for the post author.

    Also, how do I get the number of likes for a post?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Alimir

    (@alimir)

    1- Yes, you can use following hook:

    function wp_ulike_sample_proccess( $id , $key, $user_id, $status  ){
    
    }
    add_action( 'wp_ulike_after_process', 'wp_ulike_sample_proccess', 10, 2 );

    2- using following method:
    wp_ulike_get_post_likes( $post_ID, $status = ‘like’ )

    Thread Starter ashleyyoung

    (@ashleyyoung)

    Thank you!

    One last question, is there a way to get a users total number of likes made and received?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Functions and Actions’ is closed to new replies.