Everytime a new feed item is added to the posts it uses the following structure:
However I'm trying to add the permalink for each item, I've tried adding the url as a function parameter to pass it in but I'm having no luck..
Any Ideas?
PHP:
$postid = wp_insert_post(array(
'post_title' => $title,
'post_content' => $content,
'post_content_filtered' => $content,
'post_category' => $category,
'post_status' => $status,
'post_author' => $authorid,
'post_date' => $date,
'comment_status' => $comment_status,
'ping_status' => $allowpings,
));
However I'm trying to add the permalink for each item, I've tried adding the url as a function parameter to pass it in but I'm having no luck..
PHP:
$postid = $this->insertPost($wpdb->escape($item->get_title()), $wpdb->escape($content), $date, $categories, $campaign->posttype, $campaign->authorid, $campaign->allowpings, $campaign->comment_status, $meta, $item->get_permalink());
PHP:
function insertPost($title, $content, $timestamp = null, $category = null, $status = 'draft', $authorid = null, $allowpings = true, $comment_status = 'open', $meta = array(), $url)
PHP:
$postid = wp_insert_post(array(
'post_title' => $title,
'post_content' => $content,
'post_content_filtered' => $content,
'post_category' => $category,
'post_status' => $status,
'post_author' => $authorid,
'post_date' => $date,
'comment_status' => $comment_status,
'ping_status' => $allowpings,
'url' => $url
));
Any Ideas?