| | 225 | * Prevents uneditable posts from being displayed in wp-admin/edit.php |
| | 226 | * |
| | 227 | * @package WordPress |
| | 228 | * @since 2.8 |
| | 229 | * |
| | 230 | * @param array $request |
| | 231 | * @param array updated request vars |
| | 232 | */ |
| | 233 | function hide_uneditable_posts($request) { |
| | 234 | global $user_ID; |
| | 235 | |
| | 236 | $type = $request['post_type']; |
| | 237 | |
| | 238 | if ( is_admin() and !current_user_can("edit_others_{$type}s") ) |
| | 239 | $request['author'] = $user_ID; |
| | 240 | |
| | 241 | return $request; |
| | 242 | } |
| | 243 | add_filter( 'request', 'hide_uneditable_posts'); |
| | 244 | |
| | 245 | /** |