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
919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 | 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.