[wp-hackers] 2.4 Feature Proposal: New general meta-data table

wordpress at santosj.name wordpress at santosj.name
Fri Oct 12 00:54:24 GMT 2007

What about just having save_general_meta(), which would insert if it
doesn't exist or update if it does. From your wording (and my lack of
reading the entire function), I would assume that the one function does
both now. Would need documentation, which should be written, in any case
that the function name is not changed. Meaning if I was confused, I would
assume others would also.

I didn't know what $object_id was, but it makes sense now. At least I'll
be able to write better tests. Me two and a half hours from now: "WTF is
this object_id and where can I get its value? Ah hell, I'll just make
stuff up."

Jacob Santos

http://www.santosj.name - Blog
http://wordpress.svn.dragonu.net/unittest - Unofficial Unit Test Repository

> Oh, well, yeah, okay we do need something that does an insert. It
> would be nice if the update and insert were the same function call
> though.
> On 10/11/07, Otto <otto at ottodestruct.com> wrote:
>> On 10/11/07, wordpress at santosj.name <wordpress at santosj.name> wrote:
>> > Also, there seems to be a missing insert_general_meta(); the code in
>> > update_general_meta() will return false if there is no $object_id.
>> Shouldn't need an insert, as having no $object_id is not an option.
>> Every entry must have an object_id. For the cases where it replaces
>> wp_options (let's call that object_type = 'blogmeta'), the $object_id
>> = some unique identifier to the blog (consider the MU version here
>> too, each blog can have a different object_id).
>> -Otto
> _______________________________________________
> 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