I have several classes extending WP_Model and in nearly every one of them I have a couple of getters or finders where I explicitly need 1 entity from a resulting query. Usually because I'm fetching by a meta value that is unique. It would be nice if there were a built-in utility for that.
It's a minor improvement, but saves a few dozen character every class :)
I have several classes extending WP_Model and in nearly every one of them I have a couple of getters or finders where I explicitly need 1 entity from a resulting query. Usually because I'm fetching by a meta value that is unique. It would be nice if there were a built-in utility for that.
It's a minor improvement, but saves a few dozen character every class :)