Skip to:
Content

BuddyPress.org

Ticket #8115: 8115.patch

File 8115.patch, 892 bytes (added by imath, 5 years ago)
  • src/bp-core/classes/class-bp-embed.php

    diff --git src/bp-core/classes/class-bp-embed.php src/bp-core/classes/class-bp-embed.php
    index 5aae8689c..b605ae700 100644
    class BP_Embed extends WP_Embed { 
    138138                $attr['discover'] = ( apply_filters( 'bp_embed_oembed_discover', $default_discovery ) && $unfiltered_html );
    139139
    140140                // Set up a new WP oEmbed object to check URL with registered oEmbed providers.
    141                 require_once( ABSPATH . WPINC . '/class-oembed.php' );
     141                if ( file_exists( ABSPATH . WPINC . '/class-wp-oembed.php' ) ) {
     142                        require_once( ABSPATH . WPINC . '/class-wp-oembed.php' );
     143                } else {
     144                        // class-oembed.php is deprecated in WordPress 5.3.0.
     145                        require_once( ABSPATH . WPINC . '/class-oembed.php' );
     146                }
     147
    142148                $oembed_obj = _wp_oembed_get_object();
    143149
    144150                // If oEmbed discovery is true, skip oEmbed provider check.