Source file: modules/copy-post.php
View in GitHubParameters
- Post
-
(array) Post types supported by default.
- $post
-
(WP_Post) Post object of current post in listing.
Changelog
Since: Jetpack 7.0.0
Notes
You can add support for the Copy Post feature to your own Custom Post Type like so:
function jetpackcom_add_myposttype_support_copy_post( $post_types ) { $post_types[] = 'myposttype'; return $post_types; } add_filter( 'jetpack_copy_post_post_types', 'jetpackcom_add_myposttype_support_copy_post' );
Hello, can I pass an array of post types?
Instead of passing an array of post types, you would want to add each element of your array (i.e. each new post type slug) to the existing array that’s exposed by the filter. I hope this clarifies things a bit.