WordPress

Create Custom Options Pages

WordPress custom settings pages are quite useful when you are developing a plugin or a theme. You will definitely need some place in admin area where users can configure your plugin and Settings API is perfect for that.

And yes, we are going to use Settings API which will help us creating our options pages. It was added in WordPress 2.7 only. I really doubt that you are using a WordPress version prior 2.7, but anyway I think I have to mention that.

Below is the screenshot of a settings page we are going to create in this tutorial. I decided to make it simple, so we have multiple fields – a text field and a checkbox.

how to create a WordPress option page with field validation

3 Ways to Add Notification Counter Bubbles to WordPress Admin Menu

How to Display a Column with Users’ Last Login Date / Time

How to Extend the List of Allowed Domains for wp_safe_redirect()

Remove Posts in WordPress Dashboard with AJAX

How to Properly Include CSS and JS in your WordPress Themes and Plugins

RFC 5322 Support for is_email() function. Quick fix.

I was quite suprised when I tested his email something+something@anything.com and found out that the default WordPress function is_email() returns false for this type of emails. In other words, is_email() function isn’t able to validate email addresses with a “+” in it but those are valid email addresses as well as per RFC standard 5322. By the way, if you look at the official documentation of is_email() function, there also said that it is not RFC compliant.