wpseek.com
WordPress开发者和主题制作者的搜索引擎
_wp_block_theme_register_classic_sidebars is private and should not be used in themes or plugins directly.
_wp_block_theme_register_classic_sidebars › WordPress Function
Since6.2.0
已弃用n/a
› _wp_block_theme_register_classic_sidebars ( 没有参数 )
| 访问: |
|
| 定义在: |
|
| 文档: |
Registers the previous theme's sidebars for the block themes.
源码
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;
}
}