Changed method for adding span class to widget titles