Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/09/2020 07:17:20 PM (4 years ago)
Author:
imath
Message:

Core: introduce the bp_is_running_wp() function

This helper function checks WordPress version and is used by BuddyPress to ensure backward-compatibility when a WordPress feature/function is not yet available on the WordPress site BuddyPress is running on.

We have standardized the way we were doing these checks so far by replacing these with the use of this new bp_is_running_wp() function. It will help us to identify backward-compatibility chunks when we bump our minimum WP version.

bp_is_running_wp() accepts two arguments:

  • the WP version, in "PHP-standardized" format.
  • the comparison operator. It defaults to >=.

Props boonebgorges, r-a-y, espellcaste

Fixes #7906

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-filters.php

    r12440 r12745  
    5454
    5555// Support emoji.
    56 if ( function_exists( 'wp_encode_emoji' ) ) {
    57     add_filter( 'groups_group_description_before_save', 'wp_encode_emoji' );
    58 }
     56add_filter( 'groups_group_description_before_save', 'wp_encode_emoji' );
    5957
    6058// Escape output of new group creation details.
Note: See TracChangeset for help on using the changeset viewer.