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: Featured image ID getter #11

Closed VesterDe closed 5 years ago

VesterDe commented 6 years ago

It would be awesome if models could return their featured image ID, besides their URL. URL is ok, but I often need the ID of the image to work with it further.

juslintek commented 5 years ago

Why not write a method for it in a post model and add that method to fetch featured image ID? This abstract class of WP_Model is just a wrapper around default wordpress functions. Its not like https://github.com/rjjakes/wordpress-orm, that is an alternative to wpdb and WP_Post class at all. I'm against that feature, because its not nescessary. Basically I'm against this WP_Model class, because its a masquerade, not a tuning.

VesterDe commented 5 years ago

Fair point. I suppose not every class even has a featured image id.

I've given up on this repo getting updates anyway.