cdukes / bones-for-genesis-2-0

A starting point for new Genesis projects. Built for Genesis 3.* and WordPress 5.*+.
GNU General Public License v3.0
182 stars 61 forks source link

IE Conditionals in /includes/structure/header..php #22

Closed Fortyfive closed 10 years ago

Fortyfive commented 10 years ago

Hi Cooper, in this function there is a '.' after the second $output. Is this a mistake?

function bfg_ie_conditionals( $tag, $handle ) {

if( 'bfg' == $handle ) {
    $output = '<!--[if !IE]> -->' . "\n" . $tag . '<!-- <![endif]-->' . "\n";
    $output .= '<!--[if gte IE 8]>' . "\n" . $tag . '<![endif]-->' . "\n";
} elseif( 'bfg-ie-universal' == $handle ) {
    $output = '<!--[if lt IE 8]>' . "\n" . $tag . '<![endif]-->' . "\n";
} else {
    $output = $tag;
}

return $output;

}

Thanks David

EmilEriksen commented 10 years ago

This is a shorthand way of concatenation. Instead of typing $output = $output . 'string'; you can just type $output .= 'string'.

Fortyfive commented 10 years ago

Apologies, I did not realise.