VersionPress\Tests\Automation\WpAutomation::createPost PHP Метод

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

Creates new post using WP-CLI. Returns ID of created post.
См. также: wp_insert_post()
public createPost ( array $post ) : integer
$post array (as wp_insert_post)
Результат integer
    public function createPost(array $post)
    {
        $post["porcelain"] = null;
        // wp-Cli returns only id
        return intval($this->runWpCliCommand('post', 'create', $post));
    }