bp_embed_oembed_discover

  • apply_filters( 'bp_embed_oembed_discover', false ) && current_user_can( 'unfiltered_html' ) )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-classes.php :: Trac Source Line: 1183
      						return apply_filters( 'embed_handler_html', $return, $url, $attr );
      				}
      			}
      		}
      
      		// Get object ID
      		$id = apply_filters( 'embed_post_id', 0 );
      
      		// Is oEmbed discovery on?
      		$attr['discover'] = ( apply_filters( 'bp_embed_oembed_discover', false ) && current_user_can( 'unfiltered_html' ) );
      
      		// Set up a new WP oEmbed object to check URL with registered oEmbed providers
      		require_once( ABSPATH . WPINC . '/class-oembed.php' );
      		$oembed_obj = _wp_oembed_get_object();
      
      		// If oEmbed discovery is true, skip oEmbed provider check
      		$is_oembed_link = false;
      		if ( !$attr['discover'] ) {
      			foreach ( (array)$oembed_obj->providers as $provider_matchmask => $provider ) {
      				$regex = ( $is_regex = $provider[1] ) ? $provider_matchmask : '#' . str_replace( '___wildcard___', '(.+)', preg_quote( str_replace( '*', '___wildcard___', $provider_matchmask ), '#' ) ) . '#i';
      

Comments are closed.