Use oEmbed for PollDaddy. Props Viper007Bond. fixes #12174

git-svn-id: https://develop.svn.wordpress.org/trunk@13021 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2010-02-08 16:15:13 +00:00
parent 2c1ee29143
commit 62e8bf4cea
2 changed files with 14 additions and 30 deletions

View File

@@ -32,21 +32,4 @@ function wp_embed_handler_googlevideo( $matches, $attr, $url, $rawattr ) {
}
wp_embed_register_handler( 'googlevideo', '#http://video\.google\.([A-Za-z.]{2,5})/videoplay\?docid=([\d-]+)(.*?)#i', 'wp_embed_handler_googlevideo' );
/**
* The PollDaddy.com embed handler callback. PollDaddy does not support oEmbed, at least not yet.
*
* @see WP_Embed::register_handler()
* @see WP_Embed::shortcode()
*
* @param array $matches The regex matches from the provided regex when calling {@link 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_polldaddy( $matches, $attr, $url, $rawattr ) {
return apply_filters( 'embed_polldaddy', '<script type="text/javascript" charset="utf8" src="http://s3.polldaddy.com/p/' . esc_attr($matches[1]) . '"></script>', $matches, $attr, $url, $rawattr );
}
wp_embed_register_handler( 'polldaddy', '#http://answers.polldaddy.com/poll/(\d+)(.*?)#i', 'wp_embed_handler_polldaddy' );
?>