[wp-hackers] Plugin Questions

Kaf Oseo kaf at szub.net
Thu May 12 15:40:50 GMT 2005

Bill Smith wrote:
> 1) I'm working on a small plugin that requires an additional database 
> table. Currently I'm using a query like
> SHOW TABLES LIKE 'wp_mytable'
 > ...

I made use of my Download Manager requiring a settings entry in options 
as well as a separate 'tracking' table by having get_option() collect 
and test for the plugin's option, and when not there the plugin creates 
both it and the tracking table when the user adds their settings for the 
first time.

  > 3) Last one... for the moment. :) In certain parts of my plugin, I'd
> like to restrict access to either the admin or users of a certain level. 
> Is there a call that can tell me the users credentials so I can 
> determine what they are allowed to do?

$user_level is global in admin pages.


More information about the wp-hackers mailing list