Hi @ned–quick question about the custom post types filter added to 4.0. If I wanted to add a custom post type to the array, what is is that I need to do now. I was planning to create a functionality plugin that looks like this:
function add_post_types ( $existing_post_types = array()) {
$add_custom_types = array (
‘glossary’ // or other post types we want to add to the permitted list
);
return array_merge( $add_custom_types, $existing_post_types );
}
My only suggestion would be to namespace your function as add_post_types() is pretty generic and could conflict with another plugin. Also you can make it a little more concise, like so:
Thanks Ned–I’ll rename the function. I built the array because we were planning to add more than one custom post type to our actual plugin and I don’t think array_merge can take more than two arguments, but the concision is appreciated.