anthonybudd / WP_Model

A simple drop-in abstract class for creating active record style eloquent-esque models of WordPress Posts
MIT License
100 stars 20 forks source link

Feature request: Fetch single #12

Open VesterDe opened 6 years ago

VesterDe commented 6 years ago

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 :)