Adding widget visiblity functionality to theme.