Title: WP-Syntax Download Extension
Author: Akinori MUSHA
Published: <strong>2010年3月19日</strong>
Last modified: 2024年4月13日

---

プラグインを検索

このプラグインは **WordPress の最新3回のメジャーリリースに対してテストされていま
せん**。もうメンテナンスやサポートがされていないかもしれず、最新バージョンの WordPress
で使用した場合は互換性の問題が発生する可能性があります。

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

# WP-Syntax Download Extension

 作者: [Akinori MUSHA](https://profiles.wordpress.org/akinori-musha/)

[ダウンロード](https://downloads.wordpress.org/plugin/wp-syntax-download-extension.1.1.3.zip)

 * [詳細](https://ja.wordpress.org/plugins/wp-syntax-download-extension/#description)
 * [レビュー](https://ja.wordpress.org/plugins/wp-syntax-download-extension/#reviews)
 *  [インストール](https://ja.wordpress.org/plugins/wp-syntax-download-extension/#installation)
 * [開発](https://ja.wordpress.org/plugins/wp-syntax-download-extension/#developers)

 [サポート](https://wordpress.org/support/plugin/wp-syntax-download-extension/)

## 説明

This plug-in adds download facility to
 [WP-Syntax](https://wordpress.org/extend/plugins/wp-syntax/),
putting a pretty caption to each syntax highlighted code snippet, which contains
a permalink anchor and a couple of action buttons: “raw” and “download”.

The usage is easy. You just put an attibute `filename="..."` to
 a `<pre>` element
and the snippet will have a caption.

I strongly recommend that you use the [TinyMCE Valid
 Elements

 plug-in to make
the non-standard attributes of the `<pre>` element treated as valid and get preserved
in the visual editor. Configure it so that the `pre` element can have the following
attributes:

 * `class`
 * `dir`
 * `escaped`
 * `filename`
 * `highlight`
 * `id`
 * `lang`
 * `line`
 * `style`
 * `title`
 * `wrap`

You can alter the visual style of captions with CSS via admins menu.
 This plug-
in was first developed for PHP 5.2.12 and is currently tested only with 5.4. It 
will never work with PHP 4.

### License

Copyright (c) 2010-2024 Akinori MUSHA

All rights reserved.

Redistribution and use in source and binary forms, with or without
 modification,
are permitted provided that the following conditions are met:

 1. Redistributions of source code must retain the above copyright
     notice, this list
    of conditions and the following disclaimer.
 2. Redistributions in binary form must reproduce the above copyright
     notice, this
    list of conditions and the following disclaimer in the documentation and/or other
    materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS “AS IS” AND
 ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

## スクリーンショット

[⌊Output sample in the default style.⌉⌊Output sample in the default style.⌉[

Output sample in the default style.

[⌊Output sample in a user customized style.⌉⌊Output sample in a user customized 
style.⌉[

Output sample in a user customized style.

[⌊Admin options screen.⌉⌊Admin options screen.⌉[

Admin options screen.

## インストール

 1. Upload the `wp-syntax-download-extension` directory to the /wp-content/plugins/
    directory.
 2. Activate the plugin through the ‘Plugins’ menu in WordPress. Of cource you have
    to have WP-Syntax activated as well.
 3. Add an attribute `filename="filename.ext"` to the `<pre lang="...">` snippet that
    you want to make downloadable.
 4. Adjust the design of captions with CSS via admins menu.

## FAQ

Q. This plug-in does not work with WP-Syntax _<some old
 version>
!

A. No surprise. This plug-in depends on WP-Syntax’s internals. Fix
 it yourself 
or upgrade WP-Syntax.

Q. This plug-in does not work with WP-Syntax _<the latest
 version>
!

A. Bad surprise to me. This plug-in depends on WP-Syntax’s internals.
 Fix it yourself
or wait until I fix it.

Q. How do you customize the styles of the code?

A. Amongst the options I am using the [WP-Syntax
 Hacktify

 plug-in.

## 評価

このプラグインにはレビューがありません。

## 貢献者と開発者

WP-Syntax Download Extension はオープンソースソフトウェアです。以下の人々がこのプラグ
インに貢献しています。

貢献者

 *   [ Akinori MUSHA ](https://profiles.wordpress.org/akinori-musha/)

[“WP-Syntax Download Extension” をあなたの言語に翻訳しましょう。](https://translate.wordpress.org/projects/wp-plugins/wp-syntax-download-extension)

### 開発に興味がありますか ?

[コードを閲覧](https://plugins.trac.wordpress.org/browser/wp-syntax-download-extension/)
するか、[SVN リポジトリ](https://plugins.svn.wordpress.org/wp-syntax-download-extension/)
をチェックするか、[開発ログ](https://plugins.trac.wordpress.org/log/wp-syntax-download-extension/)
を [RSS](https://plugins.trac.wordpress.org/log/wp-syntax-download-extension/?limit=100&mode=stop_on_copy&format=rss)
で購読してみてください。

## 変更履歴

#### 1.1.3

Fix a fatal error and suppress a warning with PHP 8.

#### 1.1.1

Add support for a file name with directory separators.
 Automatically suppress W3TC
comments in raw/download output.

#### 1.1.0

Update for WP-Syntax 1.0, dropping support for 0.9.13 and prior.

#### 1.0.4

Update for WP-Syntax 0.9.13, dropping support for 0.9.12 and prior.
 Take care of
extended_valid_elements of TinyMCE.

#### 1.0.3

Fix a bug where the CSS is not read.

#### 1.0.2

Follow the critical change made in WP-Syntax 0.9.11, which is now the
 least requirement
version. As a bonus, WordPress 3.0 or later is required.

#### 1.0.1

Do not fail when WP-Syntax is not installed or activated.
 Improve this document.

#### 1.0

First release.

## メタ

 *  バージョン **1.1.3**
 *  最終更新日 **3年前**
 *  有効インストール数 **10+**
 *  WordPress バージョン ** 3.0またはそれ以降 **
 *  検証済み最新バージョン: **3.4.2**
 *  言語
 * [English (US)](https://wordpress.org/plugins/wp-syntax-download-extension/)
 * タグ
 * [code](https://ja.wordpress.org/plugins/tags/code/)[formatting](https://ja.wordpress.org/plugins/tags/formatting/)
   [Highlight](https://ja.wordpress.org/plugins/tags/highlight/)[syntax](https://ja.wordpress.org/plugins/tags/syntax/)
   [syntax highlighting](https://ja.wordpress.org/plugins/tags/syntax-highlighting/)
 *  [詳細を表示](https://ja.wordpress.org/plugins/wp-syntax-download-extension/advanced/)

## 評価

レビューはまだ送信されていません。

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

[すべてのレビューを見る](https://wordpress.org/support/plugin/wp-syntax-download-extension/reviews/)

## 貢献者

 *   [ Akinori MUSHA ](https://profiles.wordpress.org/akinori-musha/)

## サポート

意見や質問がありますか ?

 [サポートフォーラムを表示](https://wordpress.org/support/plugin/wp-syntax-download-extension/)

## 寄付

このプラグインが今後も改善できるよう応援しませんか ?

 [ このプラグインに寄付 ](https://github.com/knu)