I’m writing a plugin to implement Zach Leatherman’s Critical FOFT with DATA URI, but this is my 1st attempt to create an options page. I’ve gotten as far as adding the menu item and creating the page, but I haven’t got a clue how to create a form that will add my styles to the page head.

I’ve followed this helpful tutorial to get started, but the examples deal with creating a custom taxonomy and then altering the output of the main content area. Can anyone point me to examples of writing an options page that saves the input to the head (preferably in a secure manner that validates/sanitizes)?

I have some code at GitHub if you need clarification about what I’m doing.

Eventually, I’ll need to add an uploader so font files can be stored with the plugin, but let me do some research on that before I ask for help.

Read more here: Writing a plugin options page to add styles to head — any good how-tos?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: