Timber\Integrations\CoAuthorsPlus::authors PHP Метод

authors() публичный Метод

Filters {{ post.authors }} to return authors stored from Co-Authors Plus
С версии: 1.1.4
public authors ( array $author, Post $post ) : array
$author array
$post Post
Результат array of User objects
    public function authors($author, $post)
    {
        $authors = array();
        $cauthors = get_coauthors($post->ID);
        foreach ($cauthors as $author) {
            $uid = $this->get_user_uid($author);
            if ($uid) {
                $authors[] = new \Timber\User($uid);
            } else {
                $authors[] = new CoAuthorsPlusUser($author);
            }
        }
        return $authors;
    }