PHP Guru’s Help Needed.
-
I recently made a hack into the wp-admin/edit.php file so that when users (authors/contributors/etc.) were in their backend and managing their posts, they only saw the posts they had made, not everyone esle’s.
I found this line:
wp(“what_to_show=posts$post_status_q&posts_per_page=15&order=$order&orderby=$orderby”);
and replaced it with the following:
$thisauthor=”;
if (!current_user_can(‘edit_others_posts’))
$thisauthor = ‘&author=’ . $user_ID;
wp(‘what_to_show=posts&posts_per_page&=15&order=$order&orderby=$orderby’ . $thisauthor);That did the trick. But now when I use the filter post option (pending review, published, any), it doesn’t work.
Any idea how I can get both functions to work?
Thanks for any suggestions.
- The topic ‘PHP Guru’s Help Needed.’ is closed to new replies.