lesterchan / wp-polls

Adds an AJAX poll system to your WordPress blog. You can also easily add a poll into your WordPress's blog post/page.
https://wordpress.org/plugins/wp-polls/
91 stars 78 forks source link

Use parameters and closures instead of globals #128

Closed LockeExile closed 5 years ago

LockeExile commented 5 years ago

This fixes issues that arise from a combination of the use of global variables, having multiple polls on a page, wp-fastest-cache attempting to update all the polls in 1000ms intervals, and those updates taking longer than 1000ms. The "current" poll/vote id is now passed through parameters and closures everywhere so no global variable is needed and all actions can safely be done in parallel.

lesterchan commented 5 years ago

Wow thanks for this!