Skip to content

Instantly share code, notes, and snippets.

@klihelp
Forked from sapegin/footer.php
Created May 1, 2014 14:02
Show Gist options
  • Save klihelp/b8cac158e449bf6280ed to your computer and use it in GitHub Desktop.
Save klihelp/b8cac158e449bf6280ed to your computer and use it in GitHub Desktop.

Revisions

  1. @sapegin sapegin created this gist Aug 7, 2012.
    19 changes: 19 additions & 0 deletions footer.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    <?php if (WP_THEME_DEBUG) { ?>
    <script>
    var require = {
    baseUrl: '<?php echo get_template_directory_uri(); ?>/js/',
    paths: {
    'jquery': 'libs/jquery-1.7.2.min',
    'jquery.mousewheel': 'libs/jquery.mousewheel'
    },
    shim: {
    'jquery.mousewheel': ['jquery']
    }
    };
    </script>
    <script src="<?php echo get_template_directory_uri(); ?>/js/libs/require.js" data-main="main"></script>
    <?php } else { ?>
    <script src="http://yandex.st/jquery/1.7.2/jquery.min.js"></script>
    <script>!window.jQuery && document.write(unescape('%3Cscript src="<?php echo get_template_directory_uri(); ?>/js/libs/jquery-1.7.2.min.js"%3E%3C/script%3E'))</script>
    <script src="<?php echo get_template_directory_uri(); ?>/build/scripts.min.js"></script>
    <?php } ?>