Title: Postscript
Author: Barrett Golding
Published: <strong>2016 年 6 月 20 日</strong>
Last modified: 2018 年 2 月 21 日

---

搜尋外掛

![](https://ps.w.org/postscript/assets/banner-772x250.jpg?rev=1446861)

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

![](https://ps.w.org/postscript/assets/icon-256x256.jpg?rev=1446861)

# Postscript

 由 [Barrett Golding](https://profiles.wordpress.org/hearvox/) 開發

[下載](https://downloads.wordpress.org/plugin/postscript.1.0.0.zip)

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

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

## 外掛說明

No more shoehorning stylesheets and JavaScripts into the post content box. No more
loading scripts on every post that only a few use. Postscript lets you easily add
libraries or single-post script and style files post-by-post.

The plugin uses the WordPress “enqueue” methods, which means you can control dependencies(
when registering scripts), improve site performance by putting styles in the head
and scripts in the footer, and eliminate loading multiple copies of the same library(
jQuery, I’m looking at you).

#### Enqueue Registered Styles and Scripts (by Handle)

Use the Postscript meta box (Edit Post screen) to enqueue registered styles and 
scripts (listed by handle in checkboxes).

#### Enqueue Unregistered Styles, Scripts, and Data Files (by URL)

For each post, you can also enqueue unregistered files, by entering URLs in the 
meta box text fields for:
 * 1 CSS stylesheet. * 2 JavaScript URLs, e.g, one JSON
data file and one script file.

#### Add Post and Body Classes

And for each post, you can add:
 * A classname, to the HTML body tag (requires `
body_class()` in theme). * A classname, to `class="post"` list (inserted by WordPress,
requires `post_class()` in theme).

#### Settings and Security

The Settings screen lets you control which user-roles and post-types display the
Postscript meta box and which script/style handles users are allowed to enqueue.

## 螢幕擷圖

[⌊Edit Post screen Postscript meta box⌉⌊Edit Post screen Postscript meta box⌉[

Edit Post screen **Postscript** meta box

[⌊Settings Page: User Roles, Post Types, URls, and Classes⌉⌊Settings Page: User 
Roles, Post Types, URls, and Classes⌉[

Settings Page: User Roles, Post Types, URls, and Classes

[⌊Settings Page: Tables of Added Scripts and Styles⌉⌊Settings Page: Tables of Added
Scripts and Styles⌉[

Settings Page: Tables of Added Scripts and Styles

[⌊Settings Page: Remove Scripts and Styles⌉⌊Settings Page: Remove Scripts and Styles⌉[

Settings Page: Remove Scripts and Styles

## 安裝方式

To install and use the Postscript plugin:

 1. Upload the `postscript` directory and content to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to the Setting: Postscript options screen.

## 常見問題集

  Installation Instructions

To install and use the Postscript plugin:

 1. Upload the `postscript` directory and content to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. Go to the Setting: Postscript options screen.

  How do add registered script/style handles to the Postscript meta box?

The Settings > Postscript screen lists all available handles, those registered via
the [`wp_enqueue_scripts` hook])https://developer.wordpress.org/reference/hooks/
wp_enqueue_scripts/} in your active theme and plugins and the defaults registered
by WordPress itself.

You can add any registered script or stylesheet handle to the checkboxes in the 
Postscript meta box. The [GitHub Dev Notes](https://github.com/hearvox/postscript#dev-notes)
details on the inner workings of this plugin, including custom fields and taxonomies,
transients, options, and filters.

  How do I register scripts?

**Your Scripts and Styles:** You can register your own CSS/JS file _handles_ with
the [wp_register_script()](https://developer.wordpress.org/reference/functions/wp_register_script/)
and [wp_register_style()](https://developer.wordpress.org/reference/functions/wp_register_style/)
functions.

**Default Scripts and Styles:** WordPress auto-registers numerous styles and scripts
via its core functions: [wp_default_scripts()](https://developer.wordpress.org/reference/functions/wp_default_scripts/)
and [wp_default_styles()](https://developer.wordpress.org/reference/functions/wp_default_styles/).
Each file gets its own unique handle: see the [list of defaults](https://developer.wordpress.org/reference/functions/wp_enqueue_script/#defaults).

  What is a use case for this plugin?

Adding Thickbox to a post is an example of what this plugin does. WordPress ships
with a modified [ThickBox jQuery library](https://codex.wordpress.org/Javascript_Reference/ThickBox),
used to make modal lightbox windows. The [add_thickbox()](https://developer.wordpress.org/reference/functions/add_thickbox/)
function enables this feature. When enabled, though, Thickbox’s CSS and JS files
load on every Post, whether the post needs it or not.

This plugin improves site performance by enqueuing scripts only when specifically
requested for an individual post, via the **Postscript** meta box. See [the screenshots](https://wordpress.org/plugins/postscript/screenshots/).

  How can I contribute to Postscript?

Postscript is now on [GitHub](https://github.com/hearvox/postscript). Pull Requests
welcome.

  How can I translate Postscript?

This plugin is internationalized (default: English). Please contribute a translation
in your language.

The WordPress.org Polyglots Team maintains a comprehensive [Translator’s Handbook](https://make.wordpress.org/polyglots/handbook/).
All text strings in this plugin are localized, following the guidelines of the WordPress.
org Plugin Handbook’s [Internationalization section](https://developer.wordpress.org/plugins/internationalization/).

  Credits

This plugin was developed as part of a [Reynolds Journalism Institute](https://www.rjionline.org)
fellowship.

## 使用者評論

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

## 參與者及開發者

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

參與者

 *   [ Barrett Golding ](https://profiles.wordpress.org/hearvox/)

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

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

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

## 變更記錄

#### 1.0.0

Release Date: February 20, 2018

Bugfixes:

 * Fixes taxonomy term deletion when no terms checked.
 * Removes Postscript taxonomies from Dashboard menu links.
 * Removes Postscript taxonomies from Dashboard: Appearance: Menu checkboxes.
 * Removes Postscript taxonomies from Quick Edit checkboxes.
 * Removes Yoast SEO plugin “Make Primary” button on Postscript taxonomies.

#### 0.4.7

Release Date: July 30, 2016

Beta version, first in WordPress Directory:

 * Adds whitelists for hostnames and extensions of unregistered URLs.
 * Changes custom taxonomy slugs to ‘postscripts’ and poststyles’.Fix
 * Tests upgrade option function based on version number.

## 中繼資料

 *  版本 **1.0.0**
 *  最後更新 **8 年前**
 *  啟用安裝數 **10+**
 *  WordPress 版本需求 ** 3.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **4.9.29**
 *  語言
 * [English (US)](https://wordpress.org/plugins/postscript/)
 * 標籤:
 * [javascript](https://tw.wordpress.org/plugins/tags/javascript/)[script](https://tw.wordpress.org/plugins/tags/script/)
   [style](https://tw.wordpress.org/plugins/tags/style/)[styles](https://tw.wordpress.org/plugins/tags/styles/)
   [stylesheet](https://tw.wordpress.org/plugins/tags/stylesheet/)
 *  [進階檢視](https://tw.wordpress.org/plugins/postscript/advanced/)

## 評分

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

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

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

## 參與者

 *   [ Barrett Golding ](https://profiles.wordpress.org/hearvox/)

## 技術支援

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

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

## 贊助

想要支援這個外掛的發展嗎？

 [ 贊助這個外掛 ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=T4YWRA5FZC5PC)