fix(forum): drop legacy draft service require_once
PSR-4 already loads DraftService; require class-aksrt-forum-draft-service.php fatals on compose.
This commit is contained in:
@@ -88,10 +88,6 @@ class Forum {
|
|||||||
|
|
||||||
private function draft_service(): DraftService {
|
private function draft_service(): DraftService {
|
||||||
if (!$this->draft_svc) {
|
if (!$this->draft_svc) {
|
||||||
// Draft service is loaded by bootstrap before this class.
|
|
||||||
if (!class_exists('AKSRT\\Forum\\DraftService', false)) {
|
|
||||||
require_once __DIR__ . '/class-aksrt-forum-draft-service.php';
|
|
||||||
}
|
|
||||||
$this->draft_svc = new DraftService($this);
|
$this->draft_svc = new DraftService($this);
|
||||||
}
|
}
|
||||||
return $this->draft_svc;
|
return $this->draft_svc;
|
||||||
|
|||||||
Reference in New Issue
Block a user