[WordPress] 外掛分享: AddQuicktag

WordPress 外掛 AddQuicktag 的封面圖片。

前言介紹

  • 這款 WordPress 外掛「AddQuicktag」是 2007-05-03 上架。
  • 目前有 100000 個安裝啟用數。
  • 上一次更新是 2021-05-20,距離現在已有 1444 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 4.0 以上版本才可以安裝。
  • 有 44 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

bueltge | inpsyde |

外掛標籤

button | editor | tinyMCE | quicktag | add buttons |

內容簡介

這個外掛讓在 HTML 和可視化編輯器中添加快捷標籤非常容易。您可以將您的快捷標籤匯出為可供其他插件版本匯入的 JSON 格式文件。

WordPress 的 WP-AddQuicktag 外掛最初是由 Roel Meurders 創建的。附加Quicktag存儲庫中的版本是更新的版本,這是2.0.0版本的完全重寫,帶有更多功能。

該插件可以將可配置的自定義快捷標籤添加到每種文章類型的編輯器中,包括自其他來源的自定義文章類型。您可以為快捷標籤在編輯器中顯示的文章類型進行選擇。如果這對您來說不能正確運行,您也可以使用插件內部的鉤子。請參閱標籤“其他說明”中的示例和提示。

錯誤、技術提示或貢獻

請在GitHub Repo上給我反饋、貢獻和提交技術錯誤。本頁的Wiki也提供了插件的幾個提示。

Crafted by Inpsyde · Engineering the web since 2006。

自定義文章類型的鉤子

該插件默認將快捷標籤添加到文章類型/ID帖子,頁面和評論中。要使用該插件也適用於其他文章類型,您可以使用過濾器;參見以下示例或Gist 1595155中的示例插件。

// 添加自定義函數到過濾器鉤子'addquicktag_post_types'
add_filter( 'addquicktag_post_types', 'my_addquicktag_post_types' );
/**
* 返回具有自定義文章類型的Aray $post_type
*
* @param $post_type Array
* @return $post_type Array
*/
function my_addquicktag_post_types( $post_types ) {

$post_types[] = 'edit-comments';
return $post_types;
}

自定義頁面的鉤子

設置可以在後臺篩選頁。預設情況下,腳本包括頁面post.php、comment.php。以下示例更改了另一個頁面的設置。

add_filter( 'addquicktag_pages', 'my_addquicktag_pages' );
/**
* 返回具有自定義頁面字符串的頁面數組$page
*
* @param $page Array
* @return $page Array
*/
function my_addquicktag_pages( $page ) {

$page[] = 'edit-comments.php';
return $page;
}

請參見此Gist,以了解如何將Quicktags添加到評論編輯器中:Gist: 3076698。
如果希望該插件的Quicktags也在評論的Quickedit上運行,請刪除addquicktag_quickedit_comment.php.example 文件的.example部分。該文件是為Add Quicktag提供的獨立輔助插件。您需要在“管理插件”中單獨激活此文件(插件)。

自定義按鈕的鉤子

如果插件處於活動狀態,則可以添加自定義按鈕到編輯器中。

以下示例添加了按鈕。數組內的參數與插件的設置相同。

if ( class_exists( 'Add_Quicktag' ) ) :
add_filter( 'addquicktag_buttons', 'my_addquicktag_buttons' );

