Skip to content
Snippets Groups Projects
Verified Commit 83fc4e6d authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

fix: improve compatibility with/without wp-builder


Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent 1e4a3581
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,15 @@ declare(strict_types=1);
namespace WPDesk\Init\Binding;
interface Hookable extends \WPDesk\PluginBuilder\Plugin\Hookable {
public function hooks(): void;
/**
* Operate in mode compatible with wp-builder library, as wp-init roots on it and needs to preserve the easy way to upgrade existing clients.
*/
if ( class_exists( \WPDesk\PluginBuilder\Plugin\Hookable::class ) ) {
interface Hookable extends \WPDesk\PluginBuilder\Plugin\Hookable {
public function hooks(): void;
}
} else {
interface Hookable {
public function hooks(): void;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment