jbutko
5/26/2013 - 11:32 AM

PHP, WP, function.php: Conditional style.css register in function.php

PHP, WP, function.php: Conditional style.css register in function.php

<?php

wp_enqueue_style('ie7-fixes', get_bloginfo('template_url') . '/css/ie7.css', false, '', 'screen');

global $wp_styles;
$wp_styles->add_data('ie7-fixes', 'conditional', 'lte IE 7');

?>

alternativa:
wp_enqueue_style(
   'ie7-style',
   get_template_directory_uri() . '/style-ie.css'
);
global $wp_styles;
$wp_styles->add_data( 'ie7-style', 'conditional', 'lte IE 9' );