adding condition to run code for admin-footer