[WordPress] 外掛分享: CodePen Embedded Pens Shortcode

首頁外掛目錄 › CodePen Embedded Pens Shortcode
900+
安裝啟用
★★★★
4.3/5 分(6 則評價)
533 天前
最後更新
問題解決
WordPress 2.6+ v1.0.3 上架:2014-01-05

內容簡介

此外掛提供了一個特殊的短代碼 [codepen_embed],可用於嵌入CodePen上的 Pens。

您可以在此處學習更多有關 CodePen 的資訊,以及在此處了解該外掛的功能。

基本用法
[codepen_embed height=300 theme_id=1 slug_hash='jwGBh' user='arasdesign' default_tab='html' animations='run']
See the Pen <a href='https://codepen.io/arasdesign/pen/jwGBh'>Flat minion</a> by Amin Poursaied (<a href='https://codepen.io/arasdesign'>@arasdesign</a>) on <a href='https://codepen.io'>CodePen</a>
[/codepen_embed]

重點

您可以在「可視化編輯器」中使用短代碼。CodePen 嵌入物是複製並貼上的 HTML,這種方式在使用編輯器時可能無法正常顯示。如果您是 WordPress 的使用者,並且經常使用可視化編輯器,那麼您可能需要使用此外掛。

您可以設置預設主題,或通過短代碼属性覆蓋任何設置。

希望此外掛最終能提供更多功能,例如具有編輯框架,可以挑選要嵌入的 Pens,以及對 HTML 輸出進行更多控制。

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「CodePen Embedded Pens Shortcode」→ 直接安裝(推薦)

原文外掛簡介

Allows the use of a special shortcode [codepen_embed] for embedding Pens from CodePen.
You can learn more about CodePen here and about this plugin here.
Basic Usage
[codepen_embed height=300 theme_id=1 slug_hash='jwGBh' user='arasdesign' default_tab='html' animations='run']
See the Pen Flat minion by Amin Poursaied (@arasdesign) on CodePen
[/codepen_embed]

The Point

You can use shortcodes in the “Visual” editor. CodePen Embeds are copy-and-paste HTML that don’t work when using the editor that way. If you ever use the Visual editor in WordPress, you’ll probably want to use this plugin.

You can set a default theme, or override any theme set via Shortcode attribute.

Hopefully eventually this plugin will have more functionality. Like have a fancy UI for picking Pens to embed and more control over the HTML output.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon