outlandishideas / oowp

OOWP is a tool for WordPress theme developers that makes templating in WordPress more sensible.
GNU General Public License v3.0
42 stars 2 forks source link

Return a single post type, not an array #26

Closed koyan closed 2 years ago

koyan commented 2 years ago

Fixes error happening on prospect when trying to render menu item. The current code returns a whole array, while it should be returning a string. It was introduced at https://github.com/outlandishideas/oowp/pull/20 Before it was returning the word 'any'

rasmuswinter commented 2 years ago

this change doesn't solve the problem, as now it will arbitrarily choose the first valid post type. instead, it should exclude 'menu_item' (or whatever post type you're getting) as well as 'attachment'

koyan commented 2 years ago

Fixed