Update custom_field.php

Make it class extension friendly, especially for method addCustomField