Skip to content

Commit

Permalink
Merge pull request #100 from xaviranik/wp-5.9-compatibility
Browse files Browse the repository at this point in the history
Wp 5.9 compatibility
  • Loading branch information
xaviranik authored Jan 27, 2022
2 parents 530567c + c4165ae commit 7e1bcc0
Show file tree
Hide file tree
Showing 3 changed files with 18,792 additions and 42 deletions.
5 changes: 4 additions & 1 deletion assets/src/utils/Bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ window.wepos.libs['EventBus'] = EventBus;
window.wepos.libs['Modal'] = Modal;
window.wepos.libs['Switches'] = Switches;

window.wepos.hooks = ( wp && wp.hooks ) ? wp.hooks : window.wepos.wpPackages.hooks;
// WordPress Hooks
import { createHooks } from '@wordpress/hooks';

window.wepos.hooks = createHooks();

wepos.addFilter = ( hookName, namespace, component, priority = 10 ) => {
wepos.hooks.addFilter(hookName, namespace, (components) => {
Expand Down
Loading

0 comments on commit 7e1bcc0

Please sign in to comment.