From be22bea57d3a4ff61d3e685b9485ad1f5fbef49a Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Sun, 23 May 2004 02:55:10 +0000 Subject: [PATCH] make xmlrpc_getpostcategory support multiple, comma-separated categories git-svn-id: http://svn.automattic.com/wordpress/trunk@1347 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index d166e05496..cb27983444 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -629,10 +629,8 @@ function xmlrpc_getposttitle($content) { function xmlrpc_getpostcategory($content) { global $post_default_category; if (preg_match('/(.+?)<\/category>/is', $content, $matchcat)) { - $post_category = $matchcat[0]; - $post_category = preg_replace('//si', '', $post_category); - $post_category = preg_replace('/<\/category>/si', '', $post_category); - + $post_category = trim($matchcat[1], ','); + $post_category = explode(',', $post_category); } else { $post_category = $post_default_category; }