Support » Themes and Templates » wp_register_style conditional comments

  • Hello,

    Using wp_register_style() in WordPress 2.7, is it possible to specify that a style sheet should be surrounded by conditional comments?

    The same would be helpful for scripts, but I’m only worried about CSS for the time being.

Viewing 1 replies (of 1 total)
  • Conditional comments are possible, but no convenience function exists to handle them yet. After you call wp_register_style('ie-style', '/css/ie.css'); just import the main WordPress style registry with global $wp_styles; and add the conditional data to the style entry through the registry’s add_data method: $wp_styles->add_data('ie-style', 'conditional', 'IE');

Viewing 1 replies (of 1 total)
  • The topic ‘wp_register_style conditional comments’ is closed to new replies.