Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

How to allow do_scripts on custom hooks? #17

Open
bfiessinger opened this issue Jul 16, 2020 · 0 comments
Open

How to allow do_scripts on custom hooks? #17

bfiessinger opened this issue Jul 16, 2020 · 0 comments

Comments

@bfiessinger
Copy link

I was a little bit confused when I saw none of the styles where enqueued on my custom options page.
After browsing the code I saw all scripts and styles are conditionally loaded on predefined hooks.

Now I made a little hacky solution with adding two more lines to CMB_Extension_Hookup.php:

if ( defined('CMB_EXTENSIONS_ASSETS_ADDITIONAL_HOOKS') && is_array(CMB_EXTENSIONS_ASSETS_ADDITIONAL_HOOKS) )
  $hooks = array_merge( $hooks, CMB_EXTENSIONS_ASSETS_ADDITIONAL_HOOKS );

Then theres a comment below the allowed hooks which says:
// show_form_for_type will have us covered if we miss something here.

Sadly I did not find any reference to show_form_for_type.
Is there any?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant