PHP: functions: register and display sidebar