Fixed nested functions
WPCS & Whitespace

Added optional braces and fixed some whitespace issues.
WPCS & Whitespace

Added optional braces, fixed whitespace, and removed closing php tag.
WPCS & Whitespace

Added spaces and removed extra whitespace.
WPCS & Whitespace
WPCS & Whitespace
WPCS & Whitespace

Added optional braces and removed closing php tag.
WPCS & Whitespace

Fixed spacing and removed closing php tag.
WPCS & Whitespace
Removed closing php tag
WPCS & Whitespace