This code uses the add_filter function to modify the simple_history/user_can_clear_log filter. The __return_false function is a built-in WordPress function that simply returns false. This will effectively disable the “Clear log” button for all users.
You need to add the snippet above to for example your functions.phpfile.