diff --git src/bp-core/classes/class-bp-embed.php src/bp-core/classes/class-bp-embed.php
index 2ffcc15..d15af95 100644
|
|
class BP_Embed extends WP_Embed { |
126 | 126 | */ |
127 | 127 | $id = apply_filters( 'embed_post_id', 0 ); |
128 | 128 | |
| 129 | $unfiltered_html = current_user_can( 'unfiltered_html' ); |
| 130 | $default_discovery = false; |
| 131 | |
| 132 | // Since 4.4, WordPress is now an oEmbed provider. |
| 133 | if ( function_exists( 'wp_oembed_register_route' ) ) { |
| 134 | $unfiltered_html = true; |
| 135 | $default_discovery = true; |
| 136 | } |
| 137 | |
129 | 138 | /** |
130 | 139 | * Filters whether or not oEmbed discovery is on. |
131 | 140 | * |
132 | 141 | * @since 1.5.0 |
| 142 | * @since 2.5.0 Default status of oEmbed discovery has been switched |
| 143 | * to true to apply changes introduced in WordPress 4.4 |
133 | 144 | * |
134 | | * @param bool $value Current status of oEmbed discovery. |
| 145 | * @param bool $default_discovery Current status of oEmbed discovery. |
135 | 146 | */ |
136 | | $attr['discover'] = ( apply_filters( 'bp_embed_oembed_discover', false ) && current_user_can( 'unfiltered_html' ) ); |
| 147 | $attr['discover'] = ( apply_filters( 'bp_embed_oembed_discover', $default_discovery ) && $unfiltered_html ); |
137 | 148 | |
138 | 149 | // Set up a new WP oEmbed object to check URL with registered oEmbed providers. |
139 | 150 | require_once( ABSPATH . WPINC . '/class-oembed.php' ); |