From 322baa914d6afae59020d4f04dc949e7ee3fb51d Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 15 Nov 2008 18:04:09 +0000 Subject: [PATCH] Check proper caps when publising a page. Props DD32. fixes #8208 git-svn-id: http://svn.automattic.com/wordpress/trunk@9715 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 4c2fbcef78..30c926cd31 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -883,7 +883,7 @@ function inline_edit_row( $type ) { $hidden = array_intersect( array_keys( $columns ), array_filter( (array) get_user_option( "manage-$type-columns-hidden" ) ) ); $col_count = count($columns) - count($hidden); $m = ( isset($mode) && 'excerpt' == $mode ) ? 'excerpt' : 'list'; - $can_publish = current_user_can('publish_posts'); + $can_publish = current_user_can("publish_{$type}s"); $core_columns = array( 'cb' => true, 'date' => true, 'title' => true, 'categories' => true, 'tags' => true, 'comments' => true, 'author' => true ); ?> @@ -932,7 +932,7 @@ function inline_edit_row( $type ) { id ); // TODO: ROLE SYSTEM + $authors = get_editable_user_ids( $current_user->id, true, $type ); // TODO: ROLE SYSTEM if ( $authors && count( $authors ) > 1 ) : $users_opt = array('include' => $authors, 'name' => 'post_author', 'class'=> 'authors', 'multi' => 1); if ( $bulk )