Better rewrite/clean URL handling
- New roots-utils.php file for base functions - Defined useful constants for dealing with common paths - Refactored rewrites and clean URLs to be more flexible for non standard setups - Custom scripts handler now deals with plugin scripts correctly - Fixes #204, #270, #278
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
add_action('roots_stylesheets', 'roots_get_stylesheets');
|
||||
|
||||
function roots_get_stylesheets() {
|
||||
$styles = '';
|
||||
$styles .= stylesheet_link_tag('/style.css', 1);
|
||||
@@ -25,7 +23,7 @@ function stylesheet_link_tag($file, $tabs = 0, $newline = true, $rel = 'styleshe
|
||||
return $indent . '<link rel="' . $rel .'" href="' . get_template_directory_uri() . '/css' . $file . '">' . ($newline ? "\n" : "");
|
||||
}
|
||||
|
||||
add_action('roots_footer', 'roots_google_analytics');
|
||||
add_action('roots_stylesheets', 'roots_get_stylesheets');
|
||||
|
||||
function roots_google_analytics() {
|
||||
$roots_google_analytics_id = GOOGLE_ANALYTICS_ID;
|
||||
@@ -39,4 +37,6 @@ function roots_google_analytics() {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
add_action('roots_footer', 'roots_google_analytics');
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user