Support » Plugin: Members » Integration with plugin that has custom post type

  • Resolved Guido

    (@guido07111975)


    Hi,

    I have my own events plugin and want to support the Members plugin.

    I register my post type like this, in order to support capabilities:

    
    if ( function_exists( 'members_get_capabilities' ) ) {
    	$prefix_capabilities = array(
    		'edit_post'          => 'prefix_edit_event',
    		'delete_post'        => 'prefix_delete_event'
    	);
    	$prefix_capabilitytype = 'event';
    } else {
    	$prefix_capabilities = array(
    		'edit_post'          => 'edit_post',
    		'delete_post'        => 'delete_post'
    	);
    	$prefix_capabilitytype = 'post';
    		
    }
    $prefix_args = array(
    	'capability_type'     => $prefix_capabilitytype,
    	'capabilities'        => $prefix_capabilities
    );
    register_post_type( 'event', $prefix_args );
    

    When I visit the new Events capabilities page of the Members plugin there’s a list of capabilities I can Grant or Deny (in this example 2):

    • prefix_edit_event
    • prefix_delete_event

    My question: is there a way to display more user friendly labels? Such as:

    • Edit event
    • Delete event

    Guido

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Integration with plugin that has custom post type’ is closed to new replies.