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

Conditionally load the plugin styles and scripts #58

Closed
wants to merge 1 commit into from
Closed

Conditionally load the plugin styles and scripts #58

wants to merge 1 commit into from

Conversation

titodevera
Copy link

  • Stop enqueuing the plugin styles and scripts on every page.
  • Removes unnecessary "is_admin()" check and "wp_enqueue_script( 'jquery' )"
  • Shorthand for "$( document ).ready"

☕️:bowtie:

matt-h added a commit that referenced this pull request Aug 1, 2019
Removes unnecessary "is_admin()" check and "wp_enqueue_script( 'jquery')"

Thanks to https://github.com/titodevera
#58
@matt-h
Copy link
Member

matt-h commented Aug 1, 2019

Thanks for this. The enqueue part looks good.

The $( document ).ready change actually didn't run it on ready anymore. I think it needed to start with jQuery to do so, but I think it is fine in the longhand form as is.

I pulled your changes into a new pull request with a little bit of formatting changes.
#59

matt-h added a commit that referenced this pull request Aug 1, 2019
Removes unnecessary "is_admin()" check and "wp_enqueue_script( 'jquery')"

Thanks to https://github.com/titodevera
#58
@matt-h matt-h closed this Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants