Created
June 13, 2017 15:59
-
-
Save kylephillips/9c9c17d4c43f8e58dd4b1248a6c5df34 to your computer and use it in GitHub Desktop.
Using the "Updated Single" event in Favorites
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* favorites-updated-single | |
* Fires after a favorite button has been submitted successfully | |
* @param favorites - Array of post objects the user has favorited | |
* @param post_id - The post ID that was updated | |
* @param site_id - The site ID for the post that was updated (for multisite) | |
* @param status - Whether the button was active or inactive | |
*/ | |
$(document).on('favorites-updated-single', function(event, favorites, post_id, site_id, status){ | |
// Do stuff here as needed. | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment