Home Forums Plugin Support WP User Frontend Pro Auto Embed don't work in content post

This topic is: not resolved

Tagged: ,

This topic contains 4 replies, has 3 voices, and was last updated by  HispanicSearching 5 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #14065

    Post count: 15


    when I create or edit a post content with wpuf in the created post oembed from wordpress only display the url and don't display the generated embed. BUT if the same post is edited in wp-admin oembed work.

    I have read http://codex.wordpress.org/Embeds as suggested but I don't find the reason.

    The user creating the post under wpuf is subscriber role.

    Any idea ?



    Post count: 1555

    Please provide your site url, user login and password so we can check it. Also mark your reply as Private reply to keep it safe.


    Post count: 15

    Thank Mahi, I found the error. The problem is when I save the post with wpuf it change all newline with <br /> and put entire content in one line. In this way the regex from autoembed to math url don't work, it's this:

    function autoembed( $content ) {
      return preg_replace_callback( '|^\s*(https?://[^\s"]+)\s*$|im', array( $this,'autoembed_callback' ), $content );

    With this, a line like:

    "fahsflks http://www.youtube.com/watch?v=fusdhfsk sfhsakjf sha"

    will match, but a line like

    "<br />http://www.youtube.com/watch?v=fusdhfsk<br />"


    I don't know why this append using tinymce in wpuf but in wp-admin it don't replace newlines by

    I have check function theme and plugins and don't find who can modify this behaviour in wpuf.

    Any suggestions ?


    Tareq Hasan
    Post count: 2831

    Can you check if that happens with all user role? unfiltered_html permission might create some problem. Please check with admin, author, subscriber and contributor role and let me know ๐Ÿ™‚


    Post count: 15

    Tareq, the same problem with editor and admin role.

    First I thought the same, the unfiltered_html permission, but this is need only for “discover” oembed but if the embed is in the know list it's not need this permission. If I use de [embed][/embed] code it works. The problem I think is how tinymce conver newlines to br's using it in wpuf and in this manner the preg_replace_callback don't match the urls.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Auto Embed don't work in content post’ is closed to new replies.