Skip to content
Snippets Groups Projects
Commit 5dfc2844 authored by Mohammad Jangda's avatar Mohammad Jangda
Browse files

New filters: syn_pull_edit_post and syn_pull_new_post.

Allow modifying the post before ingesting.
parent 57c5cfe3
No related branches found
No related tags found
No related merge requests found
......@@ -1233,6 +1233,9 @@ class WP_Push_Syndication_Server {
continue;
$post['ID'] = $post_id;
$post = apply_filters( 'syn_pull_edit_post', $post, $site, $client );
$result = wp_update_post( $post, true );
do_action( 'syn_post_pull_edit_post', $result, $post, $site, $transport_type, $client );
......@@ -1242,6 +1245,8 @@ class WP_Push_Syndication_Server {
if ( true === $pull_new_shortcircuit )
continue;
$post = apply_filters( 'syn_pull_new_post', $post, $site, $client );
$result = wp_insert_post( $post, true );
do_action( 'syn_post_pull_new_post', $result, $post, $site, $transport_type, $client );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment