[theme-reviewers] Article on how to create a Theme Options Page for WordPress

Edward Caissie edward.caissie at gmail.com
Fri Jan 7 13:27:05 UTC 2011


Although I agree with the idea that WPTRT tutorials should be consistent, I
would be more inclined to recommend team members post as they see fit (of
course following appropriate conventions is recommended) on their own sites;
but, insist when posting on the http://make.wordpress.org/themes or related
sites they adhere to all WordPress conventions, standards, and guidelines as
closely as possible.


Cais.

On Fri, Jan 7, 2011 at 6:42 AM, Chip Bennett <chip at chipbennett.net> wrote:

> Best practice (and most importantly, the *accepted* best practice with
> respect to WordPress Themes) is to put all options in an array:
>
> 1) It protects your options from potential conflict (which is another
> point: you didn't prefix your options names with "theme-slug")
> 2) It makes white-listing much easier
> 3) It makes manipulating options much easier
> 4) It makes removing options from the DB much easier
> 5) It makes reading the DB much easier
>
> (I'm sure there are more.)
>
> *Any* tutorials put out by the Theme Review Team should be consistent on
> matters of guidelines and best practices. There are some conventions that I
> don't personally like, either - but for the sake of standardization (and not
> creating confusion), I put aside my personal preferences.
>
> Chip
>
>
> On Fri, Jan 7, 2011 at 1:26 AM, Daniel Tara <contact at onedesigns.com>wrote:
>
>> By the way, I personally don’t like having all the options in a single
>> registered array. It’s ugly to call for a global variable’s array key
>> instead of the option directly and it’s confusing to give the name for a
>> HTML input field arrayname[arraykey]. Just my 2 cents on this.
>>
>>
>>
>> Daniel
>>
>>
>>
>> *From:* theme-reviewers-bounces at lists.wordpress.org [mailto:
>> theme-reviewers-bounces at lists.wordpress.org] *On Behalf Of *Daniel Tara
>> *Sent:* Friday, January 07, 2011 9:22 AM
>>
>> *To:* theme-reviewers at lists.wordpress.org
>> *Subject:* Re: [theme-reviewers] Article on how to create a Theme Options
>> Page for WordPress
>>
>>
>>
>> Thanks for the feedback,
>>
>>
>>
>> I corrected the grammar errors, changed the capability to
>> ‘edit_theme_options’, rewritten some portions where I omitted things and
>> bundled the entire code into a child theme for Twenty Ten, which I tested
>> and is working.
>>
>>
>>
>> Daniel
>>
>>
>>
>> *From:* theme-reviewers-bounces at lists.wordpress.org [mailto:
>> theme-reviewers-bounces at lists.wordpress.org] *On Behalf Of *Edward
>> Caissie
>> *Sent:* Thursday, January 06, 2011 3:42 PM
>> *To:* theme-reviewers at lists.wordpress.org
>> *Subject:* Re: [theme-reviewers] Article on how to create a Theme Options
>> Page for WordPress
>>
>>
>>
>> There are a few minor typos and a grammar issue or two, otherwise ... I
>> believe the capability should be 'edit_theme_options' versus
>> 'manage_options' based on Justin Tadlock's discussions.
>>
>> Good Read! Definitely adds more insight into the Settings API.
>>
>>
>>
>> Cais.
>>
>> PS: The first time I clicked on the link it took me to the page, every
>> other time I click or use the URL (copy&paste) it wants to open my feed
>> reader ... EAC
>>
>> On Wed, Jan 5, 2011 at 11:12 PM, Daniel Tara <contact at onedesigns.com>
>> wrote:
>>
>> Thought I make this public,
>>
>>
>>
>> Here’s an article on how to create options pages for WordPress themes
>> using the Settings API
>>
>>
>>
>>
>> http://www.onedesigns.com/tutorials/how-to-create-a-wordpress-theme-options-page
>>
>>
>>
>> I would appreciate any feedback as I probably missed some things out.
>>
>>
>>
>> Daniel
>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>>
>> _______________________________________________
>> theme-reviewers mailing list
>> theme-reviewers at lists.wordpress.org
>> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>>
>>
>
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wordpress.org/pipermail/theme-reviewers/attachments/20110107/62dd3137/attachment.htm>


More information about the theme-reviewers mailing list