Links At Top Of Edit Page
-
Made the edits shown below to wp-admin/edit.php so as to only show “My Posts” and remove other links on the ‘edit posts’ page. for users less than access level 4 .
Only editors & administrators can access the other links.
Subscribers & Contributors only see “My Posts” optionIs there any other way / plugin where I would not have to edit core wordpress files?
/*My Edit Start*/ global $current_user; get_currentuserinfo(); if ($current_user->user_level > 4) { /*My Edit End*/ $status_links[] = "<li><a href='edit.php{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>'; foreach ( $post_stati as $status => $label ) { $class = ''; if ( !in_array( $status, $avail_post_stati ) ) continue; if ( empty( $num_posts->$status ) ) continue; if ( isset($_GET['post_status']) && $status == $_GET['post_status'] ) $class = ' class="current"'; $status_links[] = "<li><a href='edit.php?post_status=$status'$class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; } /*My Edit Start*/ } /*My Edit End*/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Links At Top Of Edit Page’ is closed to new replies.