wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_render_empty_block_template_warning › WordPress Function
Seit6.8.0
Veraltetn/v
› wp_render_empty_block_template_warning ( $block_template )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Renders a warning screen for empty block templates.
Quellcode
function wp_render_empty_block_template_warning( $block_template ) {
wp_enqueue_style( 'wp-empty-template-alert' );
return sprintf(
/* translators: %1$s: Block template title. %2$s: Empty template warning message. %3$s: Edit template link. %4$s: Edit template button label. */
'<div id="wp-empty-template-alert">
<h2>%1$s</h2>
<p>%2$s</p>
<a href="%3$s" class="wp-element-button">
%4$s
</a>
</div>',
esc_html( $block_template->title ),
__( 'This page is blank because the template is empty. You can reset or customize it in the Site Editor.' ),
get_edit_post_link( $block_template->wp_id, 'site-editor' ),
__( 'Edit template' )
);
}