public function handleDelete($postId) { if (!$this->driverEnabled() || magnify_filter('disable_delete', false, $this->driver, $postId)) { return; } try { $this->driver->delete($blogId = $this->getCurrentBlog(), $postId); magnify_act('deleted_post', $blogId, $postId); } catch (\Exception $e) { $this->logException($e, sprintf('deleting post #%d', $postId)); } }
public static function driverEnabled(Driver $driver) { $e = self::getEnabledDrivers(); return !empty($e[$driver->getIdentifier()]); }
private function keyFor(Driver $driver) { return $driver->getIdentifier(); }