wp_embed_handler_youtube

The timeline below displays how wordpress function wp_embed_handler_youtube has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 5.1

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf('https://youtube.com/watch?v=%s', urlencode($matches[2])));
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 7.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.7

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 6.4

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 6.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 6.2

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .10

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.6

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filters the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 5.7

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 5.4

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .30

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 5.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 5.2

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .10

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.5

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.8

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.4

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .30

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.2

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .10

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.4

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 3.9

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 3.4

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .30

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 3.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 3.2

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .10

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @global WP_Embed $wp_embed
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 2.4

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .30

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 2.3

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 2.2

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .13

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.2

/**
 * YouTube iframe embed handler callback.
 *
 * Catches YouTube iframe embed URLs that are not parsable by oEmbed but can be translated into a URL that is.
 *
 * @since 4.0.0
 *
 * @param array  $matches The RegEx matches from the provided regex when calling
 *                        wp_embed_register_handler().
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 1.5

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .40

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 1.4

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .30

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 1.3

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 1.2

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .16

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 0.4

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .30

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 0.3

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .20

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 0.2

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: .16

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed(sprintf("https://youtube.com/watch?v=%s", urlencode($matches[2])));
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}

WordPress Version: 4.0

/**
 * YouTube embed handler callback.
 *
 * Catches URLs that can be parsed but aren't supported by oEmbed.
 *
 * @since 4.0.0
 *
 * @param array  $matches The regex matches from the provided regex when calling
 *                        {@see wp_embed_register_handler()}.
 * @param array  $attr    Embed attributes.
 * @param string $url     The original URL that was matched by the regex.
 * @param array  $rawattr The original unmodified attributes.
 * @return string The embed HTML.
 */
function wp_embed_handler_youtube($matches, $attr, $url, $rawattr)
{
    global $wp_embed;
    $embed = $wp_embed->autoembed("https://youtube.com/watch?v={$matches[2]}");
    /**
     * Filter the YoutTube embed output.
     *
     * @since 4.0.0
     *
     * @see wp_embed_handler_youtube()
     *
     * @param string $embed   YouTube embed output.
     * @param array  $attr    An array of embed attributes.
     * @param string $url     The original URL that was matched by the regex.
     * @param array  $rawattr The original unmodified attributes.
     */
    return apply_filters('wp_embed_handler_youtube', $embed, $attr, $url, $rawattr);
}