Defaults To Post post_type
-
On line 94 of post-type-switcher.php the select is generated in the meta box without a blank option.
While this works great in many cases, we are finding that if we use the filter ‘pts_post_type_filter’ to remove a few post types, this select just defaults to the first post type and switch the post to that on every save.
For instance is we remove the post_type called ‘events’ from the available to switch to post_types then add a new event, when we save the event it is automatically converted to a post due to post being the first available option in the select.
I was able to fix it by adding an empty valued option which does not convert the post type unless one is selected, or automatically adding an option for the current post type if not in the $post_types variable.
- The topic ‘Defaults To Post post_type’ is closed to new replies.