[wp-hackers] Meta tables: Take 5

Stephen Rider wp-hackers at striderweb.com
Fri Jul 24 16:53:58 UTC 2009


So... You're suggesting making a whole new table every time a plugin  
wants to add some bit of meta, rather than simply adding a column to  
the meta table?

No offense, but if I had a giant lever I could pull to open a trap  
door and drop you into the Sarlaac Pit, I would be reaching for it  
about now....

Stephen

P.S. -- Sorry if that seems overly harsh.  My uncle was eaten by a  
sarlaac, so I probably shouldn't joke.

On Jul 24, 2009, at 6:25 AM, scribu <scribu at gmail.com> wrote:

> I propose that Core have an API for creating standard meta tables for
> whatever plugins need.
>
> Of course, this would be accompanied by unified functions for  
> handling meta
> data in said tables.
>
> Example: A plugin needs a comment meta table. First, it makes sure  
> it's
> available:
>
> register_activation_hook(__FILE__, 'example_plugin_activation');
>
> function example_plugin_activation() {
>   enable_meta_table('comment');
> }
>
>
> Then, it uses it to store data, etc.:
>
> ...
> add_meta('comment', $comment_id, $meta_key, $meta_value);
> ...
>
>
> I am willing to code this API, if people think it's a sound ideea.
>
>
> By the way, I also wrote a blog post about this:
> http://scribu.net/wordpress/meta-tables-for-wordpress.html



More information about the wp-hackers mailing list