Support both WP & WPMU
-
Hi!
I’m currently building a plugin for others to use to comunicate with us. The problem is that I want to support every blog even if it is in WP or WPMU and don’t know anyway around it.
(Every blog must have one uniq api-key)
global $blog_id; //this will support WPMU but not WP add_blog_option($blog_id, 'API_key', $post['api_key']); /* it will throw error: Fatal error: Call to undefined function get_blog_option() in my_plugin.php on line 61 ...if WPMU is not enable */ //whould it be bad idéa if i used blog_id as an prefix? //it works on both WP and WPMU add_site_option('API_key'.$blog_id, $post['api_key']);
- The topic ‘Support both WP & WPMU’ is closed to new replies.