Remove edit, view, trash and quick edit links within posts admin

Adding this snippet to the functions.php of your wordpress theme will remove the edit, view, trash and quick edit links that you see when you mouse over a post.

 

 

add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );
function remove_row_actions( $actions )
{
if( get_post_type() === 'post' )
unset( $actions['edit'] );
unset( $actions['view'] );
unset( $actions['trash'] );
unset( $actions['inline hide-if-no-js'] );
return $actions;
}

Leave a comment