wp-papi/papi

Auto detect "only page type" when only one page type exists for a post type

frozzare opened this issue · 0 comments

Today the Add New menu item can detect this, only_page_type filter should be also be able to this so developers don't have to use the filter when only one page type exists for a post type and standard page isn't used. The filter should still work but shouldn't be required anymore.

add_filter( 'papi/settings/only_page_type_post', function () {
  return 'post-page-type';
} );

This should also be done for taxonomies.