Changeset 408 for wp-scripts/trunk/wp-scripts.php
- Timestamp:
- 08/19/08 06:40:34 (5 months ago)
- Files:
-
- 1 modified
-
wp-scripts/trunk/wp-scripts.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-scripts/trunk/wp-scripts.php
r407 r408 2 2 /* 3 3 Plugin Name: WP-Scripts 4 Version: 1.2 4 Version: 1.201 5 5 Plugin URI: http://082net.com/tag/wp-scripts/ 6 6 Description: load popular javascripts on blog head using 'wp_head'. this contains prototype, mootools, scriptaculous, fat, behaviour, sweetTitles, lightbox. you can select script on option panel. Javascripts can be compressed by <a href="http://www.phpclasses.org/browse/package/3158.html">JsComppressor</a>. If your WP version is lesser than 2.1 you shoud install <a href="http://082net.com/tag/wp-compatibility-pack/">WP-Compatibility-Pack</a>. … … 21 21 */ 22 22 23 if(!function_exists('wp_print_scripts')) {24 if(strpos($_SERVER['PHP_SELF'], 'wp-admin/plugins.php') !== false) :25 function wp_scripts_warning() {26 load_plugin_textdomain('wp-scripts', '/wp-content/plugins/wp-scripts/lang');27 ?>28 <script type="text/javascript">//<![CDATA[29 if(!div_wraper_082net) {30 var div_wrapers_082net = document.getElementsByTagName('DIV');31 if(div_wrapers_082net) {32 for(var i=0; i<div_wrapers_082net.length; i++) {33 if(/wrap/.exec(div_wrapers_082net[i].className)) {34 var div_wraper_082net = div_wrapers_082net[i];35 break;36 }37 }38 }39 }40 if(div_wraper_082net) {41 var wp_scripts_warning = document.createElement("DIV");42 wp_scripts_warning.innerHTML = "<p><strong><?php _e('WP-Scripts is not active', 'wp-scripts'); ?></strong> : <?php _e('WP-Scripts requires <a href=\'http://082net.com/tag/wp-compatibility-pack/\'>WP-Compatibility-Pack</a> with lesser than WP 2.1', 'wp-scripts'); ?></p>";43 wp_scripts_warning.className = 'updated fade';44 wp_scripts_warning.id = 'wp_scripts_warning';45 div_wraper_082net.parentNode.insertBefore(wp_scripts_warning, div_wraper_082net);46 Fat.fade_element('wp_scripts_warning');47 }48 //]]></script>49 <?php50 }51 add_action('admin_footer', 'wp_scripts_warning');52 endif; // If plugin manage page.53 return;54 }55 56 23 if(!class_exists('wpInsertScripts')) : 57 24 class wpInsertScripts { … … 59 26 var $URL; 60 27 var $path; 61 var $version = '1.2 ';28 var $version = '1.201'; 62 29 var $moo_ver = '1.11'; 63 30 var $error; … … 368 335 $info['fat'] = array('fat-blog', $jspath.'/fat.js', false, $this->version); 369 336 if(file_exists(dirname(__FILE__).'/js/site.custom.'.$this->op['baselib'].'.js')) 370 $info['site.custom'] = array('site-custom', $jspath.'/site.custom.'.$this->op['baselib'].'.js', false, $this->version);337 $info['site.custom'] = array('site-custom', $jspath.'/site.custom.'.$this->op['baselib'].'.js', array($this->op['baselib']), $this->version); 371 338 else 372 339 $info['site.custom'] = array('site-custom', $jspath.'/site.custom.js', false, $this->version);
