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:
Scott Walkinshaw
2012-02-20 16:13:35 -05:00
parent 47eb95be69
commit db09a64d94
6 changed files with 93 additions and 69 deletions

View File

@@ -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');
?>