simplified code for pending widgets

this is what happens when learning php