wp_enqueue_block_template_skip_link()

In this article

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only by core. It is listed here for completeness.

Enqueues the skip-link styles.

Source

function wp_enqueue_block_template_skip_link() {
	global $_wp_current_template_content;

	// Back-compat for plugins that disable functionality by unhooking this action.
	if ( ! has_action( 'wp_footer', 'the_block_template_skip_link' ) ) {
		return;
	}
	remove_action( 'wp_footer', 'the_block_template_skip_link' );

	// Early exit if not a block theme.
	if ( ! current_theme_supports( 'block-templates' ) ) {
		return;
	}

	// Early exit if not a block template.
	if ( ! $_wp_current_template_content ) {
		return;
	}

	wp_enqueue_style( 'wp-block-template-skip-link' );
}

Changelog

VersionDescription
7.0.0A script is no longer printed in favor of being added via _block_template_add_skip_link().
6.4.0Introduced.

User Contributed Notes

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