Linux 软件免费装

Responsive oEmbed

开发者 palasthotel
greatestview
更新时间 2019年3月3日 20:42
捐献地址: 去捐款
PHP版本: 4.0 及以上
WordPress版本: 5.1
版权: GNU General Public License v3
版权网址: 版权信息

标签

responsive vimeo youtube soundcloud oembed iframe aspect ratio

下载

1.3 1.1 1.2 1.4 1.4.1

详情介绍:

ATTENTION for WP Version 5+: This plugin does not work with Gutenberg (no problems with Classic Editor plugin though)! Gutenberg brings its own CSS for responsive oEmbed elements, so this plugin would double that and create strange effects. This plugin uses some minimal CSS rules and a wrapping HTML element to maintain the aspect ratio of oEmbed elements with fixed aspect ratio (e. g. YouTube, Vimeo or Soundcloud). Unlike other plugins, this plugin does not use any JavaScript! The aspect ratio is calculated from the (iframe, object or embed) HTML tag width and height attributes. An aspect ratio will only be applied, if both width AND height attributes are given by the oEmbed element and if there is no data-secret attribut set (because those are handled via wp-embed.js). Some oEmbeds have no width or height attributes set, because they calculate their dimension via JavaScript. In those cases this plugin has no effect. You can find a list of all oEmbed sites supported by WordPress here.

安装:

  1. Upload responsive-oembed.zip to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. You’re done! Try pasting a YouTube, Vimeo or any other oEmbed URL into a post. Open the post and resize your browser window, the oEmbed element should scale properly.

更新日志:

1.4.1 1.4 1.3 1.2 1.1 1.0