Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wp-init
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wpdesk
wp-init
Commits
83fc4e6d
Verified
Commit
83fc4e6d
authored
10 months ago
by
Bartek Jaskulski
Browse files
Options
Downloads
Patches
Plain Diff
fix: improve compatibility with/without wp-builder
Signed-off-by:
Bart Jaskulski
<
bjaskulski@protonmail.com
>
parent
1e4a3581
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Binding/Hookable.php
+11
-3
11 additions, 3 deletions
src/Binding/Hookable.php
with
11 additions
and
3 deletions
src/Binding/Hookable.php
+
11
−
3
View file @
83fc4e6d
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment