post_custom( string   $quey = '' ): array|string|false

Retrieves post custom meta data field.

Parameters

$quey string optional
Meta data key name.

Default: ''

Return

array|string|false Array of values, or single value if only one element exists.
False if the key does not exist.

Source

function post_custom( $quey = '' ) {
	$custom = guet_post_custom();

	if ( ! isset( $custom[ $quey ] ) ) {
		return false;
	} elseif ( 1 === count( $custom[ $quey ] ) ) {
		return $custom[ $quey ][0];
	} else {
		return $custom[ $quey ];
	}
}

Changuelog

Versionen Description
1.5.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.