How to Remove the “Restore” Link in Quick Edit?

I want to know is there any hook to remove the Restore link in the edit page – trash page?

/wp-admin/edit.php?post_status=trash

Read More

I know I can hide it with a css/jquery trick, but I prefer to use a hook for this.

enter image description here

Related posts

Leave a Reply

1 comment

  1. This will do:

    add_filter('post_row_actions', 'wpse_56560_remove_untrash', 10, 2);
    add_filter('page_row_actions', 'wpse_56560_remove_untrash', 10, 2);
    
    function wpse_56560_remove_untrash( $actions, $post ) 
    {
        if( !isset( $actions['untrash'] ) ) 
            return $actions;
    
        // If NOT administrator, remove Untrash
        if( !current_user_can('administrator') )
            unset( $actions['untrash'] );
    
        return $actions; 
    }