/** * This returns the table prefix for the current model state. * * @global wpdb $wpdb * @return string */ public function get_table_prefix() { global $wpdb; if ($this->_global) { $prefix = $wpdb->base_prefix; } else { $prefix = $wpdb->get_blog_prefix(EEM_Base::get_model_query_blog_id()); } return $prefix; }