[wp-hackers] A Question On Plugins
lists at viper007bond.com
Tue Apr 25 10:49:18 GMT 2006
I have yet to code a plugin that uses it's own table (I prefer to store
my data in a big array in the options table), but I'd probably
personally avoid using the action hook as from you found out, it doesn't
always work for one reason or another.
So, the only other way I can think of is checking every time the plugin
is used (not on every page load) and only once per page. Either that,
using an option value to record that the table's been made. But of
course both of those make a query occur, so it's kinda up to you.
Andy Staines wrote:
> I know you guys are in the middle of a big security conference but can a
> relatively newbie plugin author - struggling to find documentation to
> help him - ask a question or two? And - is this the right place to be
> One of my plugins requires two tables to be created. I coded this up as
> a process in the 'activate' plugin hook. But for at least two people
> (and maybe more) when they have activated the plugin, the tables have
> not been set up. They are administrators of their blogs.
> Is this the 'right' way to ensure tables get created or is there a
> better hook to use? And, if so, any ideas why it should fail?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers