Permalink
Browse files

Enqueue scripts

  • Loading branch information...
1 parent 529295a commit cab1cdf993d2e125d2d0f5997345008fa80fb919 @craigcook craigcook committed Mar 12, 2013
Showing with 21 additions and 0 deletions.
  1. +21 −0 themes/QMO5/functions.php
@@ -1,5 +1,26 @@
<?php
/*********
+* Load various JavaScripts
+*/
+function qmo_load_scripts() {
+ // Load the default jQuery
+ wp_enqueue_script('jquery');
+
+ // Load the threaded comment reply script
+ if ( get_option('thread_comments') && is_singular() ) {
+ wp_enqueue_script( 'comment-reply' );
+ }
+
+ // Check required fields on comment form
+ wp_register_script( 'checkcomments', get_template_directory_uri() . '/js/fc-checkcomment.js' );
+ if ( get_option('require_name_email') && is_singular() ) {
+ wp_enqueue_script('checkcomments');
+ }
+}
+add_action( 'wp_enqueue_scripts', 'qmo_load_scripts' );
+
+
+/*********
* Allow uploading some additional MIME types
*/
function fc_add_mimes( $mimes=array() ) {

0 comments on commit cab1cdf

Please sign in to comment.