public function flip($horz, $vert) { try { if ($horz) { $this->image->flipImage(); } if ($vert) { $this->image->flopImage(); } } catch (Exception $e) { return new WP_Error('image_flip_error', $e->getMessage()); } return true; }