Automatic Night Mode Plugin

Is there any guide or example code to add editable user custom fields with a theme?