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



post_type_supports › WordPress Function

Seit3.0.0
Veraltetn/v
post_type_supports ( $post_type, $feature )
Parameter: (2)
  • (string) $post_type The post type being checked.
    Erforderlich: Ja
  • (string) $feature The feature being checked.
    Erforderlich: Ja
Gibt zurück:
  • (bool) Whether the post type supports the given feature.
Definiert in:
Codex:

Checks a post type's support for a given feature.



Quellcode

function post_type_supports( $post_type, $feature ) {
	global $_wp_post_type_features;

	return ( isset( $_wp_post_type_features[ $post_type ][ $feature ] ) );
}