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



_post_format_get_term › WordPress Function

Depuis3.1.0
Dépréciéen/a
_post_format_get_term ( $term )
Accès:
  • private
Paramètres:
  • (object) $term
    Requis: Oui
Retourne:
  • (object)
Défini(e) dans:
Codex:

Remove the post format prefix from the name property of the term object created by get_term().



Source

function _post_format_get_term( $term ) {
	if ( isset( $term->slug ) ) {
		$term->name = get_post_format_string( str_replace( 'post-format-', '', $term->slug ) );
	}
	return $term;
}