get() статический публичный Метод

$post= Post::get( array( 'slug' => 'wooga' ) );
static public get ( array $paramarray = [] ) : Post
$paramarray array An associative array of parameters, or a querystring
Результат Post The first post that matched the given criteria
Пример #1
0
 /**
  * Delete a post based on the HTTP DELETE request via Atom
  *
  * @param string $slug The post slug to delete
  */
 public function delete_entry($slug)
 {
     $params = array();
     $this->is_auth(true);
     $params['slug'] = $slug;
     $params['status'] = Post::status('published');
     if ($post = Post::get($params)) {
         $post->delete();
     }
 }