Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I created a plugin you can see here:

Some users are saying that settings aren't saving. For me it's working fine but I'm fairly new to php and absolutely new to the settings api, so I'm just wondering if I did something wrong or incorrectly that could be leading to this? Though ike I said, it's working just fine for me that's why I'm confused...

Here's the pastebin of my options.php:

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here are few remarks after skimming through your code:

  • you are using options name like id, title and global. You should use a prefix on these names, like vegas_, to avoid possible problems with other stuff using these option names.

  • you should let the users know about validation problems (check out the add_settings_error() function)

  • use trim() on your text fields values when you save.

  • use esc_attr() to escape your HTML attributes.

  • develope your plugin with WP_DEBUG activated, so you can catch any errors before you ship your plugin.

Hopefully this will bring you closer to a resolution ;-)


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.