Support » Fixing WordPress » wp embed register handler on 3.2.1, mistake?

  • caneblu


    Just upgraded to 3.2.1 and my function for wp_embed_register_handler (ha worked fine since last year) as stopped to work. No errors.. but video not appear ad show only the url..
    is changed anything on 3.2.1? changelog did not help me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • caneblu


    only me have this problem?

    I have a similar issue. I am adapting a working video embed plugin I wrote and have just changed function names and regex in the new plugin. I activate the new plugin and test the regex in a post and nothing happens. It’s like the filter for this plugin isn’t firing.

    Hi Jon, i resolved myself the problem. If i remember correctly the problem was on the function. I rewrite it from scratch, wipe the unused variables (the embed i write is for Hope this help you.

    It still isn’t working for me and I’m wondering if it’s because the service isn’t looking for <object><embed></embed></object> syntax in what is being put in in place of the URL. Here is what I have

    wp_embed_register_handler( 'woostervideo', '#rtmp://', 'wp_embed_handler_woostervideo');
    function wp_embed_handler_woostervideo( $matches, $attr, $url, $rawattr ) {
    	$width = get_option('woostervideoautoembed_player_width', '480');
    	$height = get_option('woostervideoautoembed_player_height', '360');
    	$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":"%1$s","autoBuffering":true,"autoPlay":false},"plugins":{"rtmp":{"url":"flowplayer.rtmp.swf","netConnectionUrl":"rtmp://"}}}\' /></object>',
    	return apply_filters( 'embed_woostervideo', $embed, $matches, $attr, $url, $rawattr );

    I check the regex with an online regex testing tool and it is matching exactly what I want. So I’m not sure what is wrong.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘wp embed register handler on 3.2.1, mistake?’ is closed to new replies.