wpseek.com
A WordPress-centric search engine for devs and theme authors



_post_type_meta_capabilities › WordPress Function

Since3.1.0
Deprecatedn/a
_post_type_meta_capabilities ( $capabilities = null )
Access:
  • private
Parameters:
  • (string[]) $capabilities Post type meta capabilities.
    Required: No
    Default: null
Defined at:
Codex:

Stores or returns a list of post type meta caps for map_meta_cap().



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;
		}
	}
}