if ( isset( $args['maxheight'
] ) ) { $args['height'
] =
$args['maxheight'
];
} // Short-circuit process for URLs belonging to the current site.
$data =
get_oembed_response_data_for_url( $url,
$args );
if ( $data ) { return $data;
} $data =
_wp_oembed_get_object()->
get_data( $url,
$args );
if ( false ===
$data ) { // Try using a classic embed, instead.
/* @var WP_Embed $wp_embed */
$html =
$wp_embed->
get_embed_handler_html( $args,
$url );
if ( $html ) { // Check if any scripts were enqueued by the shortcode, and include them in the response.
$enqueued_scripts = array
();
foreach ( $wp_scripts->queue
as $script ) {