_post_type_meta_capabilities( string[] $capabilities = null )
- Since
- 3.1.0
- Source
wp-includes/post.php:2093
Stores or returns a list of post type meta caps for map_meta_cap().
Parameters
$capabilitiesstring[]optional- Post type meta capabilities.Default:
null
Used by · 1
- get_post_type_capabilities()Builds an object with all post type capabilities out of a post type object
Source
function _post_type_meta_capabilities( $capabilities = null ) { global $post_type_meta_caps; foreach ( $capabilities as $core => $custom ) { if ( in_array( $core, array( 'read_post', 'delete_post', 'edit_post' ), true ) ) { $post_type_meta_caps[ $custom ] = $core; } }}History
Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, from
src/wp-includes/post.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.