function devel_get_core_version

Returns the core version.

Parameters

string: The version string to parse.

Return value

string MAJOR.MINOR for versions before 5, MAJOR for subsequent versions.

3 calls to devel_get_core_version()
devel_doc_function_form in ./devel.module
Provides the devel docs form.
devel_function_reference in ./devel.pages.inc
Page callback: Returns a list of all currently defined user functions.
devel_query_table in ./devel.module
Shows all the queries for the page.

File

./devel.module, line 1362

Code

function devel_get_core_version($version) {
    $version_parts = explode('.', $version);
    // Map from 4.7.10 -> 4.7
    if ($version_parts[0] < 5) {
        return $version_parts[0] . '.' . $version_parts[1];
    }
    else {
        return $version_parts[0];
    }
}