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 enqueueing a new script #4

Closed
Fortyfive opened this issue Oct 8, 2013 · 4 comments
Closed

Conditionally enqueueing a new script #4

Fortyfive opened this issue Oct 8, 2013 · 4 comments
Labels

Comments

@Fortyfive
Copy link

Hi, trying to conditionally enqueue Selectivizr based on: <!--[if (gte IE 6)&(lte IE 8)]>, and have some short questions:

(1) Bearing in mind Bones uses ie6.css for anything below IE 8, would this still be the conditional statement you recommend for Selectivizr?

(2) How would I add the conditional statement using a ( $tag, $handle ) function for js, just like the one you use for the styles (ff_ie_conditionals)?

(3) Similarly, I have a Font Awesome IE 7 script to load. Again, bearing in mind Bones uses ie6.css for anything below IE 8 would you suggest loading this?

@cdukes
Copy link
Owner

cdukes commented Oct 8, 2013

  1. Maybe just load it for IE8 then.
  2. There is no counterpart wrapper for scripts in WP. If this annoys you, too, then please comment on the ticket
  3. I typically don't, but that's mostly philosophical. If you're on IE7, I don't think you deserve nice things. =)

@Fortyfive
Copy link
Author

Agreed re: (2) and (3) !! I will comment on the ticket.

So, could you recommend a way to enqueue this or is the only option to use the default inclusion:

Thanks

On 8 Oct 2013, at 10:40, Cooper Dukes notifications@github.com wrote:

  1. Maybe just load it for IE8 then.
  2. There is no counterpart wrapper for scripts in WP. If this annoys you, too, then please comment on the ticket
  3. I typically don't, but that's mostly philosophical. If you're on IE7, I don't think you deserve nice things. =)


Reply to this email directly or view it on GitHub.

@cdukes
Copy link
Owner

cdukes commented Oct 8, 2013

You'll have to enqueue it by hooking into wp_head or wp_footer. WP doesn't have a clean way to use enqueue wrapped scripts.

@Fortyfive
Copy link
Author

Thanks Cooper...

On 8 Oct 2013, at 12:00, Cooper Dukes notifications@github.com wrote:

You'll have to enqueue it by hooking into wp_head or wp_footer. WP doesn't have a clean way to use enqueue wrapped scripts.


Reply to this email directly or view it on GitHub.

@cdukes cdukes closed this as completed Oct 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants