WordPress开发者和主题制作者的搜索引擎



_post_type_meta_capabilities ›

Since3.1.0
已弃用n/a
_post_type_meta_capabilities ( $capabilities = null )
访问:
  • private
参数:
  • (array) $capabilities Post type meta capabilities.
    Required: No
    默认: null
定义在:
文档:

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



源码

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' ) ) ) {
			$post_type_meta_caps[ $custom ] = $core;
		}
	}
}