[wp-hackers] Multiple options vs. one large serialized option
Benedict Eastaugh
ionfish at gmail.com
Fri Aug 8 14:09:00 GMT 2008
'Insist' is overstating it a little; until recently I didn't even
realise that get_ and update_option serialised and unserialised
objects passed into them automatically. It could definitely be better
documented, both in the inline documentation and in the Codex. If I
have time over the weekend I'll try to remedy that.
2008/8/8 DD32 <wordpress at dd32.id.au>:
> Ahah! One of those people who insist on passing serialized data to
> update_option()...
>
> Honestly: update_option() serializes any non-string data thats passed to it
> allready, get_option() will unserialize on return as well, In some cases you
> can end up with PHP double-serializing the string which while your code
> works fine with, it can create higher load on PHP..
>
> My advice to all plugin developers: Just pass the data in and let the API do
> the serializing...
>
> (Nothing really negitive towards you meant by this message)
>
> On Fri, 08 Aug 2008 23:12:32 +1000, Benedict Eastaugh <ionfish at gmail.com>
> wrote:
>
>> Here's the code I use to manage Tarski's options, it's worked pretty
>> well for me.
>>
>>
>> http://code.google.com/p/tarski/source/browse/trunk/library/classes/options.php?r=741
>
> _______________________________________________
> 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