Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (58 sloc) 1.94 KB
<?php
/**
*
* basis_child_styles() - Dynamically include stylesheets in the head
*
* default parent reset.css
* default child style.css
* cross browser form styling from formalize.me (javascript included in plugins.js)
* grid based styling using 960.gs as a base (uncomment to use)
*
*/
add_action('wp_print_styles', 'basis_child_styles');
function basis_child_styles() {
if (!is_admin()) {
wp_register_style('basis-child', get_stylesheet_directory_uri().'/style.css', array('basis-reset'));
wp_register_style('basis-formalize', get_stylesheet_directory_uri().'/library/css/formalize.css', array('basis-reset'));
// wp_register_style('basis-grid', get_stylesheet_directory_uri().'/library/css/grid.css', array('basis-reset'));
// wp_enqueue_style('basis-grid');
wp_enqueue_style('basis-formalize');
wp_enqueue_style('basis-child');
}
}
/**
*
* basis_child_scripts() - Dynamically include JavaScript files
*
* jQuery
* Plugins
*
*/
add_action('template_redirect', 'basis_child_scripts');
function basis_child_scripts() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"), false, '1.6.1', true);
wp_register_script('plugins', get_stylesheet_directory_uri().'/library/js/plugins.js', array('jquery'), '1.6.1', true);
wp_enqueue_script('jquery');
wp_enqueue_script('plugins');
}
}
/**
*
* add_google_analytics() - Add google analytics to footer (change "UA-XXXXX-X" to your code)
*
* uses Google's ga.js tracking code for better performance
*
*/
add_action('wp_footer', 'add_google_analytics');
function add_google_analytics() {
if (!is_admin()) {
echo '<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>';
echo '<script type="text/javascript">';
echo 'var pageTracker = _gat._getTracker("UA-XXXXX-X");';
echo 'pageTracker._trackPageview();';
echo '</script>';
}
}
?>