Title: CC-Scripts
Author: Clearcode
Published: <strong>2016 年 8 月 24 日</strong>
Last modified: 2018 年 2 月 28 日

---

搜尋外掛

![](https://ps.w.org/cc-scripts/assets/banner-772x250.png?rev=1482422)

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

![](https://ps.w.org/cc-scripts/assets/icon-256x256.png?rev=1482422)

# CC-Scripts

 由 [Clearcode](https://profiles.wordpress.org/clearcodehq/) 開發

[下載](https://downloads.wordpress.org/plugin/cc-scripts.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/cc-scripts/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/cc-scripts/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/cc-scripts/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/cc-scripts/#developers)

 [技術支援](https://wordpress.org/support/plugin/cc-scripts/)

## 外掛說明

The CC-Scripts plugin gives Admin users the ability to add custom JavaScript code
to every page on WordPress website in the head/footer and/or directly after the 
opening body html tag.
 Additionally, you can minify scripts using JSMin php library
and/or displaying it selectively using dependencies. The best part is that you can
do this from the Admin panel, perfect for those who don’t have the programming skills
needed to manually add custom JavaScript code to template files.

## 螢幕擷圖

 * [[
 * **WordPress General Settings** – Visit ‘Settings > Scripts’, add your scripts
   into the head and/or body fields and chose the method of inclusion.

## 安裝方式

#### From your WordPress Dashboard

 1. Go to ‘Plugins > Add New’
 2. Search for ‘CC-Scripts’
 3. Activate the plugin from the Plugin section in your WordPress Dashboard.

#### From WordPress.org

 1. Download ‘CC-Scripts’.
 2. Upload the ‘cc-scripts’ directory to your ‘/wp-content/plugins/’ directory using
    your favorite method (ftp, sftp, scp, etc…)
 3. Activate the plugin from the Plugin section in your WordPress Dashboard.

#### Once Activated

Visit ‘Settings > Scripts’, add your scripts into head and/or body fields and chose
the method of inclusion.

**Please note**

 * wp_head action is the preferred location for firing scripts in the head section.
 * wp_body action is the preferred location for firing scripts in the body section.
 * wp_footer action is the preferred location for firing scripts in the footer section.
 * Use output buffering if you don’t have access to the source code of your theme
   and/or you don’t know if the functions above are included in your theme.

#### Multisite

The plugin can be activated and used for just about any use case.

 * Activate at site level to load the plugin on that site only.
 * Activate at network level for full integration with all sites in your network(
   this is the most common type of multisite installation).

## 常見問題集

  Installation Instructions

#### From your WordPress Dashboard

 1. Go to ‘Plugins > Add New’
 2. Search for ‘CC-Scripts’
 3. Activate the plugin from the Plugin section in your WordPress Dashboard.

#### From WordPress.org

 1. Download ‘CC-Scripts’.
 2. Upload the ‘cc-scripts’ directory to your ‘/wp-content/plugins/’ directory using
    your favorite method (ftp, sftp, scp, etc…)
 3. Activate the plugin from the Plugin section in your WordPress Dashboard.

#### Once Activated

Visit ‘Settings > Scripts’, add your scripts into head and/or body fields and chose
the method of inclusion.

**Please note**

 * wp_head action is the preferred location for firing scripts in the head section.
 * wp_body action is the preferred location for firing scripts in the body section.
 * wp_footer action is the preferred location for firing scripts in the footer section.
 * Use output buffering if you don’t have access to the source code of your theme
   and/or you don’t know if the functions above are included in your theme.

#### Multisite

The plugin can be activated and used for just about any use case.

 * Activate at site level to load the plugin on that site only.
 * Activate at network level for full integration with all sites in your network(
   this is the most common type of multisite installation).

  How do I use the wp_body action?

Paste the following code directly after the opening `<body>` tag in your theme:

  Which inclusion method should I chose?

 * wp_head action is the preferred location for firing scripts in the head section.
 * wp_body action is the preferred location for firing scripts in the body section.
 * wp_footer action is the preferred location for firing scripts in the footer section.
 * Use output buffering if you don’t have access to the source code of your theme
   and/or you don’t know if the functions above are included in your theme.

  What are minimum requirements for the plugin?

PHP interpreter version >= 5.3

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈CC-Scripts〉的開發相關工作。

參與者

 *   [ Clearcode ](https://profiles.wordpress.org/clearcodehq/)
 *   [ PiotrPress ](https://profiles.wordpress.org/piotrpress/)

[將〈CC-Scripts〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/cc-scripts)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/cc-scripts/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/cc-scripts/)，或透過 [RSS](https://plugins.trac.wordpress.org/log/cc-scripts/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/cc-scripts/)。

## 變更記錄

#### 1.2.0

_Release date: 28.02.2018_

 * Changed function from `wp_body_open()` to `wp_body()`.

#### 1.1.0

_Release date: 12.12.2016_

 * Added support for footer scripts.
 * Added support for minification.
 * Added support for dependencies.

#### 1.0.0

_Release date: 24.08.2016_

 * First stable version of the plugin.

## 中繼資料

 *  版本 **1.2.0**
 *  最後更新 **8 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 4.6 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.9.29**
 *  PHP 版本需求 ** 7.0 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/cc-scripts/)
 * 標籤:
 * [body](https://tw.wordpress.org/plugins/tags/body/)[footer](https://tw.wordpress.org/plugins/tags/footer/)
   [head](https://tw.wordpress.org/plugins/tags/head/)[javascript](https://tw.wordpress.org/plugins/tags/javascript/)
   [scripts](https://tw.wordpress.org/plugins/tags/scripts/)
 *  [進階檢視](https://tw.wordpress.org/plugins/cc-scripts/advanced/)

## 評分

這個項目尚無任何評論記錄。

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

[查看全部使用者評論](https://wordpress.org/support/plugin/cc-scripts/reviews/)

## 參與者

 *   [ Clearcode ](https://profiles.wordpress.org/clearcodehq/)
 *   [ PiotrPress ](https://profiles.wordpress.org/piotrpress/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/cc-scripts/)