Skip to:
Content

BuddyPress.org

Ticket #7906: 7906.diff

File 7906.diff, 798 bytes (added by boonebgorges, 7 years ago)
  • src/bp-core/bp-core-functions.php

    diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
    index 57c1de3ae..9d59f85cd 100644
    function bp_db_version_raw() { 
    7373                return !empty( $bp->db_version_raw ) ? $bp->db_version_raw : 0;
    7474        }
    7575
     76/**
     77 * Check whether the current version of WP exceeds a given version.
     78 *
     79 * @since 4.0.0
     80 *
     81 * @param string $version WP version, in "PHP-standardized" format.
     82 * @param string $compare Optional. Comparison operator. Default '>='.
     83 * @return bool
     84 */
     85function bp_is_running_wp( $version, $compare = '>=' ) {
     86        return version_compare( $GLOBALS['wp_version'], $version, $compare );
     87}
     88
    7689/** Functions *****************************************************************/
    7790
    7891/**