As much as I firmly believe in making sure that anything we build for WordPress especially as it relates to the dashboard should remain as consistent as possible.
As with anything, there are a few exceptions that I’ve made in the work specifically when it revolves around large select
elements (multiselect or no). That is, I’m a big fan of Select2 – I’ve written about it a couple of times and how I’ve used it in a couple of projects.
Because this is something that I regularly use, and because I know a number of WordPress developers (and general web developers, as well) also use this in their work – both in the dashboard functionality and in the public-facing functionality, as well – I wanted to share one way in which I’ve needed to programmatically set an option.