_wp_oembed_get_object example


function wp_oembed_get( $url$args = '' ) {
    $oembed = _wp_oembed_get_object();
    return $oembed->get_html( $url$args );
}

/** * Returns the initialized WP_oEmbed object. * * @since 2.9.0 * @access private * * @return WP_oEmbed object. */
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 ) {
                    
Home | Imprint | This part of the site doesn't use cookies.