[WordPress] 外掛分享: mcjh button shortcode

首頁外掛目錄 › mcjh button shortcode
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
80+
安裝啟用
★★★★★
5/5 分(1 則評價)
2612 天前
最後更新
問題解決
WordPress 3.0.1+ v1.6.4 上架:2015-02-19

內容簡介

透過此 WordPress 外掛,您可以創建漂亮的 CTA (呼籲按鈕) ,提供 12 種預設色彩或全十六進位代碼,讓您自由定義標籤和個別目標 URL。此外,特殊的設置頁面還提供了易於使用的短代碼生成器和預覽功能。

定義自訂按鈕文字
設置自訂文字顏色
定義自訂鏈接
定義自訂鏈接標題
定義目標是否應在新窗口/標簽中打開或當前窗口/標簽中打開
使用 12 種預設色彩或自定義十六進位色彩代碼
定義 JavaScript 的 click 屬性
在 JavaScript 函數中為 page-id、button-id、target-url、text 和當前頁面使用佔位符
定義內文按鈕行為
添加自訂 CSS
啟用/停用圓角
追踪點擊
可在小工具、內容和主題部分中使用
後端內設有簡單易用的短代碼生成器和顏色選取器

QuickDocs 短代碼

text: 定義按鈕文本內容
link: 定義按鈕鏈接, 需要以 “http://” 開始才能正常工作
color: 定義按鈕顏色
title: 定義鼠標懸停標題
onclick: 在轉換到指定鏈接之前執行的一個 onclick 操作
target: 定義鏈接的目標窗口
style: 定義按鈕在內文中的行為 (其中包括浮動、塊等)
rounded: 定義按鈕是否有圓角
tcolor: 通過十六進位顏色代碼定義文字顏色
css: 按鈕的自訂 CSS

QuickDocs JavaScript 佔位符

這些佔位符僅在「onclick」屬性中使用,可用作 JavaScript 函數中特定於按鈕的引數。

一般情況下,它們將被如下使用: onclick="your_awesome_js_function({buttonid},{link},{pageurl})";

{link} 會被替換為按鈕連接
{pageid} 會被替換為包含此按鈕的頁面 ID
{pageurl} 會被替換為包含此按鈕的頁面 URL
{text} 會被替換為按鈕文本內容
{buttonid} 會被替換為按鈕 ID

重要提示: 不要在佔位符中和引號一起使用,因為它們會自動帶有引號!

短代碼範例
[createButton text=”my text” link=”http://google.de” color=”gold” title=”my awesome button” onclick=”alert({url})” target=”_blank” style=”blockleft” rounded=”false” tcolor=”#123″ css=”a{min-height:300px;}” ]

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.6.4) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「mcjh button shortcode」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Create nice call-to-action Buttons (cta buttons) in 12 predefined colors or whole hexadecimalcode, using own labelling and individual target-URLs. A special settings-page offers an easy-to-use shortcode-generator with preview feature.

Define custom button text
Set a custom text color
Define custom link
Define a custom link title
Define, if target should be opened in a new window/tab or the current one
Use 12 predefined colors or custom hexadecimal color code
Define a javascript onclick action
Use Placeholders for page-id, button-id, target-url, text and current page as arguments in javascript functions
Define inline button behavior
Add custom css
Activate/deactivate rounded corners
Make clicks trackable
Usable in Widgets, Content and theme-parts
Easy to use Shortcode Generator in backend with color picker

QuickDocs Shortcode

text: defines the text of the button
link: the link your button points to, must start with “http://” to work properly
color: the color of your button
title: the mouse over title
onclick: an onclick action to be executed before switching to the given link
target: defines the target window of the link
style: defines the intext behavior for the button (float, block etc)
rounded: defines, if button corners are rounded, or not
tcolor: defines the text color by hexdec code
css: custom css for buttons

QuickDocs Javascript Placeholders
These placeholders only work in the “onlick” attribute and can be used as button-specific arguments in javacript functions.
They generally would be used like this: onclick="your_awesome_js_function({buttonid},{link},{pageurl})";

{link} will be replaced by the button-link
{pageid} will be replaced by the page id that contains this button
{pageurl} will be replaced by the page url that contains this button
{text} will be replaced by the button text
{buttonid} will be replaced by the button id

Important: Don’t use quotes in combination with the placeholders, since they are rendered with quotes automatically!
Example shortcode
[createButton text=”my text” link=”http://google.de” color=”gold” title=”my awesome button” onclick=”alert({url})” target=”_blank” style=”blockleft” rounded=”false” tcolor=”#123″ css=”a{min-height:300px;}” ]

延伸相關外掛

文章
Filter
Mastodon