wp embed provider
Retrieves oEmbed providers.
Subcommands
| Command | Description |
|---|---|
| wp embed provider list | Lists all available oEmbed providers. |
| wp embed provider match | Gets the matching provider for a given URL. |
wp embed provider list
Lists all available oEmbed providers.
Synopsis
wp embed provider list [--field=<field>] [--fields=<fields>] [--format=<format>] [--force-regex]
Options
[–field=<field>]
: Display the value of a single field.
[–fields=<fields>]
: Limit the output to specific fields.
[–format=<format>]
: Render output in a particular format.
- default: table
- options: table, csv, json
[–force-regex]
: Turn the asterisk-type provider URLs into regexes.
Available Fields
Default fields:
- format
- endpoint
Optional fields:
- regex
Examples
# List format,endpoint fields of available providers.
$ wp embed provider list --fields=format,endpoint
+------------------------------+-----------------------------------------+
| format | endpoint |
+------------------------------+-----------------------------------------+
| #https?://youtu.be/.*#i | https://www.youtube.com/oembed |
| #https?://flic.kr/.*#i | https://www.flickr.com/services/oembed/ |
| #https?://wordpress.tv/.*#i | https://wordpress.tv/oembed/ |
wp embed provider match
Gets the matching provider for a given URL.
Synopsis
wp embed provider match <url> [--discover] [--limit-response-size=<size>] [--link-type=<json|xml>]
Options
<url>
: URL to retrieve provider for.
[–discover]
: Whether to use oEmbed discovery or not. Defaults to true.
[–limit-response-size=<size>]
: Limit the size of the resulting HTML when using discovery. Default 150 KB. Not compatible with ‘no-discover’.
[–link-type=<json|xml>]
: Whether to accept only a certain link type when using discovery. Defaults to any (json or xml), preferring json.
Examples
# Get the matching provider for the URL.
$ wp embed provider match https://www.youtube.com/watch?v=dQw4w9WgXcQ
https://www.youtube.com/oembed