Outil de recherche WordPress pour les développeurs et auteurs de thèmes



post_type_supports ›

Depuis3.0.0
Dépréciéen/a
post_type_supports ( $post_type, $feature )
Paramètres: (2)
  • (string) $post_type The post type being checked.
    Requis: Oui
  • (string) $feature The feature being checked.
    Requis: Oui
Retourne:
  • (bool) Whether the post type supports the given feature.
Défini(e) dans:
Codex:

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



Source

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

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