Skip to:
Content

BuddyPress.org

Changeset 10851


Ignore:
Timestamp:
06/01/2016 04:27:58 PM (3 years ago)
Author:
r-a-y
Message:

Embeds: Use version_compare() instead of a direct operator check.

Props DJPaul.

See #7104.

Location:
trunk/src/bp-activity
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-classes.php

    r10849 r10851  
    1616
    1717// Embeds - only applicable for WP 4.5+
    18 if ( bp_get_major_wp_version() >= 4.5 && bp_is_active( 'activity', 'embeds' ) ) {
     18if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) && bp_is_active( 'activity', 'embeds' ) ) {
    1919    require dirname( __FILE__ ) . '/classes/class-bp-activity-oembed-extension.php';
    2020}
  • trunk/src/bp-activity/bp-activity-embeds.php

    r10849 r10851  
    2020 */
    2121function bp_activity_setup_oembed() {
    22     if ( bp_get_major_wp_version() >= 4.5 && bp_is_active( 'activity', 'embeds' ) ) {
     22    if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) && bp_is_active( 'activity', 'embeds' ) ) {
    2323        buddypress()->activity->oembed = new BP_Activity_oEmbed_Extension;
    2424    }
  • trunk/src/bp-activity/classes/class-bp-activity-component.php

    r10838 r10851  
    7575
    7676        // Embeds - only applicable for WP 4.5+
    77         if ( bp_get_major_wp_version() >= 4.5 && bp_is_active( $this->id, 'embeds' ) ) {
     77        if ( version_compare( $GLOBALS['wp_version'], '4.5', '>=' ) && bp_is_active( $this->id, 'embeds' ) ) {
    7878            $includes[] = 'embeds';
    7979        }
Note: See TracChangeset for help on using the changeset viewer.