Changeset 12745 for trunk/src/bp-core/bp-core-functions.php
- Timestamp:
- 10/09/2020 07:17:20 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-core/bp-core-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/bp-core-functions.php
r12729 r12745 70 70 return !empty( $bp->db_version_raw ) ? $bp->db_version_raw : 0; 71 71 } 72 73 /** 74 * Check whether the current version of WP exceeds a given version. 75 * 76 * @since 7.0.0 77 * 78 * @param string $version WP version, in "PHP-standardized" format. 79 * @param string $compare Optional. Comparison operator. Default '>='. 80 * @return bool 81 */ 82 function bp_is_running_wp( $version, $compare = '>=' ) { 83 return version_compare( $GLOBALS['wp_version'], $version, $compare ); 84 } 72 85 73 86 /** Functions *****************************************************************/ … … 3135 3148 3136 3149 // register_term_meta() was introduced in WP 4.9.8. 3137 if ( ! function_exists( 'register_term_meta' ) ) {3150 if ( ! bp_is_running_wp( '4.9.8' ) ) { 3138 3151 $args['object_subtype'] = $type_tax; 3139 3152 … … 3539 3552 ); 3540 3553 3541 if ( version_compare( $GLOBALS['wp_version'], '4.9.6', '>=' ) ) {3554 if ( bp_is_running_wp( '4.9.6' ) ) { 3542 3555 $privacy_policy_url = get_privacy_policy_url(); 3543 3556 if ( $privacy_policy_url ) {
Note: See TracChangeset
for help on using the changeset viewer.