Hi Handoko,
I didn’t build in a feature like ‘set access defaults for post type’, and I do not plan to do this in the near future.
You might like write a tiny plugin or mu-plugin, where you can set the defaults “by hand”. It could look like this:
function my_insert_post_data( $data , $postarr ) {
extract( $data );
if ( ! isset( $ID ) && $post_status == 'auto-draft' && $post_type == 'post' ) {
// replace these with a wp-rolename, a capability or an access area of your choice
$data['post_view_cap'] = 'my-access-area';
$data['post_edit_cap'] = 'my-other-access-area';
$data['post_comment_cap'] = 'my-third-access-area';
}
return $data;
}
add_filter( 'wp_insert_post_data' , 'my_insert_post_data' , 20 , 2 );
You will need the access-areas corresponding capability.
Just added a column in the Access-Areas table view, where you can copy-paste them.
Thread Starter
Handoko
(@handoko-zhang)
Thank you for your help. But I’m not good in PHP. For now, I will set the new posts private manually. If someday you have time and want to add new feature to the plugin, please consider it. I’m marking this topic as resolved.