[wp-trac] [WordPress Trac] #31068: oEmbed Podbean player support podbean.com embed player URLs
WordPress Trac
noreply at wordpress.org
Fri Apr 10 00:52:32 UTC 2015
#31068: oEmbed Podbean player support podbean.com embed player URLs
-------------------------------------------------+-------------------------
Reporter: podbean | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Embeds | Version: 4.1
Severity: normal | Resolution: maybelater
Keywords: has-patch needs-refresh 2nd-opinion | Focuses:
-------------------------------------------------+-------------------------
Comment (by phongmedia):
I was easily able to add Podbean support to my website via the
`oembed_providers` filters, as such:
{{{
/**
* Add Support for PodBean Embed URLs
* @link https://core.trac.wordpress.org/ticket/31068
* @see wp_oembed_get()
* @param $providers [array] Existing oEmbed Providers
* @return [array] Providers with custom additions
*/
function theme_oembed_providers( $providers ){
// Add Support for Podbean Player URLs like
// http://www.podbean.com/media/player/hk8en-
5329e8/initByJs/1/auto/1
$providers['#https?://(www\.)?podbean\.com/media/player/.*#i'] =
array( 'http://www.podbean.com/media/oembed', true );
return $providers;
}
add_filter( 'oembed_providers', 'theme_oembed_providers' );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31068#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list