У меня есть метод ниже, который я хочу получить некоторые детали из базы данных и вернуть их в моем методе:
Вот get_method
, что у меня есть:
public function get_authors()
{
// @todo: Return an array of profile objects
// @todo: This should turn an array of profiles
$profiles = get_post_meta(get_the_ID(),'author', true);
var_dump($profiles);
return $profiles;
}
Вот что $profiles
var_dump's:
![enter image description here](https://i.stack.imgur.com/irWJc.png)
Это связано в моей базе данных как «автор»:
Внутри моего wp_posts
эти два идентификатора связаны с постами - Как бы я go узнал об извлечении этих постов в моем методе?
![enter image description here](https://i.stack.imgur.com/AwaGa.png)