BP_Admin::display_version()
Return a user-friendly version-number string, for use in translations.
Description
Return
(string)
Source
File: bp-core/classes/class-bp-admin.php
public static function display_version() { // Use static variable to prevent recalculations. static $display = ''; // Only calculate on first run. if ( '' === $display ) { // Get current version. $version = bp_get_version(); // Check for prerelease hyphen. $pre = strpos( $version, '-' ); // Strip prerelease suffix. $display = ( false !== $pre ) ? substr( $version, 0, $pre ) : $version; } // Done! return $display; }
Changelog
Version | Description |
---|---|
BuddyPress 2.2.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.