16
footer.php
16
footer.php
@@ -1,13 +1,13 @@
|
||||
|
||||
</div><!-- /#wrap -->
|
||||
|
||||
<?php roots_footer_before(); ?>
|
||||
<footer id="content-info" class="<?php echo WRAP_CLASSES; ?>" role="contentinfo">
|
||||
<?php roots_footer_inside(); ?>
|
||||
<?php dynamic_sidebar('roots-footer'); ?>
|
||||
<p class="copy"><small>© <?php echo date('Y'); ?> <?php bloginfo('name'); ?></small></p>
|
||||
</footer>
|
||||
<?php roots_footer_after(); ?>
|
||||
|
||||
<?php roots_footer_before(); ?>
|
||||
<footer id="content-info" class="<?php echo WRAP_CLASSES; ?>" role="contentinfo">
|
||||
<?php roots_footer_inside(); ?>
|
||||
<?php dynamic_sidebar('roots-footer'); ?>
|
||||
<p class="copy"><small>© <?php echo date('Y'); ?> <?php bloginfo('name'); ?></small></p>
|
||||
</footer>
|
||||
<?php roots_footer_after(); ?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
<?php roots_footer(); ?>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> Feed" href="<?php echo home_url(); ?>/feed/">
|
||||
|
||||
<script src="<?php echo get_template_directory_uri(); ?>/js/libs/modernizr-2.5.3.min.js"></script>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="<?php echo get_template_directory_uri(); ?>/js/libs/jquery-1.7.1.min.js"><\/script>')</script>
|
||||
|
||||
|
||||
@@ -1,60 +1,15 @@
|
||||
<?php
|
||||
|
||||
function roots_scripts() {
|
||||
wp_register_script('roots_plugins', THEME_PATH . '/js/plugins.js', false, null, false);
|
||||
wp_register_script('roots_script', THEME_PATH . '/js/script.js', false, null, false);
|
||||
if (!is_admin()) {
|
||||
wp_deregister_script('jquery');
|
||||
wp_register_script('jquery', '', '', '', false);
|
||||
}
|
||||
|
||||
wp_register_script('roots_plugins', get_template_directory_uri() . '/js/plugins.js', false, null, false);
|
||||
wp_register_script('roots_script', get_template_directory_uri() . '/js/script.js', false, null, false);
|
||||
wp_enqueue_script('roots_plugins');
|
||||
wp_enqueue_script('roots_script');
|
||||
}
|
||||
|
||||
add_action('wp_enqueue_scripts', 'roots_scripts');
|
||||
|
||||
if (!is_admin()) {
|
||||
add_action('wp_print_scripts', 'roots_print_scripts');
|
||||
}
|
||||
|
||||
function roots_print_scripts() {
|
||||
global $wp_scripts;
|
||||
|
||||
if (!isset($wp_scripts)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$wp_scripts->all_deps($wp_scripts->queue);
|
||||
$scripts = $locales = array();
|
||||
$queue = $wp_scripts->queue;
|
||||
$wp_scripts->all_deps($queue);
|
||||
|
||||
foreach ($wp_scripts->to_do as $key => $handle) {
|
||||
$skip_scripts = array('jquery', 'roots_script', 'roots_plugins');
|
||||
|
||||
$src = WP_BASE . leadingslashit($wp_scripts->registered[$handle]->src);
|
||||
$src = apply_filters('script_loader_src', $src);
|
||||
|
||||
if ($locale = $wp_scripts->print_extra_script($handle, false)) {
|
||||
$locales[] = $locale;
|
||||
}
|
||||
|
||||
$wp_scripts->done[] = $handle;
|
||||
|
||||
if (!in_array($handle, $skip_scripts)) {
|
||||
$scripts[] = '<script src="' . $src . '"></script>';
|
||||
}
|
||||
}
|
||||
|
||||
echo "\t" . implode("\n\t", $scripts) . "\n";
|
||||
if (!empty($locales)) {
|
||||
echo "\t<script>\n";
|
||||
foreach ($locales as $locale) {
|
||||
echo "\t\t{$locale}\n";
|
||||
}
|
||||
echo "\t</script>\n";
|
||||
}
|
||||
|
||||
$template_uri = get_template_directory_uri();
|
||||
echo "\t<script src=\"$template_uri/js/plugins.js\"></script>\n";
|
||||
echo "\t<script src=\"$template_uri/js/script.js\"></script>\n";
|
||||
|
||||
$wp_scripts->reset();
|
||||
return $wp_scripts->done;
|
||||
}
|
||||
add_action('wp_enqueue_scripts', 'roots_scripts', 100);
|
||||
Reference in New Issue
Block a user