Advertisement
Guest User

Move BrowserID scripts to footer

a guest
May 29th, 2012
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.42 KB | None | 0 0
  1. Index: browserid.php
  2. ===================================================================
  3. --- browserid.php   (revision 550258)
  4. +++ browserid.php   (working copy)
  5. @@ -110,15 +110,14 @@
  6.             self::Check_assertion();
  7.  
  8.             // Enqueue BrowserID scripts
  9. -           wp_enqueue_script('browserid', 'https://browserid.org/include.js');
  10. -           wp_enqueue_script('browserid_login', plugins_url('login.js', __FILE__), array('browserid'));
  11. +           wp_register_script('browserid', 'https://browserid.org/include.js',array(),"",true);
  12. +           wp_register_script('browserid_login', plugins_url('login.js', __FILE__), array('browserid'),"",true);
  13.  
  14.             // Prepare for comments and bbPress
  15.             $options = get_option('browserid_options');
  16.             if ((isset($options['browserid_comments']) && $options['browserid_comments']) ||
  17.                 (isset($options['browserid_bbpress']) && $options['browserid_bbpress'])) {
  18. -               wp_enqueue_script('jquery');
  19. -               wp_enqueue_script('browserid_comments', plugins_url('comments.js', __FILE__), array('jquery', 'browserid'));
  20. +               wp_enqueue_script('browserid_comments', plugins_url('comments.js', __FILE__), array('jquery', 'browserid'),"",true);
  21.             }
  22.         }
  23.  
  24. @@ -433,6 +432,7 @@
  25.         // Build HTML for login/out button/link
  26.         function Get_loginout_html($check_login = true) {
  27.             // Get options
  28. +           wp_enqueue_script('browserid_login');
  29.             $options = get_option('browserid_options');
  30.  
  31.             if ($check_login && is_user_logged_in()) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement