How to do sanitization at register_setting()
?
I am learning Plugin Development. I am using below code.
public function settings_page_registration() {
register_setting(
'sports_info_api_key',
'wp_api_key',
array(
'type' => 'string',
'sanitize_callback' => 'sanitize_text_field',
)
);
}
How can I move forward ? What should I write inside sanitize_text_field
function if I would like to receive only text value ?