[wp-hackers] Class for WP-Admin Menus
Owen Winkler
ringmaster at midnightcircus.com
Thu Aug 5 02:58:06 UTC 2004
> Believe it or not, all this code was tested and developed under a 1.3
> environment. Once I had it written and all set to go, I then tested it
> under 1.2 to verify that it had backwards compatability. So the short
> answer is, yes, it's good to go for the next release.
Spiffy. :)
Another thing I thought of is if two plugin developers use your class, you
could end up defining your class twice. What you should do perhaps is put
your class inside a conditional that checks for its existence. Can't
remember the exact syntax, but something like:
if(!class_exists('cg_adminMenu')) {...class...}
You wouldn't even have to namespace your class, then.
Owen
More information about the hackers
mailing list