getLongVersion(); if (preg_match("/^[\d\.]+/", $version, $match)) { // return initial version only (strip all nightly information) return $match[0]; } // return default version return $version; } /** * Gets a version string for the current WordPress with all release information. * * @return string Complete version string. */ public function getLongVersion() { // obtain WP version from global var and return it global $wp_version; return $wp_version; } }