do_shortcode example

break;
        }
    }

    // If $area is not allowed, set it back to the uncategorized default.     if ( ! $area_definition ) {
        $area = WP_TEMPLATE_PART_AREA_UNCATEGORIZED;
    }

    // Run through the actions that are typically taken on the_content.     $content                       = shortcode_unautop( $content );
    $content                       = do_shortcode( $content );
    $seen_ids[ $template_part_id ] = true;
    $content                       = do_blocks( $content );
    unset( $seen_ids[ $template_part_id ] );
    $content = wptexturize( $content );
    $content = convert_smilies( $content );
    $content = wp_filter_content_tags( $content, "template_part_{$area});

    // Handle embeds for block template parts.     global $wp_embed;
    $content = $wp_embed->autoembed( $content );

    
if ( ! $_wp_current_template_content ) {
        if ( is_user_logged_in() ) {
            return '<h1>' . esc_html__( 'No matching template found' ) . '</h1>';
        }
        return;
    }

    $content = $wp_embed->run_shortcode( $_wp_current_template_content );
    $content = $wp_embed->autoembed( $content );
    $content = shortcode_unautop( $content );
    $content = do_shortcode( $content );
    $content = do_blocks( $content );
    $content = wptexturize( $content );
    $content = convert_smilies( $content );
    $content = wp_filter_content_tags( $content, 'template' );
    $content = str_replace( ']]>', ']]&gt;', $content );

    // Wrap block template in .wp-site-blocks to allow for specific descendant styles     // (e.g. `.wp-site-blocks > *`).     return '<div class="wp-site-blocks">' . $content . '</div>';
}


            if ( has_filter( 'widget_text_content', 'do_shortcode' ) && ! $widget_text_do_shortcode_priority ) {
                if ( ! empty( $instance['filter'] ) ) {
                    $text = shortcode_unautop( $text );
                }
                $text = do_shortcode( $text );
            }
        }

        // Restore post global.         $post = $original_post;
        remove_filter( 'shortcode_atts_gallery', array( $this, '_filter_gallery_shortcode_attrs' ) );

        // Undo suspension of legacy plugin-supplied shortcode handling.         if ( $should_suspend_legacy_shortcode_support ) {
            add_filter( 'widget_text', 'do_shortcode', $widget_text_do_shortcode_priority );
        }

        
if ( $caption_width ) {
        $style = 'style="width: ' . (int) $caption_width . 'px" ';
    }

    if ( $html5 ) {
        $html = sprintf(
            '<figure %s%s%sclass="%s">%s%s</figure>',
            $id,
            $describedby,
            $style,
            esc_attr( $class ),
            do_shortcode( $content ),
            sprintf(
                '<figcaption %sclass="wp-caption-text">%s</figcaption>',
                $caption_id,
                $atts['caption']
            )
        );
    } else {
        $html = sprintf(
            '<div %s%sclass="%s">%s%s</div>',
            $id,
            $style,
            

    public function run_shortcode( $content ) {
        global $shortcode_tags;

        // Back up current registered shortcodes and clear them all out.         $orig_shortcode_tags = $shortcode_tags;
        remove_all_shortcodes();

        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;
    }

    /** * If a post/page was saved, then output JavaScript to make * an Ajax request that will call WP_Embed::cache_oembed(). */
    

    }

    if ( has_shortcode( $parsed, 'audio' ) || has_shortcode( $parsed, 'video' ) ) {
        $styles     = '';
        $mce_styles = wpview_media_sandbox_styles();

        foreach ( $mce_styles as $style ) {
            $styles .= sprintf( '<link rel="stylesheet" href="%s" />', $style );
        }

        $html = do_shortcode( $parsed );

        global $wp_scripts;

        if ( ! empty( $wp_scripts ) ) {
            $wp_scripts->done = array();
        }

        ob_start();
        wp_print_scripts( array( 'mediaelement-vimeo', 'wp-mediaelement' ) );
        $scripts = ob_get_clean();

        

function apply_shortcodes( $content$ignore_html = false ) {
    return do_shortcode( $content$ignore_html );
}

/** * Searches content for shortcodes and filter shortcodes through their hooks. * * If there are no shortcode tags defined, then the content will be returned * without any filtering. This might cause issues when plugins are disabled but * the shortcode will still show up in the post or content. * * @since 2.5.0 * * @global array $shortcode_tags List of shortcode tags and their callback hooks. * * @param string $content Content to search for shortcodes. * @param bool $ignore_html When true, shortcodes inside HTML elements will be skipped. * Default false. * @return string Content with shortcodes filtered out. */
Home | Imprint | This part of the site doesn't use cookies.