Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_post_type_meta_capabilities ›

Seit3.1.0
Veraltetn/v
_post_type_meta_capabilities ( $capabilities = null )
Zugriff:
  • private
Parameter:
  • (array) $capabilities Post type meta capabilities.
    Erforderlich: Nein
    Standard: null
Definiert in:
Codex:

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



Quellcode

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