Optimize stylesheet_link_tag function.
This commit is contained in:
@@ -111,12 +111,7 @@ function roots_get_stylesheets() {
|
||||
}
|
||||
|
||||
function stylesheet_link_tag($file, $tabs = 0, $newline = true) {
|
||||
$i = 0;
|
||||
$indent = '';
|
||||
while ($i < $tabs) {
|
||||
$indent .= "\t";
|
||||
$i++;
|
||||
}
|
||||
$indent = str_repeat("\t", $tabs);
|
||||
return $indent . '<link rel="stylesheet" href="' . get_template_directory_uri() . '/css' . $file . '">' . ($newline ? "\n" : "");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user