Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.32 KB | None | 0 0
  1.         public function register_scripts_and_styles() {
  2.                        
  3.             $uitheme = $this->jckwdsSettings['datesettings_datesettings_setup_uitheme'];           
  4.                
  5.             if ( is_admin() ) {
  6.    
  7.             } else {
  8.                 if($uitheme != 'none' && is_checkout()){
  9.                     wp_enqueue_style(
  10.                         $this->slug . 'admin-ui-css',
  11.                         'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/'.$uitheme.'/jquery-ui.css',
  12.                         false,
  13.                         $this->version,
  14.                         false
  15.                     );
  16.                 }
  17.                 $this->load_file( $this->slug . '-script', '/assets/frontend/js/jckwds-scripts.min.js', true, array('jquery-ui-datepicker'), true );
  18.                 $this->load_file( $this->slug . '-style', '/assets/frontend/css/jckwds-styles.min.css' );
  19.                
  20.                     $current_language = ICL_LANGUAGE_CODE;
  21.            
  22.                     if ( function_exists( 'icl_register_string' ) && ICL_LANGUAGE_CODE == $current_language && ICL_LANGUAGE_CODE !== 'en') {
  23.                         wp_register_script('jquery.ui.datepicker-'.$current_language.'', plugins_url('jck_woo_deliveryslots/assets/options/jck-settings-framework/js/datepicker/di18n/jquery.ui.datepicker-'.$current_language.'.js', dirname(__FILE__)));
  24.                         wp_enqueue_script('jquery.ui.datepicker-'.$current_language.'');
  25.                     }
  26.                    
  27.                 wp_enqueue_style( $this->slug . '-dynamic-style', admin_url('admin-ajax.php').'?action='.$this->slug . '-dynamic-style' );
  28.             } // end if/else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement