Skip to content
Snippets Groups Projects
Commit bac69fa5 authored by Prasath Nadarajah's avatar Prasath Nadarajah
Browse files

sending post ID when updating post

parent 1614dee3
No related merge requests found
......@@ -1196,6 +1196,7 @@ class WP_Push_Syndication_Server {
foreach( $posts as $post ) {
if( in_array( $post['post_guid'], $inserted_posts ) ) {
$post['ID'] = array_search( $post['post_guid'], $inserted_posts );
wp_update_post( $post, true );
} else {
$result = wp_insert_post( $post, true );
......
......@@ -177,7 +177,7 @@ class WP_RSS_Client extends SimplePie implements WP_Client {
'post_date' => date( 'Y-m-d H:i:s', strtotime( $item->get_date() ) ),
'comment_status' => $this->default_comment_status,
'ping_status' => $this->default_ping_status,
'post_guid' => $item->get_id()
'post_guid' => $item->get_id()
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment