Languages: English • Shortcode 日本語 (Add your language)
The Embed feature allows you to wrap embedded items using a simple Shortcode to set of a maximum (but not fixed) width and height. This was added as of WordPress 2.9 and is used like this:
[embed]...[/embed]
I have an embedded item, and I want to set max dimensions:
[embed width="123" height="456"]...[/embed]
Note: This shortcode isn't enabled until 'the_content' filter has been processed at least once. If you need to run this shortcode before or without The Loop and aren't using the_content() you'll need to call the following method with the content which contains the [embed] shortcode:
$GLOBALS['wp_embed']->run_shortcode( 'Content with [embed] shortcode' );
The following basic options are supported:
The embed shortcode is located in wp-includes/class-wp-embed.php
.
WordPress Shortcodes:
[audio]
,
[caption]
,
[embed]
,
[gallery]
,
[playlist]
,
[video]