embed

The WordPress Core embed shortcode.


Usage

  1. // basic usage 
  2. echo do_shortcode('[embed]'); 
  1. // variable usage 
  2. $result = do_shortcode('[embed]'); 
  3. echo $result;  

Defined (2)

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

/sync/class.jetpack-sync-module-posts.php  
  1.  
  2. function remove_embed() { 
  3. global $wp_embed; 
  4. remove_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); 
  5. // remove the embed shortcode since we would do the part later. 
  6. remove_shortcode( 'embed' ); 
  7. // Attempts to embed all URLs in a post 
  8. remove_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); 
  9.  
  10. function add_embed() { 
  1.  
  2. function add_embed() { 
  3. global $wp_embed; 
  4. add_filter( 'the_content', array( $wp_embed, 'run_shortcode' ), 8 ); 
  5. // Shortcode placeholder for strip_shortcodes() 
  6. add_shortcode( 'embed', '__return_false' ); 
  7. // Attempts to embed all URLs in a post 
  8. add_filter( 'the_content', array( $wp_embed, 'autoembed' ), 8 ); 
  9.  
  10. // Expands wp_insert_post to include filtered content