wpdb::db_version() WordPress Method
The wpdb::db_version() method is a quick and easy way to retrieve the WordPress database version number. This can be useful for debugging purposes or for checking if a particular database feature is supported.
wpdb::db_version() #
Retrieves the database server version.
Return
(string|null) Version number on success, null on failure.
Source
File: wp-includes/wp-db.php
public function db_version() { return preg_replace( '/[^0-9.].*/', '', $this->db_server_info() ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |