Slide 41
Slide 41 text
ACCESS THE DRIVERS
protected function scheduleMeetup( $data ) {
$userId = $this->getDriver()->getUserIdFromLogin("boyan");
$result = $this->createContent([
"post_type" => "phpvarna_event",
"post_title" => $data['name'],
"post_content" => $data['description'],
"post_status" => "publish",
"post_author" => $userId
]);
/** ... */
$this->getDriver()->wpcli('post', 'meta update', [
$result['id'], 'location', $data['location'] ]);
}
25 . 5