Title: WP HeadJS
Author: Brian Zeligson
Published: <strong>2012 年 6 月 17 日</strong>
Last modified: 2012 年 6 月 17 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/wp-headjs.svg)

# WP HeadJS

 作者：[Brian Zeligson](https://profiles.wordpress.org/beezeee/)

[下载](https://downloads.wordpress.org/plugin/wp-headjs.zip)

 * [详情](https://cn.wordpress.org/plugins/wp-headjs/#description)
 * [评价](https://cn.wordpress.org/plugins/wp-headjs/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/wp-headjs/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/wp-headjs/#developers)

 [支持](https://wordpress.org/support/plugin/wp-headjs/)

## 描述

This plugin uses the wp_print_scripts action hook, as opposed to output buffering
and regex used by alternative implementations.

The downside of this method is that only scripts loaded via wp_enqueue_script will
be affected by the plugin, the upside is better
 performance by avoiding output 
buffering on every page load.

The plugin will preserve any localizations added via wp_localize_script, and uses
the first parameter passed to wp_enqueue_script
 as the label for the script in 
the head.js call. For example,

    ```
    wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');
    ```

would show up as

    ```
    head.js({"jquery": "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"});
    ```

This allows you to run callbacks when specific scripts are ready, such as

    ```
    head.ready('jquery', function() {
        //do something when jquery is loaded
    });
    ```

For more on HeadJS usage, see http://headjs.com/

## 安装

The easiest way is via Plugins->Add New from the left sidebar of your WP Admin, 
just search for headjs.

## 评价

此插件暂无评价。

## 贡献者及开发者

「WP HeadJS」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Brian Zeligson ](https://profiles.wordpress.org/beezeee/)

[帮助将「WP HeadJS」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/wp-headjs)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/wp-headjs/)，查看[SVN仓库](https://plugins.svn.wordpress.org/wp-headjs/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/wp-headjs/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/wp-headjs/)。

## 额外信息

 *  版本 **0.1**
 *  最后更新：**14 年前**
 *  活跃安装数量 **10+**
 *  WordPress 版本 ** 2.9.1 或更高版本 **
 *  已测试的最高版本为 **3.2.1**
 *  语言
 * [English (US)](https://wordpress.org/plugins/wp-headjs/)
 * 标签
 * [headjs](https://cn.wordpress.org/plugins/tags/headjs/)[javascript](https://cn.wordpress.org/plugins/tags/javascript/)
   [wp_enqueue_script](https://cn.wordpress.org/plugins/tags/wp_enqueue_script/)
 *  [高级视图](https://cn.wordpress.org/plugins/wp-headjs/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/wp-headjs/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/wp-headjs/reviews/)

## 贡献者

 *   [ Brian Zeligson ](https://profiles.wordpress.org/beezeee/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/wp-headjs/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.brianzeligson.com)