wp_embed_excerpt_attachment

Filters the post excerpt for the embed template.

Description

(string) wp_embed_excerpt_attachment( (string) $content ); 

Shows players for video and audio attachments.

Returns (string)

The modified post excerpt.

Parameters (1)

0. $content (string)
The current post excerpt.

Usage

  1. if ( !function_exists( 'wp_embed_excerpt_attachment' ) ) { 
  2. require_once ABSPATH . WPINC . '/embed.php'; 
  3.  
  4. // The current post excerpt. 
  5. $content = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_embed_excerpt_attachment($content); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/embed.php  
  1. function wp_embed_excerpt_attachment( $content ) { 
  2. if ( is_attachment() ) { 
  3. return prepend_attachment( '' ); 
  4.  
  5. return $content;