<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Consolas","serif";}
span.linenum
        {mso-style-name:linenum;}
span.comment
        {mso-style-name:comment;}
span.keyword
        {mso-style-name:keyword;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>David,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Any chance you can post a snippet (better yet a diff) showing
what exactly you changed to support your custom post types?&nbsp; If possible, I&#8217;d
like to generalize it and submit a formal patch &#8230;<o:p></o:p></span></p>

<p class=MsoNormal><a name="_MailEndCompose"><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></a></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
wp-xmlrpc-bounces@lists.automattic.com
[mailto:wp-xmlrpc-bounces@lists.automattic.com] <b>On Behalf Of </b>David Weiss<br>
<b>Sent:</b> Wednesday, July 07, 2010 6:07 PM<br>
<b>To:</b> wp-xmlrpc@lists.automattic.com<br>
<b>Subject:</b> [wp-xmlrpc] Handling Custom Post Types in WP 3.0 via XMLRPC<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>FYI, I wanted to use Custom Post Types and WP 3.0 in a new
blog and manage content via XMLRPC.<o:p></o:p></p>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>XMLRPC.php isn't updated to handle this, it seems.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>mw_NewPost just needs a tweak to get it to work.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<div><pre><a name=l1993><span class=linenum><span style='color:#555555'>1993</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="_variables/post_type.html"><span style='color:#882222;text-decoration:
none'>$post_type</span></a> = 'post';<o:p></o:p></pre><pre><a name=l1994><span
class=linenum><span style='color:#555555'>1994</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="_variables/page_template.html"><span style='color:#882222;text-decoration:
none'>$page_template</span></a> = '';<o:p></o:p></pre><pre><a name=l1995><span
class=linenum><span style='color:#555555'>1995</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( !<a
href="_functions/empty.html"><span style='color:#116611;text-decoration:none'>empty</span></a>( <a
href="_variables/content_struct.html"><span style='color:#882222;text-decoration:
none'>$content_struct</span></a>['post_type'] ) ) {<o:p></o:p></pre><pre><a
name=l1996><span class=linenum><span style='color:#555555'>1996</span></span></a>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ( <a
href="_variables/content_struct.html"><span style='color:#882222;text-decoration:
none'>$content_struct</span></a>['post_type'] == 'page' ) {<o:p></o:p></pre><pre><a
name=l1997><span class=linenum><span style='color:#555555'>1997</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="_variables/cap.html"><span style='color:#882222;text-decoration:none'>$cap</span></a> = ( <a
href="_variables/publish.html"><span style='color:#882222;text-decoration:none'>$publish</span></a> ) ? 'publish_pages' : 'edit_pages';<o:p></o:p></pre><pre><a
name=l1998><span class=linenum><span style='color:#555555'>1998</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="_variables/error_message.html"><span style='color:#882222;text-decoration:
none'>$error_message</span></a> = <a href="_functions/__.html"><span
style='color:#116611;text-decoration:none'>__</span></a>( 'Sorry, you are not allowed to publish pages on this site.' );<o:p></o:p></pre><pre><a
name=l1999><span class=linenum><span style='color:#555555'>1999</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="_variables/post_type.html"><span style='color:#882222;text-decoration:
none'>$post_type</span></a> = 'page';<o:p></o:p></pre><pre><a name=l2000><span
class=linenum><span style='color:#555555'>2000</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if ( !<a
href="_functions/empty.html"><span style='color:#116611;text-decoration:none'>empty</span></a>( <a
href="_variables/content_struct.html"><span style='color:#882222;text-decoration:
none'>$content_struct</span></a>['wp_page_template'] ) )<o:p></o:p></pre><pre><a
name=l2001><span class=linenum><span style='color:#555555'>2001</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a
href="_variables/page_template.html"><span style='color:#882222;text-decoration:
none'>$page_template</span></a> = <a href="_variables/content_struct.html"><span
style='color:#882222;text-decoration:none'>$content_struct</span></a>['wp_page_template'];<o:p></o:p></pre><pre><a
name=l2002><span class=linenum><span style='color:#555555'>2002</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } elseif ( <a
href="_variables/content_struct.html"><span style='color:#882222;text-decoration:
none'>$content_struct</span></a>['post_type'] == 'post' ) {<o:p></o:p></pre><pre><a
name=l2003><span class=linenum><span style='color:#555555'>2003</span></span></a>&nbsp; <span
class=comment><i><span style='color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// This is the default, no changes needed</span></i></span><o:p></o:p></pre><pre><a
name=l2004><span class=linenum><span style='color:#555555'>2004</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<o:p></o:p></pre><pre><a
name=l2005><span class=linenum><span style='color:#555555'>2005</span></span></a>&nbsp; <span
class=comment><i><span style='color:#444444'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// No other post_type values are allowed here</span></i></span><o:p></o:p></pre><pre><a
name=l2006><span class=linenum><span style='color:#555555'>2006</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return <span
class=keyword><b>new </b></span><a href="_classes/ixr_error.html"><span
style='color:#2222FF;text-decoration:none'>IXR_Error</span></a>( 401, <a
href="_functions/__.html"><span style='color:#116611;text-decoration:none'>__</span></a>( 'Invalid post type.' ) );<o:p></o:p></pre><pre><a
name=l2007><span class=linenum><span style='color:#555555'>2007</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></pre><pre><a
name=l2008><span class=linenum><span style='color:#555555'>2008</span></span></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></pre><pre><o:p>&nbsp;</o:p></pre><pre>I just edited up the if/elseif/else to take into account my custom post type names, and set the post_type key/value to the appropriate post type in my client.<o:p></o:p></pre><pre>Works fine so far.<o:p></o:p></pre></div>

</div>

</body>

</html>