wp-papi/papi

Make use of page templates dropdown

frozzare opened this issue · 0 comments

Right now we remove Page Templates dropdown since we don't use it. But after some thinking we should be able to use it since we introduce new template arrays with label and template for module property in #254 (example)

So we have label and value for the page templates dropdown and we know which post type it is and according to the WordPress documentation we should be able to use hooks here to inject our custom templates. Looks like a key value array that are return by get_page_templates function on WP_Theme class.

And when more than one template is used we should show page templates dropdown by default instead of removing it as we do now.