LLMS_Post_Types::get_post_type_caps( [type] $post_type )
Get an array of capabilities for a custom post type
Description Description
Parameters Parameters
- $post_type
-
([type]) (Required) [description]
Return Return
([type]) [description]
Source Source
File: includes/class.llms.post-types.php
public static function get_post_type_caps( $post_type ) { if ( ! is_array( $post_type ) ) { $singular = $post_type; $plural = $post_type . 's'; } else { $singular = $post_type[0]; $plural = $post_type[1]; } return apply_filters( 'llms_get_' . $singular . '_post_type_caps', array( 'read_post' => sprintf( 'read_%s', $singular ), 'read_private_posts' => sprintf( 'read_private_%s', $plural ), 'edit_post' => sprintf( 'edit_%s', $singular ), 'edit_posts' => sprintf( 'edit_%s', $plural ), 'edit_others_posts' => sprintf( 'edit_others_%s', $plural ), 'edit_private_posts' => sprintf( 'edit_private_%s', $plural ), 'edit_published_posts' => sprintf( 'edit_published_%s', $plural ), 'publish_posts' => sprintf( 'publish_%s', $plural ), 'delete_post' => sprintf( 'delete_%s', $singular ), 'delete_posts' => sprintf( 'delete_%s', $plural ), // this is the core bug issue here 'delete_private_posts' => sprintf( 'delete_private_%s', $plural ), 'delete_published_posts' => sprintf( 'delete_published_%s', $plural ), 'delete_others_posts' => sprintf( 'delete_others_%s', $plural ), 'create_posts' => sprintf( 'create_%s', $plural ), ) ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.13.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: