[wp-hackers] Need help with: coding new Plugin options

Austin Matzko if.website at gmail.com
Wed Nov 5 12:28:30 GMT 2008


On Wed, Nov 5, 2008 at 4:58 AM, Daiv Mowbray <daiv at daivmowbray.com> wrote:
> I can save the form , but it saves all items as blank.

You have this:

>                                        $ssmNewOptions =
> $this->savedefaultAdminOptions();

which doesn't make much sense, since the method called doesn't return anything:

>                function savedefaultAdminOptions(){
>                        update_option($this->AdminOptionsName,
> $this->defaultAdminOptions);
>                }

My guess is that the problem of blank options is caused by the race
condition set up by your calling

>                update_option($this->AdminOptionsName, $ssmNewOptions);

so shortly after

>                        update_option($this->AdminOptionsName,
> $this->defaultAdminOptions)


More information about the wp-hackers mailing list