wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



term_description › WordPress Function

Desde2.8.0
Obsoleton/a
term_description ( $term = 0, $deprecated = null )
Parâmetros: (2)
  • (int) $term Optional. Term ID. Defaults to the current term ID.
    Required: No
    Padrão:
  • (null) $deprecated Deprecated. Not used.
    Required: No
    Padrão: null
Retorna:
  • (string) Term description, if available.
Definido em:
Codex:
Log de mudanças:
  • 4.9.2

Retrieves term description.



Fonte

function term_description( $term = 0, $deprecated = null ) {
	if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) {
		$term = get_queried_object();
		if ( $term ) {
			$term = $term->term_id;
		}
	}

	$description = get_term_field( 'description', $term );

	return is_wp_error( $description ) ? '' : $description;
}