Created
June 28, 2017 13:10
-
-
Save kylephillips/56cd667e21ed7fef1843ca007594a8e9 to your computer and use it in GitHub Desktop.
Open a new window after a user has favorited an item (Favorites for WordPress)
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
$(document).on('favorites-updated-single', function(event, favorites, post_id, site_id, status){ | |
if ( status === 'inactive' ) return; | |
window.open("http://yourfavoriteurl.com", '_blank'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment