jegtheme

login disable script

Jan 4th, 2013
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.21 KB | None | 0 0
  1. <?php
  2.  
  3. add_action('init','jeg_init_default');
  4.  
  5. function jeg_is_login_page() {
  6.     return in_array($GLOBALS['pagenow'], array('wp-login.php', 'wp-register.php'));
  7. }
  8.  
  9. function jeg_init_default() {  
  10.     if(!jeg_is_login_page()) {
  11.        
  12.         /** enqueue style **/
  13.         wp_enqueue_style ('jeg-def-style'   ,   get_template_directory_uri() . '/style.css', null, JEG_VERSION);
  14.         wp_enqueue_style ('jeg-bootstrap'   ,   JEG_CSS_URL . 'bootstrap.css', null, JEG_VERSION);
  15.         wp_enqueue_style ('jeg-style'       ,   JEG_CSS_URL . 'style.css', null, JEG_VERSION);
  16.            
  17.         if(j_get_option('responsive', 1))
  18.         {
  19.             wp_enqueue_style ('jeg-bootstrap-responsive'    ,   JEG_CSS_URL . 'bootstrap-responsive.css', null, JEG_VERSION);
  20.             wp_enqueue_style ('jeg-style-responsive'        ,   JEG_CSS_URL . 'style-responsive.css', null, JEG_VERSION);
  21.         }
  22.        
  23.         wp_enqueue_style ('jeg-plugin'      ,   JEG_CSS_URL . 'plugin.css', null, JEG_VERSION);
  24.         wp_enqueue_style ('jeg-mediaplayer' ,   JEG_CSS_URL . 'mediaelement/mediaelementplayer.css', null, JEG_VERSION);
  25.         wp_enqueue_style ('jeg-playlist'    ,   JEG_CSS_URL . 'blue.monday/jplayer.blue.monday.css', null, JEG_VERSION);
  26.         wp_enqueue_style ('jeg-additional-style' ,  home_url() . '/index.php?jeg-theme=loadcss', null, JEG_VERSION);
  27.        
  28.         /** enqueue script **/
  29.         wp_enqueue_script('jquery');
  30.         wp_enqueue_script('modernizr'       , JEG_JS_URL . 'libs/modernizr-2.5.3.min.js'    , null , JEG_VERSION);
  31.         wp_enqueue_script('jeg-plugin'      , JEG_JS_URL . 'plugins.js'                     , null , JEG_VERSION);
  32.         wp_enqueue_script('jeg-script'      , JEG_JS_URL . 'script.js'                      , null , JEG_VERSION);
  33.         wp_enqueue_script('jeg-youtube_api' , 'http://www.youtube.com/player_api');
  34.         wp_enqueue_script('jeg-google-map'  , 'http://maps.google.com/maps/api/js?sensor=false');
  35.        
  36.         $shareoption = j_get_option('portfolio_like');
  37.         if($shareoption){
  38.             wp_enqueue_script('facebook'        , 'http://connect.facebook.net/en_US/all.js#xfbml=1');
  39.             wp_enqueue_script('tweet-button'    , 'http://platform.twitter.com/widgets.js');
  40.             wp_enqueue_script('google-botton'   , 'https://apis.google.com/js/plusone.js');
  41.         }
  42.        
  43.         if ( is_singular() && get_option( 'thread_comments' ) ) {
  44.             wp_enqueue_script( 'comment-reply' );
  45.         }
  46.     }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment