[wp-hackers] Adding custom options to default setting pages
Pier-Luc Petitclerc
pl at fusi0n.org
Wed Oct 7 16:45:54 UTC 2009
If I don't include register_settings the nonce is not recreated and the
opposite behavior happens - the default media options will save but the
third-party ones will not.
On Sat, Oct 3, 2009 at 4:06 AM, Milan Dinić <liste at srpski.biz> wrote:
> But why you need _wpnonce if you use register_setting? Isn't point of that
> function that you don't need to deal with nonces, referer and other
> security
> data?
>
> See
>
> http://planetozh.com/blog/2009/05/handling-plugins-options-in-wordpress-28-with-register_setting/#more-1241
> .
>
> 2009/10/3 Pier-Luc Petitclerc <pl at fusi0n.org>
>
> > WP-prettyPhoto PHP Source: http://pastebin.ca/1590213
> > HTML Source of Media Settings Page: http://pastebin.ca/1590214
> >
> > On Sat, Oct 3, 2009 at 12:29 AM, John Blackbourn
> > <johnbillion+wp at gmail.com <johnbillion%2Bwp at gmail.com> <
> johnbillion%2Bwp at gmail.com <johnbillion%252Bwp at gmail.com>><
> > johnbillion%2Bwp at gmail.com <johnbillion%252Bwp at gmail.com> <
> johnbillion%252Bwp at gmail.com <johnbillion%25252Bwp at gmail.com>>>
> > > wrote:
> >
> > > Hi Peir-Luc,
> > >
> > > Attachments to the list get removed. Try pastebin.ca or upload the
> > > code and send us a link.
> > >
> > > John
> > >
> > > 2009/10/3 Pier-Luc Petitclerc <pl at fusi0n.org>:
> > > > Hey wp-hackers.
> > > >
> > > > I have a question for you regarding the Settings API. See, I decided
> > that
> > > my
> > > > plugin, WP-prettyPhoto, shouldn't have an options page on its own,
> > since
> > > > it's proper to put inside an already existing section (Settings >
> > Media).
> > > My
> > > > problem with that idea is that I have no choice but to overwrite the
> > > > _wpnonce field using settings_field(). Doing that in an default
> section
> > > > makes it so that my custom options will process and save, but the
> > default
> > > > ones will not. I've attached the plugin code as well as the Media
> > > Settings
> > > > page source so that you can get an idea. What am I doing wrong?
> > > >
> > > > --
> > > > - pL
> > > >
> > > > _______________________________________________
> > > > 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
> > >
> >
> >
> >
> > --
> > - pL
> > _______________________________________________
> > 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
>
--
- pL
More information about the wp-hackers
mailing list