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

You appear to be a bot. Output may be restricted

Description

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

Usage

_post_type_meta_capabilities( $capabilities );

Parameters

$capabilities
( string[] ) optional – Post type meta capabilities.

Returns

void

Source

File name: wordpress/wp-includes/post.php
Lines:

1 to 9 of 9
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;
    }
  }
}
 

 View on GitHub View on Trac