Help to shape this please
Reported by pedrog | June 14th, 2010 @ 03:13 AM
I read as I can embed videos in wp-o-matic someone can help me
set this up thanks. that there is like entering sanitize_post
/ wp-includes/post.php to insert the code<br/> It says the
what for you and want to do it to insert video but not as I leave
the start because it says your forum, help to solve
thanks:<br/> KBruno November 20th, 2008 @ 04:21 PM<br/>
I found a remedy for imports of most embed, param & object
videos. First in wpomatic.php I added one key to the wp_insert_post
array:<br/> $postid = wp_insert_post(array(
‘post_title’ => $title,<br/>
‘post_content’ => $content,<br/>
‘post\_content\_filtered’ => $content,<br/>
‘post_category’ => $category,<br/>
‘post_status’ => publish,<br/>
‘post_author’ => $authorid,<br/>
‘post_date’ => $date,<br/>
‘comment_status’ => $comment_status,<br/>
‘ping_status’ => $allowpings,<br/> // new key
‘post_wpom’ => yes<br/> ));
Next in the function sanitize_post in /wp-includes/post.php I
added one condition:
function sanitize_post($post, $context = ‘display’)
{
if ( ‘raw’ == $context )
return $post;
if ( is_object($post) ) {
foreach ( array_keys(get_object_vars($post)) as $field )
$post->$field = sanitize_post_field($field, $post->$field,
$post->ID, $context); } else { foreach ( array_keys($post) as
$field )
// changes referer only if called by wpomatic
if(array_key_exists(‘post_wpom’, $post)) {
echo ‘ ‘;
} $post[$field] = sanitize_post_field($field, $post[$field],
$post['ID'], $context); } return $post;
thanks.
Pedrog
pedro_galvez69@hotmail.com
No comments found
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
WP-o-Matic project.