Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

se wp_enqueue commands #21

Closed
digitallysavvy opened this issue Nov 18, 2019 · 0 comments
Closed

se wp_enqueue commands #21

digitallysavvy opened this issue Nov 18, 2019 · 0 comments
Labels
bug Something isn't working
Projects

Comments

@digitallysavvy
Copy link
Contributor

digitallysavvy commented Nov 18, 2019

Please use wp_enqueue commands

Your plugin is not correctly including JS and/or CSS. You should be using the built in functions for this:

https://developer.wordpress.org/reference/functions/wp_enqueue_script/
https://developer.wordpress.org/reference/functions/wp_enqueue_style/

And remember you can use this function to add inline javascript:

https://developer.wordpress.org/reference/functions/wp_add_inline_script/

If you're trying to enqueue on the admin pages you'll want to use the admin enqueues

https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/
https://developer.wordpress.org/reference/hooks/admin_print_scripts/
https://developer.wordpress.org/reference/hooks/admin_print_styles/

Example(s) from your plugin:

Agora-Word-Press/public/views/agora-fullscreen-template.php:113: <script src="/js/agora-communication-client.js"></script>
Agora-Word-Press/public/views/agora-fullscreen-template.php:114: <script src="/js/communication-ui.js"></script>

@digitallysavvy digitallysavvy added the bug Something isn't working label Nov 18, 2019
@digitallysavvy digitallysavvy added this to Done in WP Plugin via automation Nov 19, 2019
digitallysavvy added a commit that referenced this issue Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
WP Plugin
  
Done
Development

No branches or pull requests

2 participants