[wp-trac] [WordPress Trac] #18429: Create custom post types via XMLRPC
WordPress Trac
wp-trac at lists.automattic.com
Tue Feb 7 14:17:46 UTC 2012
#18429: Create custom post types via XMLRPC
----------------------------+------------------------
Reporter: nprasath002 | Owner: westi
Type: task (blessed) | Status: reviewing
Priority: normal | Milestone: 3.4
Component: XML-RPC | Version:
Severity: normal | Resolution:
Keywords: has-patch |
----------------------------+------------------------
Comment (by nprasath002):
Replying to [comment:41 markoheijnen]:
> Do we have to? if we send a post_id with new post that is has the value:
null. Shouldn't that work as well?
New posts must check plurals like
{{{
current_user_can( 'publish_posts' );
}}}
existing posts must check singular
{{{
current_user_can( 'publish_post', $post_id );
}}}
considering proper error messages like 'you cannot create posts' and 'you
cannot edit this post'
i think we must have two seperate code segments.
One think we can do is pass a variable $update to _wp_insert_post
and have everything inside _wp_insert_post.
$update might help in future problems also
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18429#comment:42>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list