From 2bfbac19a7dc396c95cbd7790bbd5d768e4ef306 Mon Sep 17 00:00:00 2001
From: Mohammad Jangda <batmoo@gmail.com>
Date: Thu, 4 Jul 2013 01:10:40 -0400
Subject: [PATCH] Two new filters for XMLRPC Push client

To allow modifying post data before creating or updating.
---
 includes/class-syndication-wp-xmlrpc-client.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/includes/class-syndication-wp-xmlrpc-client.php b/includes/class-syndication-wp-xmlrpc-client.php
index ec1a91a..1074cad 100644
--- a/includes/class-syndication-wp-xmlrpc-client.php
+++ b/includes/class-syndication-wp-xmlrpc-client.php
@@ -66,6 +66,8 @@ class Syndication_WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements Syndica
 
 		$args['custom_fields'] = $this->_get_custom_fields( $post_ID );
 
+		$args = apply_filters( 'syn_xmlrpc_push_new_post_args', $args, $post );
+
 		$result = $this->query(
 			'wp.newPost',
 			'1',
@@ -104,6 +106,8 @@ class Syndication_WP_XMLRPC_Client extends WP_HTTP_IXR_Client implements Syndica
 
 		$args['custom_fields'] = $this->_get_custom_fields( $post_ID );
 
+		$args = apply_filters( 'syn_xmlrpc_push_edit_post_args', $args, $post );
+
 		$result = $this->query(
 			'wp.editPost',
 			'1',
-- 
GitLab