bp_embed_oembed_html

  • apply_filters( 'bp_embed_oembed_html', $cache, $url, $attr, $rawattr )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-classes.php :: Trac Source Line: 1234
      			// Setup the cachekey
      			$cachekey = '_oembed_' . md5( $url . serialize( $attr ) );
      
      			// Let components / plugins grab their cache
      			$cache = '';
      			$cache = apply_filters( 'bp_embed_get_cache', $cache, $id, $cachekey, $url, $attr, $rawattr );
      
      			// Grab cache and return it if available
      			if ( !empty( $cache ) ) {
      				return apply_filters( 'bp_embed_oembed_html', $cache, $url, $attr, $rawattr );
      
      			// If no cache, ping the oEmbed provider and cache the result
      			} else {
      				$html = wp_oembed_get( $url, $attr );
      				$cache = ( $html ) ? $html : $url;
      
      				// Let components / plugins save their cache
      				do_action( 'bp_embed_update_cache', $cache, $cachekey, $id );
      
      				// If there was a result, return it
      
  • apply_filters( 'bp_embed_oembed_html', $html, $url, $attr, $rawattr )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-classes.php :: Trac Source Line: 1246
      			} else {
      				$html = wp_oembed_get( $url, $attr );
      				$cache = ( $html ) ? $html : $url;
      
      				// Let components / plugins save their cache
      				do_action( 'bp_embed_update_cache', $cache, $cachekey, $id );
      
      				// If there was a result, return it
      

Comments are closed.