Conversation
|
|
||
| if (file_exists($composerAutoload)) { | ||
| require_once $composerAutoload; | ||
| if (!class_exists(\OWC\OpenPub\Base\Foundation\Plugin::class)) { |
There was a problem hiding this comment.
Moet de not operator niet weg hier?
There was a problem hiding this comment.
Nee, als de class al bestaat betekend dit dat de classes in deze plugin al ge-autoloaded zijn. In bedrock gebeurt dit in wp-config.php.
There was a problem hiding this comment.
Ja in de openpub ook: https://bitbucket.org/openwebconcept/gemeente-openpub-whitelabel/src/9b555660d86c1b3a361df2a88c0548c669e3bfd3/htdocs/wp-config.php#lines-6
Maar dan wordt ie dus dubbel ingeladen, good catch zo op de vrijdag ;)
|
|
||
| if (file_exists($composerAutoload)) { | ||
| require_once $composerAutoload; | ||
| if (!class_exists(\OWC\OpenPub\Base\Foundation\Plugin::class)) { |
There was a problem hiding this comment.
Ja in de openpub ook: https://bitbucket.org/openwebconcept/gemeente-openpub-whitelabel/src/9b555660d86c1b3a361df2a88c0548c669e3bfd3/htdocs/wp-config.php#lines-6
Maar dan wordt ie dus dubbel ingeladen, good catch zo op de vrijdag ;)
The custom autoloader is very ineffecient and should not get registered if autoloading is already handled by composer.
If classes inside this plugin are already loaded, nothing needs to be done.