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



get_post_custom ›

Desde1.2.0
Obsoleton/a
get_post_custom ( $post_id = 0 )
Parâmetros:
  • (int) $post_id Optional. Post ID. Default is ID of the global $post.
    Required: No
    Padrão:
Retorna:
  • (array) Post meta for the given post.
Definido em:
Codex:

Retrieve post meta fields, based on post ID.

The post meta fields are retrieved from the cache where possible, so the function is optimized to be called more than once.



Fonte

function get_post_custom( $post_id = 0 ) {
	$post_id = absint( $post_id );
	if ( ! $post_id ) {
		$post_id = get_the_ID();
	}

	return get_post_meta( $post_id );
}