Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 130709

Can’t select cpt for custom role and capabilities

$
0
0

Replies: 0

When creating a new post in my custom post type the “Broadcast to” comes up empty if I’m logged in with custom user role, when logged in as admin it comes up and works just fine.

So which capability am I missing that makes this available?

Currently my role is selected on all options under Broadcast > Roles and the following caps is added to my role:

  • edit_operations
  • edit_operation
  • edit_others_operations
  • publish_operations
  • read_operation
  • read_private_operations
  • delete_operation

My custom post type caps is:

'edit_post'             => 'edit_operation',
'read_post'             => 'read_operation',
'delete_post'           => 'delete_operation',
'edit_posts'            => 'edit_operations',
'edit_others_posts'     => 'edit_others_operations',
'publish_posts'         => 'publish_operations',
'read_private_posts'    => 'read_private_operations',

And arguments:

'label'                 => __( 'Driftsmelding', '' ),
'description'           => __( 'Driftsmeldinger', '' ),
'labels'                => $labels,
'supports'              => array( 'title', 'editor', ),
'hierarchical'          => true,
'public'                => true,
'show_ui'               => true,
'show_in_menu'          => true,
'menu_position'         => 5,
'menu_icon'             => 'dashicons-format-status',
'show_in_admin_bar'     => true,
'show_in_nav_menus'     => true,
'can_export'            => true,
'has_archive'           => true,
'exclude_from_search'   => false,
'publicly_queryable'    => true,
'rewrite'               => $rewrite,
'capabilities'          => $capabilities,

Viewing all articles
Browse latest Browse all 130709

Trending Articles