內容簡介
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 <[email protected]>
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.
