Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex for option ID #67

Closed
devinsays opened this issue Aug 22, 2011 · 1 comment
Closed

Regex for option ID #67

devinsays opened this issue Aug 22, 2011 · 1 comment

Comments

@devinsays
Copy link
Owner

Comment from user here: http://wptheming.com/options-framework-theme/comment-page-1/#comment-13548

I’ve noticed one thing, don’t know actually if thats a bug or it’s meant to be that way.

My option id looks like this "id" => "logo-url". As you can see I’m using a dash(-). When it saves an option to the database it drops the dash. And when I’m trying to retrieve the option echo of_get_option('logo-url');, it doesn’t retrieve anything. So when retrieving an option I also have to drop the dash from the option name. Using dashes in ids or classes is my old habit and also official WP documentation recommends this way.

I’ve tried using an underscore(_) in my ids and it worked perfectly as in the example theme.

@devinsays
Copy link
Owner Author

Issue fixed on last commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant