+ return $this->has_cap( 'collation' );
+ }
+
+ /**
+ * Generic function to determine if a database supports a particular feature
+ * @param string $db_cap the feature
+ * @param false|string|resource $dbh_or_table (not implemented) Which database to test. False = the currently selected database, string = the database containing the specified table, resource = the database corresponding to the specified mysql resource.
+ * @return bool
+ */
+ function has_cap( $db_cap ) {
+ $version = $this->db_version();
+
+ switch ( strtolower( $db_cap ) ) :
+ case 'collation' : // @since 2.5.0
+ case 'group_concat' : // @since 2.7
+ case 'subqueries' : // @since 2.7
+ return version_compare($version, '4.1', '>=');
+ break;
+ endswitch;
+
+ return false;