smeTea

System wide configuration : allow Author/Contributor edit assigned pages and posts

There are “Author and Contributor” roles in wordpress and we may change the author of the added Page and Post in WordPress (2.7.1). So I think they may edit even the “Pages” that added by “Editor” and assigned to them as Pages/Posts author for they to have the ability to modify in future. So I have two requests.

1. A way to configure the system on allowing them edit some pages and/or posts that are assigned to them.

2. A way to configure the system on disabling them “Add New Posts”.

29/05/2009 Posted by | codeX, smeTea | Leave a comment

function wp_list_authors and exclude_admin option

Hi, I would like to suggest wordpress and any of you consider to modify the function : wp_list_authors to handle the option exclude_admin.

foreach ( (array) $users as $user ) {
if ($exclude_admin && $user->meta_value == ‘a:1:{s:13:”administrator”;b:1;}’)
continue;

$author_ids[] = $user->user_id;
}

$authors = $wpdb->get_results( “SELECT ID, user_nicename from $wpdb->users WHERE ID IN($author_ids) ”
. ($exclude_admin ? “AND user_login <> ‘admin’ ” : ”) .
“ORDER BY display_name” );

The original in 2.7.1 will exclude the login “admin” only. The modified will be more flexible to exclude all user with the role of “administrator”.

Mark

21/05/2009 Posted by | codeX | 1 Comment