function my_addquicktag_buttons( $buttons ) {

$buttons[] = array(
'text' => 'Permalink',
'title' => '',
'start' => '[permalink]',

原文外掛簡介

This plugin makes it easy to add Quicktags to the html – and visual-editor. It is possible to export your Quicktags as a JSON – file that can be imported in other installations of the plugin.
WP-AddQuicktag for WordPress is originally created by Roel Meurders. The versions in the Repo of AddQuicktag are newer versions, this is a complete rewrite of version 2.0.0 with more functionality.
The plugin can add configurable custom quicktags to the editor of every post type, including custom post types from other sources. You may choose a post type for which a quicktag shall show up in the editor.
If this should not work perfectly well for you, you may also use the hooks inside the plugin. See the examples and hint inside the tab “Other Notes“.
Bugs, technical hints or contribute
Please give me feedback, contribute and file technical bugs on GitHub Repo. The Wiki on this page has also several hints for the plugin.
Crafted by Inpsyde · Engineering the web since 2006.
Hook for custom post types
The plugin adds the quicktag by default to post types/ID post, page and comment. To use the plugin for other post types also you may use a filter; see the following example or an example plugin in the Gist 1595155.
// add custom function to filter hook 'addquicktag_post_types'
add_filter( 'addquicktag_post_types', 'my_addquicktag_post_types' );
/**
* Return array $post_types with custom post types
*
* @param $post_type Array
* @return $post_type Array
*/
function my_addquicktag_post_types( $post_types ) {

$post_types[] = 'edit-comments';
return $post_types;
}

Hook for custom pages
It is possible also to filter the pages inside the backend. By default the scripts include the pages post.php, comment.php. The following example changes this for an another page.
add_filter( 'addquicktag_pages', 'my_addquicktag_pages' );
/**
* Return array $page with custom page strings
*
* @param $page Array
* @return $page Array
*/
function my_addquicktag_pages( $page ) {

$page[] = 'edit-comments.php';
return $page;
}

See this Gist as an example for how to add the Quicktags to the editor of comments: Gist: 3076698.
If you want the Quicktags of this plugin to work on the Quickedit of comments as well, remove the .example-part of addquicktag_quickedit_comment.php.example filename. The file is a stand alone helper plugin for Add Quicktag. You’ll need to activate this file (plugin) separately in ‘Manage Plugins’.
Hook for custom buttons
It is possible to add custom buttons to the editor, if the plugin is active.
The following example adds buttons. The params inside the array are the same as in the settings of the plugin.
if ( class_exists( 'Add_Quicktag' ) ) :
add_filter( 'addquicktag_buttons', 'my_addquicktag_buttons' );

function my_addquicktag_buttons( $buttons ) {

$buttons[] = array(
'text' => 'Permalink',
'title' => '',
'start' => '[permalink]',
'end' => '[/permalink]',
'access' => '',
'order' => 1,
'visual' => 1,
'post' => 0,
'page' => 1,
'comment' => 0,
'edit-comments' => 0
);
$buttons[] = array(
'text' => 'Button',
'title' => '',
'start' => '',
'end' => '
',
'access' => '',
'order' => 2,
'visual' => 1,
'post' => 0,
'page' => 1,
'comment' => 0,
'edit-comments' => 0
);
return $buttons;
}
endif;

License
Good news, this plugin is free for everyone! Since it’s released under the GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you may consider to thank me and leave a positive review for the time I’ve spent writing and supporting this plugin. And I really don’t want to know how many hours of my life this plugin has already eaten 😉

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「AddQuicktag」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


0.6 | 0.7 | 1.5.3 | 1.5.7 | 1.5.8 | 1.6.3 | 1.6.5 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.1.0 | 2.2.0 | 2.2.1 | 2.2.2 | 2.3.0 | 2.4.3 | 2.5.0 | 2.5.1 | 2.5.2 | 2.5.3 | 2.6.0 | 2.6.1 | trunk | 2.3.0-RC1 |

延伸相關外掛(你可能也想知道)

  • Automatically Paginate Posts 》這個 WordPress 外掛可以自動分頁內容,插入由外掛設定控制的 快速標籤。, 外掛提供了選項,可控制哪些文章類型會自動分頁(預設為「...。
  • WP-Note 2019 》插件可以在文章中美觀地顯示筆記。本外掛程式完全支援Luke開發的 WP-Note 外掛程式的舊版。。
  • Jayj Quicktag 》這個 WordPress 外掛,Jayj Quicktag,讓您可以輕鬆地在文章、頁面或自訂編輯器上新增自訂 Quicktags。, 它會加入一個設定頁面,供您新增所有想要的 Quicktag...。
  • TCD Classic Editor 》總結:該外掛讓你可以在經典編輯器中新增自訂的快速標籤,同時使用了第三方服務 Google Maps API 來嵌入地圖。, , 問題與答案:, 1. 這個 WordPress 外掛的功...。
  • TinyMCE Backslash Button 》當使用日文或韓文字型時,反斜線會顯示為日圓或韓圓符號,因為日圓和韓圓符號在 ASCII 編碼中和反斜線相同。, 這個外掛提供了一個 TinyMCE 按鈕和 Quicktag,...。
  • Bambuser for WordPress 》嵌入來自 Bambuser 的直播和影片。, 用法, 展示單一影片, , , 在文章中輸入 ‘[bambuser id=”012345″]’ 簡碼。 id 編號是 bambuser ...。
  • XHE Quicktags 》此外掛讓你在 WordPress 管理後台文字編輯器中新增按鈕。。
  • Let's Mix Shortcode 》這個 Let’s Mix Shortcode 外掛可以讓你透過 WordPress 短碼 (shortcode),輕鬆將來自 Let’s Mix 的曲目清單和播放器小工具整合到你的 WordPress...。

文章
Filter
Apply Filters
Mastodon