Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Join 44 other followers
Monday: Ben Balter, Jakub Tyrcha, Mihai Chereji
Tuesday: Jacob Gillespie, Lukasz Koprowski
Wednesday: Stas Suscov, Wojtek Szutnik
Thursday: Prasath Nadarajah, Marko Novakovic, David Julia
Friday: Mert Yazicioglu, Anirudh S
Max Cutler, Prasath Nadarajah, and Dan are discussing. Toggle Comments
Nice, we can use a lot of these in the mobile apps if these make it into core someday. Good job!
I have already added patches to the trunk.
i would appreciate if you can have a look 🙂
I’ve been digging through the patches and will have full notes by the review chat tomorrow.
A quick question: what’s the point of wp.getSettings and wp.updateSettings? Are they really necessary when we already have wp.getOptions and wp.setOptions? Unless I’m missing something, I don’t see that the *Settings versions really add anything over the *Options versions…
There two types of options with different permission levels.
For example thumbnail size, image size information must be available for content writers.
Currently there is no cap validation for this.
But other information like admin mail id, mail server password must be validated against ‘manage_options’ cap. That is why i,m dividing options into to two categories and have two different methods.
Blog_options – available for any users
Admin_options – available only for users with ‘manage_options’ cap.
To share admin_options in different functions i declared it as a global variable.
When adding to the trunk it will initialized separately after initializing blog options.
Instead of duplicating so much code, wouldn’t it make more sense to just add an ‘if’ statement to get/setOptions depending on which list of options the requested one falls in? And if it’s in admin_options, you do the manage_options cap check?
Required fields are marked *
Notify me of new comments via email.
← Language Packs – Update 17 (Final) – August, 25th, 2011
WP Document Revisions – Document Management and Version Control for WordPress →
Blog at WordPress.com.