wp embed fetch <url>
Attempts to convert a URL into embed HTML
Arguments
Name | Description |
---|
url | URL to retrieve oEmbed data for |
Options
Name | Description |
---|
--width <width> | Width of the embed in pixels |
--height <height> | Height of the embed in pixels |
--post-id <id> | Cache oEmbed response for a given post |
--discover | Enable oEmbed discovery. Defaults to true |
--skip-cache | Ignore already cached oEmbed responses. Has no effect if using the ‘raw’ option, which doesn’t use the cache |
--skip-sanitization | Remove the filter that WordPress from 4.4 onwards uses to sanitize oEmbed responses. Has no effect if using the ‘raw’ option, which by-passes sanitization |
--do-shortcode | If the URL is handled by a registered embed handler and returns a shortcode, do shortcode and return result. Has no effect if using the ‘raw’ option, which by-passes handlers |
--limit-response-size <size> | Limit the size of the resulting HTML when using discovery. Default 150 KB (the standard WordPress limit). Not compatible with ‘no-discover’ |
--raw | Return the raw oEmbed response instead of the resulting HTML. Ignores the cache and does not sanitize responses or use registered embed handlers |
--raw-format <json|xml> | The serialization format for the value |