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

_wp_block_theme_register_classic_sidebars()

Registers the previous theme’s sidebars for the block themes.


Source

File: wp-includes/widgets.php. View all references

function _wp_block_theme_register_classic_sidebars() {
	global $wp_registered_sidebars;

	if ( ! wp_is_block_theme() ) {
		return;
	}

	$classic_sidebars = get_theme_mod( 'wp_classic_sidebars' );
	if ( empty( $classic_sidebars ) ) {
		return;
	}

	// Don't use `register_sidebar` since it will enable the `widgets` support for a theme.
	foreach ( $classic_sidebars as $sidebar ) {
		$wp_registered_sidebars[ $sidebar['id'] ] = $sidebar;
	}
}


Top ↑

Changelog

Changelog
Version Description
6.2.0 Introduced.

Top ↑

User Contributed Notes

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