內容簡介
這個外掛可以為WP-Syntax添加下載功能,每個代碼段落都會有漂亮的標題,其中包含一個永久鏈接錨點和兩個操作按鈕:"原始"和"下載"。
使用方法很簡單,只需將filename="..."屬性添加到<pre>元素中,然後代碼段落就會有標題。
我強烈建議您使用TinyMCE Valid
Elements
外掛,它可以使<pre>元素的非標準屬性被視為有效並在視覺編輯器中被保留。 配置它,以便pre元素可以具有以下屬性:
class
dir
escaped
filename
highlight
id
lang
line
style
title
wrap
您可以透過管理菜單中的CSS更改標題的可視風格。
此外掛最初是針對PHP 5.2.12開發的,目前僅在5.4上進行了測試。 它永遠不會與PHP 4一起工作。
版權所有(c)2010, 2011, 2012, 2013, 2014 Akinori MUSHA
保留所有權利。
允許在源代碼和二進制形式中重新分發和使用,無論是否修改,只要滿足以下條件:
保留源代碼中的上述版權聲明、此條款列表和以下聲明。
在文檔和/或其他隨附分發物料中重製上述版權聲明、此條款列表和以下聲明。
此軟件是由作者和貢獻者"按原樣"提供的,不提供任何明示或暗示的保證,包括但不限於適銷性和適用於特定目的的保證。 不論在任何情況下,作者或貢獻者均不對任何直接、間接、偶然、特殊、示例性或後果性損害(包括但不限於採購替代商品或服務;使用損失、數據或利潤;或業務中斷)負責任,即使已告知可能產生此類損害的可能性。
外掛標籤
開發者團隊
② 後台搜尋「WP-Syntax Download Extension」→ 直接安裝(推薦)
原文外掛簡介
This plug-in adds download facility to
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
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 theelement
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
wrapYou 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:Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.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.延伸相關外掛
