[wp-hackers] A Question On Plugins

Andy Staines andy at yellowswordfish.com
Tue Apr 25 11:02:44 GMT 2006

Thanks Viper
I have coded up a 'version' option in the options table so I can at  
least check when the admin panel is loaded. As you say - painful that  
it is just another query but it was the only other thing I could  
think of.
There must be fixable reasons why the 'activate' hook doesn't work  
though. I actually now recall having this problem myself with a third- 
party plugin...
Thanks again

On 11:49  AM |  Tue 25 Apr 06, at 11:49  AM |  25 Apr 06,  
Viper007Bond wrote:

> http://codex.wordpress.org/Creating_Tables_with_Plugins
> 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.
> -Viper
> 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 asking?
>> 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?
>> regards
>> Andy
>> www.yellowswordfish.com
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> 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