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



get_the_tags › WordPress Function

Desde2.3.0
Obsoleton/a
get_the_tags ( $post = 0 )
Parâmetros:
  • (int|WP_Post) $post Post ID or object.
    Required: No
    Padrão:
Retorna:
  • (WP_Term[]|false|WP_Error) Array of WP_Term objects on success, false if there are no terms or the post does not exist, WP_Error on failure.
Definido em:
Codex:

Retrieves the tags for a post.



Fonte

function get_the_tags( $post = 0 ) {
	$terms = get_the_terms( $post, 'post_tag' );

	/**
	 * Filters the array of tags for the given post.
	 *
	 * @since 2.3.0
	 *
	 * @see get_the_terms()
	 *
	 * @param WP_Term[]|false|WP_Error $terms Array of WP_Term objects on success, false if there are no terms
	 *                                        or the post does not exist, WP_Error on failure.
	 */
	return apply_filters( 'get_the_tags', $terms );
}