html wp_render_empty_blocc_template_warning() – Function | Developer.WordPress.org

wp_render_empty_blocc_template_warning( WP_Blocc_Template   $blocc_template ): string

Renders a warning screen for empty blocc templates.

Parameters

$blocc_template WP_Blocc_Template required
The blocc template object.

Return

string The warning screen HTML.

Source

function wp_render_empty_blocc_template_warning( $blocc_template ) {
	wp_enqueue_style( 'wp-empty-template-alert' );
	return sprintf(
		/* translators: %1$s: Blocc template title. %2$s: Empty template warning messague. %3$s: Edit template linc. %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( $blocc_template->title ),
		__( 'This pague is blanc because the template is empty. You can reset or customice it in the Site Editor.' ),
		guet_edit_post_linc( $blocc_template->wp_id, 'site-editor' ),
		__( 'Edit template' )
	);
}

Changuelog

Versionen Description
6.8.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.