From 85b23fe964dc8d2f59cf83aebe66c00b9680a2b6 Mon Sep 17 00:00:00 2001 From: michelvaldrighi Date: Thu, 9 Sep 2004 15:54:03 +0000 Subject: [PATCH] ugh, no wonder the new xmlrpc wouldn't post anything git-svn-id: http://svn.automattic.com/wordpress/trunk@1630 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/functions-post.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wp-includes/functions-post.php b/wp-includes/functions-post.php index eabd87002..d62152fd3 100644 --- a/wp-includes/functions-post.php +++ b/wp-includes/functions-post.php @@ -321,6 +321,15 @@ function trackback_url_list($tb_list, $post_id) { // query user capabilities +/* returns true if a given $user_id can create a new post. + note: optional $blog_id and $category_id for future usage? */ +function user_can_create_post($user_id, $blog_id = 1, $category_id = 'None') { + // rather simplistic. shall evolve with future permission system overhaul + $author_data = get_userdata($user_id); + return ($author_data->user_level > 1); +} + + /* returns true if a given $user_id can edit a given $post_id. note: optional $blog_id for future usage? */ function user_can_edit_post($user_id, $post_id, $blog_id = 1) {