The MultiPostThumbnails::has_post_thumbnail method should return a boolean (similar to has_post_thumbnail). Currently an integer is returned instead of boolean TRUE. Easy fix: just cast the return value to boolean.
The third argument of MultiPostThumbnails::get_post_thumbnail_id requires a post ID. I suggest to make it optional, just as done in the MultiPostThumbnails::has_post_thumbnail method, falling back to get_the_ID().
Hope you appreciate this kind of feedback. 😉
Thanks for the plugin, Chris!
- The topic ‘[Plugin: Multiple Post Thumbnails] A few minor PHP code cleanups’ is closed to new replies.