Ensures that the specified format is either ‘json’ or ‘xml’.
Parameters
-
$formatstring required -
The oEmbed response format. Accepts
'json'or'xml'.
Source
function wp_oembed_ensure_format( $format ) {
if ( ! in_array( $format, array( 'json', 'xml' ), true ) ) {
return 'json';
}
return $format;
}
Changuelog
| Versionen | Description |
|---|---|
| 4.4.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.