Codex

Function Reference/get post type capabilities

Contents

Description

Returns information about the post type capabilities of an post type object

Usage

<?php get_post_type_capabilities$args ?>

Parameters

$args
(array) (required) An array of key value arguments to match against the post types
Default: None

Accepted keys of the capabilities array in the post type object:

- edit_post - The meta capability that controls editing a particular object of this post type. Defaults to "edit_ . $capability_type" (edit_post).

- edit_posts - The capability that controls editing objects of this post type as a class. Defaults to "edit_ . $capability_type . s" (edit_posts).

- edit_others_posts - The capability that controls editing objects of this post type that are owned by other users. Defaults to "edit_others_ . $capability_type . s" (edit_others_posts).

- publish_posts - The capability that controls publishing objects of this post type. Defaults to "publish_ . $capability_type . s" (publish_posts).

- read_post - The meta capability that controls reading a particular object of this post type. Defaults to "read_ . $capability_type" (read_post).

- read_private_posts - The capability that controls reading private posts. Defaults to "read_private . $capability_type . s" (read_private_posts).

- delete_post - The meta capability that controls deleting a particular object of this post type. Defaults to "delete_ . $capability_type" (delete_post).

Return

(object) 
Object with all capabilities as member variables

Change Log

Source File

get_post_type_capabilities() is located in wp-includes/post.php.

Related

Post Types: register_post_type(), add_post_type_support(), remove_post_type_support(), post_type_supports(), post_type_exists(), set_post_type(), get_post_type(), get_post_types(), get_post_type_object(), get_post_type_capabilities(), get_post_type_labels(), is_post_type_hierarchical(), is_post_type_archive(), post_type_archive_title()

See also index of Function Reference and index of Template Tags.
This page is marked as incomplete. You can help Codex by expanding it.