WordPress at a glance
function is not described

has_meta() WP 1.2.0

Get meta data for the given post ID.

  • Global. wpdb. $wpdb WordPress database abstraction object.

No Hooks.

Return

Mixed.

Usage

has_meta( $postid );
$postid(int) (required)

Code of has meta: wp-admin/includes/post.php WP 5.2.2

<?php
function has_meta( $postid ) {
	global $wpdb;

	return $wpdb->get_results(
		$wpdb->prepare(
			"SELECT meta_key, meta_value, meta_id, post_id
			FROM $wpdb->postmeta WHERE post_id = %d
			ORDER BY meta_key,meta_id",
			$postid
		),
		ARRAY_A
	);
}