Made a bit of progress this afternoon and now we have proper methods for registering and presenting ad codes. On the registration side, we need to validate our inputs and then have a method that loads on every page load to register the ad codes stored in our CPTs. On the presentation site, I didn’t implement a priority ranking system and am not sure of the best way to do so.

In looking through the code, I’ve identified a few things:

  • All AJAX actions should use admin AJAX actions and need to be properly nonced/sanitized
  • Related to above, we need to decouple AJAX actions for creating, editing, deleting, etc. and instead have an AJAX action that accesses a clean method. I’ll try to draft a Lobby doc for this tomorrow.
  • Possible conditionals to show up should be based on $this->whitelisted_conditionals
  • We should abstract the data schema a bit more so we don’t necessarily restrict ourselves to DFP (e.g. table columns should be a filterable class var)

I’ll be online around 9 am PT or so and can help with this throughout the day.