這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

HeadJS Loader

描述

This plugin reformats your page to utilize Head JS in your WordPress site.

Caution: this plugin can cause major issues with the javascript on your site if not implemented properly. Please be sure to test on a development server first

It strips out all your old javascript declarations and puts them into head.js calls so that they are loaded in parallel (see the Head JS website for more details).

Optionally you can wrap all your inline javascript with head.ready calls.

For example, this:

<script type='text/javascript' src='http://yoururl.com/wp-includes/js/prototype.js?ver=1.6.1'></script> 
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=3.0.4'></script> 
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.3'></script> 
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/builder.js?ver=1.8.3'></script> 
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/effects.js?ver=1.8.3'></script> 
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/dragdrop.js?ver=1.8.3'></script> 
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/slider.js?ver=1.8.3'></script> 
<script type='text/javascript' src='http://yoururl.com/wp-includes/js/scriptaculous/controls.js?ver=1.8.3'></script> 

Becomes:

<script type="text/javascript" src="http://yoururl.com/wp-content/plugins/headjs-loader/js/head.min.js"></script> 
<script> 
head.js("http://yoururl.com/wp-includes/js/prototype.js?ver=1.6.1",
    "http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=3.0.4",
    "http://yoururl.com/wp-includes/js/scriptaculous/wp-scriptaculous.js?ver=1.8.3",
    "http://yoururl.com/wp-includes/js/scriptaculous/builder.js?ver=1.8.3",
    "http://yoururl.com/wp-includes/js/scriptaculous/effects.js?ver=1.8.3",
    "http://yoururl.com/wp-includes/js/scriptaculous/dragdrop.js?ver=1.8.3",
    "http://yoururl.com/wp-includes/js/scriptaculous/slider.js?ver=1.8.3",
    "http://yoururl.com/wp-includes/js/scriptaculous/controls.js?ver=1.8.3"
);
</script> 

Feel free to contribue to the project on GitHub!

安裝

  1. Upload headjs-loader directory to /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

常見問題

No questions

No answers.

評價

There are no reviews for this plugin.

貢獻者及開發者

“HeadJS Loader” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 HeadJS Loader 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

0.1.1

  • Fixed bug that caused apache erorr messages if no javascript was declared.

0.1

  • Initial release.