[WordPress] 外掛分享: oEmbed styling

前言介紹

  • 這款 WordPress 外掛「oEmbed styling」是 2010-08-23 上架。
  • 目前有 60 個安裝啟用數。
  • 上一次更新是 2016-01-13,距離現在已有 3399 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 外掛最低要求 WordPress 2.9 以上版本才可以安裝。
  • 有 2 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

honzaskypala |

外掛標籤

css | video | center | oembed | youtube |

內容簡介

oEmbed 是 WordPress 2.9 版本所新增的內容,提供良好的功能支援。然而生成的 oEmbed 代碼難以容易地置中於文字之中,尤其是常見的要求。這個外掛允許置中 (或其它樣式),儘管它本身無法解決這個問題,但卻可以做到這一點。

這個外掛將所有 oEmbed 代碼包裝成 div 標籤並設置數個類別:

oembed
oembed-mediatype(例如 oembed-video)
oembed-server(例如 oembed-youtube-com)
oembed-mediatype-server(例如 oembed-video-youtube-com)

接下來,您可以在主題 CSS 檔案(style.css)中指定嵌入的行為方式。例如,輸入以下樣式的程式碼:

.oembed {
text-align: center;
}

您就可以讓所有的 oembed(視頻和圖片)都是置中的;如果您懂得 CSS,您不受置中限制,還可以添加更多的東西(如圖片周圍的框架等)

授權

使用 WTFPL License 2.0 授權

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

原文外掛簡介

Support for oEmbed, which was added to WordPress in version 2.9, is very nice. Unfortunately the generated oEmbed code is not easy to be centered in the text, which is a common request. This plug-in allows for centering (or even other styling), although it will not solve it by itself, just makes it possible.
This plugin wraps all oEmbed code into div tags with several classes set:

oembed
oembed-mediatype (e.g. oembed-video)
oembed-server (e.g. oembed-youtube-com)
oembed-mediatype-server (e.g. oembed-video-youtube-com)

Then you can specify in your theme CSS (in the file style.css) the way you want the embeds to behave. E.g. by adding the following code to style.css:

.oembed {
text-align: center;
}

you will make all oembeds (videos and pictures) to be centered; anyway, if you understand CSS, you are not limited by centering, but you can add much more (like frames around pictures etc.)
License
WTFPL License 2.0 applies
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

各版本下載點

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

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


1.0 | 1.1 | trunk |

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

  • Media Focus Point 》總結:該外掛可幫助您管理圖片和影片背景,設定特定焦點,即使圖像或影片被調整大小或背景更改時,焦點會確保所選區域保持可見並置中。不論您使用響應式佈局...。
  • Vertical Center 》Vertical Center 可讓您輕鬆垂直置中元素。, 功能, , 可獨立垂直置中無限數量的元素, 可指定簡單的 CSS/jQuery 選擇器以定位元素, 易於使用的管理介面, 網頁...。

文章
Filter
Apply Filters
Mastodon