Title: oEmbed styling
Author: honza.skypala
Published: <strong>2010 年 8 月 24 日</strong>
Last modified: 2016 年 1 月 13 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/oembed-styling/assets/icon-256x256.jpg?rev=971676)

# oEmbed styling

 作者：[honza.skypala](https://profiles.wordpress.org/honzaskypala/)

[下载](https://downloads.wordpress.org/plugin/oembed-styling.1.1.zip)

 * [详情](https://cn.wordpress.org/plugins/oembed-styling/#description)
 * [评价](https://cn.wordpress.org/plugins/oembed-styling/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/oembed-styling/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/oembed-styling/#developers)

 [支持](https://wordpress.org/support/plugin/oembed-styling/)

## 描述

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.)

### 授权

WTFPL License 2.0 applies

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

    Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

    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.
    ```

## 屏幕截图

 * [[
 * The HTML code (provided by oEmbed) is wrapped in div tags (marked)

## 安装

 1. Upload the plugin into wp-content/plugins.
 2. Activate it in the plugin administration.
 3. Modify file style.css in your theme and add formatting for oembed classes

## 评价

![](https://secure.gravatar.com/avatar/0af0077b6897c9ba710f94ed4feea2e4bfcd9ab6da89c88fbfb0ef2d6fa4ba5a?
s=60&d=retro&r=g)

### 󠀁[Amazing plugin](https://wordpress.org/support/topic/amazing-plugin-685/)󠁿

 [Ben Gray](https://profiles.wordpress.org/bravoechon/) 2017 年 3 月 16 日

Awesome plugin – this functionality should be part of the WordPress core, in my 
opinion. Thanks for developing it.

 [ 阅读所有2条评价 ](https://wordpress.org/support/plugin/oembed-styling/reviews/)

## 贡献者及开发者

「oEmbed styling」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ honza.skypala ](https://profiles.wordpress.org/honzaskypala/)

[帮助将「oEmbed styling」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/oembed-styling)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/oembed-styling/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/oembed-styling/)，或通过[RSS](https://plugins.trac.wordpress.org/log/oembed-styling/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/oembed-styling/)。

## 更新日志

#### 1.1

 * converted to class
 * small optimizations
 * flushing oembed cache converted to dirty, but quick method
 * license change

#### 1.0

 * Initial release.

## 额外信息

 *  版本 **1.1**
 *  最后更新：**10 年前**
 *  活跃安装数量 **60+**
 *  WordPress 版本 ** 2.9 或更高版本 **
 *  已测试的最高版本为 **4.4.34**
 *  语言
 * [English (US)](https://wordpress.org/plugins/oembed-styling/)
 * 标签
 * [center](https://cn.wordpress.org/plugins/tags/center/)[css](https://cn.wordpress.org/plugins/tags/css/)
   [oembed](https://cn.wordpress.org/plugins/tags/oembed/)[video](https://cn.wordpress.org/plugins/tags/video/)
   [youtube](https://cn.wordpress.org/plugins/tags/youtube/)
 *  [高级视图](https://cn.wordpress.org/plugins/oembed-styling/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  2 条 5 星评价     ](https://wordpress.org/support/plugin/oembed-styling/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/oembed-styling/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/oembed-styling/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/oembed-styling/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/oembed-styling/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/oembed-styling/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/oembed-styling/reviews/)

## 贡献者

 *   [ honza.skypala ](https://profiles.wordpress.org/honzaskypala/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/oembed-styling/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.honza.info)