class My_Custom_Module extends myCRED_Hook { public function __construct() { parent::__construct( 'My_Custom_Module', array( 'module_name' => 'custom', 'defaults' => array( 'field_name' => '', ), 'register' => false, 'add_to_core' => true ) ); } public function after_general_settings() { echo '
Custom settings output.
'; } public function sanitize_extra_settings($new_data, $data, $core) { if (isset($data['custom']['field_name'])) { $new_data['custom']['field_name'] = sanitize_text_field($data['custom']['field_name']); } return $new_data; } }