farinspace/wpalchemy — Issue #28: Can only use this once!
Author: zanematthew
Created: 2011-10-21 14:20:41+00:00
State: open

Right out the box you can't use this in more than one plugin/theme on the same site. If you do you get errors regarding:
Notice: Constant WPALCHEMY_MODE_ARRAY already defined in /opt/local/apache2/htdocs/gettasktracker/html/wp-content/plugins/task-tracker/library/php/wpalchemy/wp-content/wpalchemy/MetaBox.php on line 20

Example:
plugin A uses wpalchemy
plugin B uses wpalchemy
Both are active on the same site and you get a plethora of errors.

Recommended fix:
1. Change your instructions: http://www.farinspace.com/wpalchemy-metabox/#usage recommending that the developer place this in the plugins dir, and include it once per site.
2. Wrap each, class, function and defined constant in a conditional.

Let me know what you think, I don't mind doing option 2 myself, and then submitting a pull request, but would like to know your intended use first.