views:

35

answers:

2

right now, i use global variable $table_prefix to differ whether i work on WP or WPMU. I need this global for my plugin. But is there any better way to check whether your pluggin is working on wp or wpmu ?

any suggestion will be great

A: 

You could define a constant:

e.g.

define('ENVIRONMENT', 'WP');

define('ENVIRONMENT', 'WPMU');

fire
wow this is a good suggestion. But what if i'm a pluggin developer. i need to know it without able to access/read wp-config.php (i think my question misleed you)
justjoe
+1  A: 

In WPMU a global variable named wpmu_version should be set.

Richard M
yes, that's it. i should use isset rather then compare its table_prefix. i'm too focus with it's return value. As you know, in wp, they got $wp_version as global variable.Thank you
justjoe