• ProdigyMike

    (@prodigymike)


    Hello,

    Awesome plugin! I just have one little issue as of late:

    The video element isn’t working correctly. I’m trying to add a YouTube video (or Vimeo) and all that is output is:

    <html><head></head><body></body></html>

    Any suggestions to fix this? Or am I doing something wrong?

    Thanks!

    https://wordpress.org/plugins/wr-pagebuilder/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Adam

    (@hieudm)

    Hi @prodigymike,

    May I know your site url so I can have a look at the problem ?

    Thread Starter ProdigyMike

    (@prodigymike)

    Sure, http://testing.m-wurx.com/video-error/

    It appears to be an issue with the theme used – bones starter theme for WP. This works on the latest default WP theme, Twenty Fifteen.

    Thread Starter ProdigyMike

    (@prodigymike)

    Adam,

    Thanks for your prompt support. I have narrowed down the issued to be a piece of code I’m using. Specifically, it’s to add shortcodes into the editor.

    This line (from shortcode editor plugin) creates the issue:

    add_filter('widget_text', 'webtreats_formatter', 99);

    The function called:

    function webtreats_formatter($content) {
        $new_content = '';
    
        /* Matches the contents and the open and closing tags */
        $pattern_full = '{(\[raw\].*?\[/raw\])}is';
    
        /* Matches just the contents */
        $pattern_contents = '{\[raw\](.*?)\[/raw\]}is';
    
        /* Divide content into pieces */
        $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);
    
        /* Loop over pieces */
        foreach ($pieces as $piece) {
            /* Look for presence of the shortcode */
            if (preg_match($pattern_contents, $piece, $matches)) {
    
                /* Append to content (no formatting) */
                $new_content .= $matches[1];
            } else {
    
                /* Format and append to content */
                $new_content .= wptexturize(wpautop($piece));
            }
        }
    
        return $new_content;
    }

    Just wanted to paste this incase you run across this in the future.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Video not working’ is closed to new replies.