Skip to content

Commit 39dbb64

Browse files
committed
Added all scripts to WP Bootstrap load_scripts function.
1 parent b54d979 commit 39dbb64

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

functions.php

+17-6
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,23 @@ function custom_password_form() {
454454

455455
// Loads scripts
456456
function wpbootstrap_scripts() {
457-
wp_register_script('jquery-tablesorter',
458-
get_template_directory_uri() . '/js/jquery/jquery.tablesorter.min.js',
459-
array('jquery'),
460-
'2.0.5' );
461-
462-
wp_enqueue_script('jquery-tablesorter');
457+
wp_register_script('jquery-tablesorter',
458+
get_template_directory_uri() . '/js/jquery/jquery.tablesorter.min.js',
459+
array('jquery'),
460+
'2.0.5' );
461+
462+
wp_enqueue_script('jquery-tablesorter');
463+
464+
wp_register_script('google-code-prettify',
465+
get_template_directory_uri() . '/js/google-code-prettify/prettify.js');
466+
467+
wp_enqueue_script('google-code-prettify');
468+
469+
wp_register_script('wpbootstrap-application',
470+
get_template_directory_uri() . '/js/application.js',
471+
array('jquery-tablesorter'));
472+
473+
wp_enqueue_script('wpbootstrap-application');
463474
}
464475

465476
add_action('wp_enqueue_scripts', 'wpbootstrap_scripts');

header.php

-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333

3434
<link href="<?php bloginfo('template_directory'); ?>/js/google-code-prettify/prettify.css" rel="stylesheet">
3535

36-
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
37-
<script src="<?php bloginfo('template_directory'); ?>/js/google-code-prettify/prettify.js"></script>
38-
<script src="<?php bloginfo('template_directory'); ?>/js/application.js"></script>
39-
4036
<?php
4137
/* We add some JavaScript to pages with the comment form
4238
* to support sites with threaded comments (when in use).

0 commit comments

Comments
 (0)