[wp-hackers] Using the page_options field to create custom options pages

Callum Macdonald lists.automattic.com at callum-macdonald.com
Wed Sep 12 10:22:49 GMT 2007


Absolutely, good point, I've updated the article. Cheers - Callum.

Moritz 'Morty' Strübe wrote:
> As for the Field Names: Shouldn't that be something like
>
> ...value="<?php echo get_option('field_name') ?: 'default'; ?>"
>
> ?
>
> Cheers
> Morty
>
>
> Callum Macdonald schrieb:
>   
>> G'day,
>>
>> I've just added an article to the codex about creating new options
>> pages based on a technique I discovered a few days ago.
>> http://codex.wordpress.org/Creating_Options_Pages
>>
>> I found that if you set the form action to options.php and create a
>> hidden field called page_options with a comma separated list of the
>> fields on the page that should be mapped to options, WordPress will
>> handle all the saving / redirection / permissions / etc for you.
>>
>> If I've missed anything or there's any errors, please let me know. Any
>> feedback would be most welcome.
>>
>> Cheers,
>>
>>
>> Callum.
>>
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
>>     
>
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>   



More information about the wp-hackers mailing list