Remove the “View” Link in Post Admin

add_filter( 'post_row_actions', 'remove_row_actions', 10, 1 );

function remove_row_actions( $actions )
{
    if( get_post_type() === 'my_cpt' )
        unset( $actions['view'] );
    return $actions;
}

Should see you through 🙂

The $actions array consists of the following:

$actions['edit'] 
$actions['inline hide-if-no-js'] 
$actions['trash'] 
$actions['view'] 

To modify users grid view ‘user_row_actions‘ filter can be used.

For future reference.

Leave a Comment

error code: 523