Support » Plugins » Non-OEmbed code not working

  • I have copied the code below from a working embed plugin that I wrote and changed the regex to what this service requires and changed the embed to match what the service generates. However the plugin acts like the post content is not being filtered at all. I verified that the regex is matching what I want it to match using a regex checker service. I have tried simplifying the regex and embed to something like #dog/(.+)# and hello %1$s and it doesn’t replace dog/abd with hello abd. I’m stumped.

    wp_embed_register_handler( 'woosterembed', '#rtmp://adobeflash\.wooster\.edu/vod/(.+)#', 'wp_embed_handler_woosterembed' );
    function wp_embed_handler_woosterembed( $matches, $attr, $url, $rawattr ) {
    	$embed = sprintf(
    			'<object id="flowplayer" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" data="" type="application/x-shockwave-flash"><param name="movie" value="" /><param name="allowfullscreen" value="true" /><param name="flashvars" value=\'config={"key":"#$28d4f4f3f205e518e4a","clip":{"provider":"rtmp","live":true,"url":"mp4:%1$s","autoBuffering":true,"autoPlay":false},"plugins":{"rtmp":{"url":"flowplayer.rtmp.swf","netConnectionUrl":"rtmp://"}}}\' /></object>',
    	return apply_filters( 'embed_woosterembed', $embed, $matches, $attr, $url, $rawattr );
  • The topic ‘Non-OEmbed code not working’ is closed to new replies.