WP stripping Embedded code?
-
I am writing a plugin to create Facebook templates from WordPress, when I save embedded code into an option, it Looks like WordPress is stripping out the code.
This is not about embedding into WordPress as the plugin has to create the code for a Facebook Template in HTML and or FBML.
$layout = $layout .'<div class="youtube-video" '.$style.'>' ."\n"; $layout = $layout .'<ul>' ."\n"; $layout = $layout .'<li>' ."\n"; $layout = $layout .'<object width="'.$width.'" height="'.$height.'"><param name="movie" value="http://www.youtube.com/v/'.$newcontent['column-video-'.$counter].'&hl=en&fs=1&rel=0&border=1"></param>' ."\n"; $layout = $layout .'<param name="allowFullScreen" value="true"></param>' ."\n"; $layout = $layout .'<param name="allowscriptaccess" value="always"></param>' ."\n"; $layout = $layout .'<embed src="http://www.youtube.com/v/'.$newcontent['column-video-'.$counter].'&hl=en&fs=1&rel=0&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$width.'" height="'.$height.'"></embed>' ."\n"; $layout = $layout .'</object>' ."\n"; $layout = $layout .'</li>' ."\n"; $layout = $layout .'</ul>' ."\n"; $layout = $layout .'</div>' ."\n";This just saves in the option as:
<div class="youtube-video" style=""> <ul> <li> </li> </ul> </div>I have tried it local and online with the same result, anyone have any ideas, the pluging needs to write the youtube script to html and fbml.
It could be a roles and resposibilities thing, currentluy I am using ‘edit_theme_options’ as I am using the wp_options and admin pages.
More of the function on pastebein: http://digitalraindrops.pastebin.com/Txz4zZXn
Thanks
David
The topic ‘WP stripping Embedded code?’ is closed to new replies.