_post_type_meta_capabilities

Store or return a list of post type meta caps for map_meta_cap().

Description

_post_type_meta_capabilities( (null) $capabilities = null ); 

Parameters (1)

0. $capabilities — Optional. (null) => null
Post type meta capabilities.

Usage

  1. if ( !function_exists( '_post_type_meta_capabilities' ) ) { 
  2. require_once ABSPATH . WPINC . '/post.php'; 
  3.  
  4. // Post type meta capabilities. 
  5. $capabilities = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = _post_type_meta_capabilities($capabilities); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/post.php  
  1. function _post_type_meta_capabilities( $capabilities = null ) { 
  2. global $post_type_meta_caps; 
  3.  
  4. foreach ( $capabilities as $core => $custom ) { 
  5. if ( in_array( $core, array( 'read_post', 'delete_post', 'edit_post' ) ) ) { 
  6. $post_type_meta_caps[ $custom ] = $core;