wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_the_block_template_html is private and should not be used in themes or plugins directly.
get_the_block_template_html › WordPress Function
Seit5.8.0
Veraltetn/v
› get_the_block_template_html ( Keine Parameter )
Zugriff: |
|
Gibt zurück: |
|
Definiert in: |
|
Codex: |
Returns the markup for the current template.
Ähnliche Funktionen: get_block_template, _get_block_template_file, get_block_templates, _get_block_templates_files, _get_block_templates_paths
Quellcode
function get_the_block_template_html() { global $_wp_current_template_content; global $wp_embed; 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 = do_blocks( $content ); $content = wptexturize( $content ); $content = convert_smilies( $content ); $content = shortcode_unautop( $content ); $content = wp_filter_content_tags( $content ); $content = do_shortcode( $content ); $content = str_replace( ']]>', ']]>', $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>'; }