blogid; } return 1; } /** * Wrappers around WordPress multisite functions add_blog_option(), update_blog_option(), * delete_blog_option(), and get_blog_option that don't die miserably if the user isn't * using Multisite. These functions call the non _blog_ versions of those functions * if they don't exist. For example, get_blog_option() will call get_option() if * get_blog_option() is not defined. */ public static function update_blog_option( $id, $option, $value ) { if( function_exists( 'update_blog_option' ) ) { return update_blog_option( $id, $option, $value ); } return update_option( $option, $value ); } public static function get_blog_option( $id, $option, $default=false ) { if( function_exists( 'get_blog_option' ) ) { return get_blog_option( $id, $option, $default ); } return get_option( $option, $default ); } public static function add_blog_option( $id, $option, $value ) { if( function_exists( 'add_blog_option' ) ) { return add_blog_option( $id, $option, $default ); } return add_option( $option, $default ); } public static function delete_blog_option( $id, $option ) { if( function_exists( 'delete_blog_option' ) ) { return delete_blog_option( $id, $option ); } return delete_option( $option ); } } // end class } // end if ( !class_exists( ...