bp_is_update()
Is this a BuddyPress update?
Description
Determined by comparing the registered BuddyPress version to the version number stored in the database. If the registered version is greater, it’s an update.
Return
(bool) True if update, otherwise false.
Source
File: bp-core/bp-core-update.php
function bp_is_update() { // Current DB version of this site (per site in a multisite network). $current_db = bp_get_option( '_bp_db_version' ); $current_live = bp_get_db_version(); // Compare versions (cast as int and bool to be safe). $is_update = (bool) ( (int) $current_db < (int) $current_live ); // Return the product of version comparison. return $is_update; }
Changelog
Version | Description |
---|---|
BuddyPress 1.6.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.