Changeset 55200 for trunk/src/wp-includes/widgets.php
- Timestamp:
- 02/03/2023 12:13:52 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/widgets.php
r54541 r55200 2106 2106 } 2107 2107 } 2108 2109 /** 2110 * Registers the previous theme's sidebars for the block themes. 2111 * 2112 * @since 6.2.0 2113 * @access private 2114 * 2115 * @global array $wp_registered_sidebars Registered sidebars. 2116 */ 2117 function _wp_block_theme_register_classic_sidebars() { 2118 global $wp_registered_sidebars; 2119 2120 if ( ! wp_is_block_theme() ) { 2121 return; 2122 } 2123 2124 $classic_sidebars = get_theme_mod( 'wp_classic_sidebars' ); 2125 if ( empty( $classic_sidebars ) ) { 2126 return; 2127 } 2128 2129 // Don't use `register_sidebar` since it will enable the `widgets` support for a theme. 2130 foreach ( $classic_sidebars as $sidebar ) { 2131 $wp_registered_sidebars[ $sidebar['id'] ] = $sidebar; 2132 } 2133 }
Note: See TracChangeset
for help on using the changeset viewer.