Hey there! If you're just stopping by, check out my previous WordPress plugin tutorial to see the base of this code that dates back YEARS. It's so simple, but it's a really awesome base that I encourage you to snag, slice, and dice as you see fit!
Live Demo: https://demo.md-wv.com/covid-19-isolation-and-quarantine-calculator/
(Full code available on GitHub at link after article.)
Disclaimer: During the day, I'm a population health planner, health equity hero, and data nerd. I am not a doctor, and this is not medical advice - consult your primary care physician for that. Also, COVID-19 is really taxing our public health folks, so please take a moment to reach out to your local health department with a few words of encouragement. Many of us have been working tirelessly since February/March to protect our communities, and a few kind words goes a long way. 😄
Now, let's get started!
Defining WordPress plugin header fields becomes super easy after two or three plugins. I often re-use my old code, and update it each time I'm deploying a new plugin header.
Creating WordPress plugin options in the WordPress admin dashboard is actually way easier than you'd think - especially with tools like http://wpsettingsapi.jeroensormani.com/ that make it sooo super easy to generate WordPress options using the new-ish API.
Change a few standardized variables, add a dashicon, and toss in a text area (we love the ability to customize plugin output), and you're ready to roll on the admin side.
This is where the 💫 magic happens haha. When I set out to make this project, I really thought it would be much more complex. Instead, I chose to make something simple that could be easily deployed, didn't depend on any external libraries, and worked well on all devices - especially mobile phones. So yes, I chose PHP over js - sorry fanboys. 😉 This choice made it extremely easy to append dates with additional days, and allowed me to process the values using a simple form - totes easy. 🐐
Ok, I am someone who never ceases to be amazed when it comes to shortcodes. I love having TOTAL control over where my plugins deploy and where they can be active. Making the short code is just the icing on the cake. 🎂