Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'register_post_type_args', function( $args, $post_type ) {
- if ( 'gblocks_templates' === $post_type ) {
- $args['capability_type'] = 'post';
- $args['show_in_menu'] = true;
- $args['capabilities'] = array(
- 'publish_posts' => 'edit_posts',
- 'edit_posts' => 'edit_posts',
- 'edit_others_posts' => 'edit_posts',
- 'delete_posts' => 'edit_posts',
- 'delete_others_posts' => 'edit_posts',
- 'read_private_posts' => 'edit_posts',
- 'edit_post' => 'edit_posts',
- 'delete_post' => 'edit_posts',
- 'read_post' => 'edit_posts',
- );
- }
- return $args;
- }, 10, 2 );
Advertisement
Add Comment
Please, Sign In to add comment