Skip to content

Instantly share code, notes, and snippets.

@danieliser
Created November 13, 2019 08:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danieliser/cf2a57c45e57b7574e81a4303191d09e to your computer and use it in GitHub Desktop.
Save danieliser/cf2a57c45e57b7574e81a4303191d09e to your computer and use it in GitHub Desktop.
Get Popup ID from slug
function getPopupIDFromSlug(slug) {
var popups = Object.values(pum_vars.popups);
for(var i = 0; i < popups.length; i++) {
if (popups[i].slug === slug) {
return popups[i].id;
}
}
return null;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment