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

wordpress at santosj.name wordpress at santosj.name
Thu Oct 11 23:27:08 GMT 2007

> On 10/4/07, Andy Skelton <skeltoac at gmail.com> wrote:
>> I like it. A good starting point would be a CREATE TABLE statement.
>> Would you post it here when you've got it designed?
> I've written up a patch to get it going[1].  I've tested it
> successfully, but I'd appreciate it if others would as well.
> [1] http://trac.wordpress.org/ticket/5183
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

Looks sweet.

If it would help, I'll write some unit tests up when I get home. I think
the true testament would be to convert existing meta code over. It would
give better indication of whether the new code would in fact replace the
current tables.

Would it be neat to have a sort constant to register meta type?

define('WORDPRESS_POSTMETA', 'post');

update_general_meta(WORDPRESS_POSTMETA, 0, 'whatever', 'whatever');

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.

More information about the wp-hackers mailing list