<content>

The WordPress Core content shortcode.


Usage

  1. // assign value 
  2. $content = 'dynamic_tag'; 
  3.  
  4. // basic usage 
  5. echo do_shortcode("[$content]"); 
  1. // assign value 
  2. $content = 'dynamic_tag'; 
  3.  
  4. // variable usage 
  5. $result = do_shortcode("[$content]"); 
  6. echo $result;  

Defined (3)

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

/wp-includes/class-wp-embed.php  
  1.  
  2. add_shortcode( 'embed', array( $this, 'shortcode' ) ); 
  3.  
  4. // Do the shortcode (only the [embed] one is registered) 
  5. $content = do_shortcode( $content, true ); 
  6.  
  7. // Put the original shortcodes back 
  8. $shortcode_tags = $orig_shortcode_tags; 
  9.  
  10. return $content; 
/wp-includes/media.php  
  1. $style = 'style="width: ' . (int) $caption_width . 'px" '; 
  2.  
  3. if ( $html5 ) { 
  4. $html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">' 
  5. . do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>'; 
  6. } else { 
  7. $html = '<div ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">' 
  8. . do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>'; 
  9.  
  1. if ( $html5 ) { 
  2. $html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">' 
  3. . do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>'; 
  4. } else { 
  5. $html = '<div ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">' 
  6. . do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>'; 
  7.  
  8. return $html; 
  9.