php - Accessing variables globally -


i have been creating wordpress plugin creates step step tours on how change settings in wordpress. able of other things done, complicated logic how check if tour running , if is, current step , process ..

i have been considering options like:

  • setting global variables
  • using history.pushstate();
  • using wp_options

please give expert opinions on how should done ..

if javascript based tour there's no reason bother retaining state in wordpress. see spooky action @ distance why relying global variable bad idea in general.

your problem can more solved retaining state of tour in cookie using javascript. libs intro.js offer pretty convenient apis managing of in javascript.


Comments