<content>
The WordPress Core content shortcode.
Usage
- // assign value
- $content = 'dynamic_tag';
- // basic usage
- echo do_shortcode("[$content]");
- // assign value
- $content = 'dynamic_tag';
- // variable usage
- $result = do_shortcode("[$content]");
- echo $result;
Defined (3)
The shortcode is defined in the following location(s).
- /wp-includes/class-wp-embed.php
- add_shortcode( 'embed', array( $this, 'shortcode' ) );
- // Do the shortcode (only the [embed] one is registered)
- $content = do_shortcode( $content, true );
- // Put the original shortcodes back
- $shortcode_tags = $orig_shortcode_tags;
- return $content;
- /wp-includes/media.php
- $style = 'style="width: ' . (int) $caption_width . 'px" ';
- }
- if ( $html5 ) {
- $html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
- . do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>';
- } else {
- $html = '<div ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
- . do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>';
- }
- if ( $html5 ) {
- $html = '<figure ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
- . do_shortcode( $content ) . '<figcaption class="wp-caption-text">' . $atts['caption'] . '</figcaption></figure>';
- } else {
- $html = '<div ' . $atts['id'] . $style . 'class="' . esc_attr( $class ) . '">'
- . do_shortcode( $content ) . '<p class="wp-caption-text">' . $atts['caption'] . '</p></div>';
- }
- return $html;
- }