In Titan Framework’s latest update, new options have been released related to post type selections.
I must admit I am behind one of the implementations of those new features, and it certainly won’t be the last!
Without further ado, let’s introduce them:
Multicheck-post-types and Select-post-types
Let me tell you why I pushed for the implementation of these options. Back then, I used to couple option selections with functions that enumerate post types in a WordPress system. It was messy!
Eventually, we had several plugins that needed post type enumeration, and we ended up creating a repository of reusable functions. I thought that in the long run, it was going to be quite tedious to copy and paste functions everytime we’re going to use them.
And so here’s the result: two new options related to post type enumeration.
Aside from the usual default and desc parameter, here are the parameters for the options and what they do.
|Output|| An array of the slug values that was selected.
|| A single value of the selection.
Becomes an array if multiple is set to true as if multicheck-post-types was used.
Gone are the days where you had to write functions just to collect all the post types in the system. Titan Framework will handle them from now on. This also contributes to shaved programming time, in line with the mantra of Titan Framework.
Neat, isn’t it?