has_meta()

最后更新于:2021-11-27 05:02:27

has_meta( int$postid)

Get meta data for the given post ID.

参数

$postid

(int) (Required)

响应

(mixed)

源文件

文件: gc-admin/includes/post.php

function has_meta( $postid ) {
	global $gcdb;

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