How do I check if user input in a field in the customizer is a number?
You are right. A couple of fixes/suggestions, though. You should use absint as a sanitization callback. Also, you don’t have to explicitly use the WP_Customize_Control class. The number field can be created with the regular syntax you use for the text field with an exception of the type and additional attributes. Another thing is that … Read more