query_posts() 공개 정적인 메소드

public static query_posts ( mixed $query = false, string | array $PostClass = '\Timber\Post' ) : PostCollection | QueryIterator
$query mixed
$PostClass string | array
리턴 PostCollection | QueryIterator | QueryIterator
예제 #1
0
 /**
  * @param mixed   	$query
  * @param string 	$post_class
  */
 public function __construct($query = false, $post_class = '\\Timber\\Post')
 {
     $this->userQuery = $query;
     $this->queryIterator = PostGetter::query_posts($query, $post_class);
     $posts = $this->queryIterator->get_posts();
     parent::__construct($posts, $post_class);
 }
예제 #2
0
 /**
  * Query posts.
  * @api
  * @param mixed   $query
  * @param string  $PostClass
  * @return array|bool|null
  */
 public static function query_posts($query = false, $PostClass = 'Timber\\Post')
 {
     return PostGetter::query_posts($query, $PostClass);
 }