Changeset 57685 for trunk/src/wp-includes/theme.php
- Timestamp:
- 02/21/2024 07:24:12 PM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/theme.php
r57608 r57685 154 154 * 155 155 * @since 3.0.0 156 * @since 6.5.0 Makes use of global template variables. 157 * 158 * @global string $wp_stylesheet_path Path to current theme's stylesheet directory. 159 * @global string $wp_template_path Path to current theme's template directory. 156 160 * 157 161 * @return bool True if a child theme is in use, false otherwise. 158 162 */ 159 163 function is_child_theme() { 160 return get_template_directory() !== get_stylesheet_directory(); 164 global $wp_stylesheet_path, $wp_template_path; 165 166 return $wp_stylesheet_path !== $wp_template_path; 161 167 } 162 168 … … 836 842 837 843 update_option( 'theme_switched', $old_theme->get_stylesheet() ); 844 845 /* 846 * Reset template globals when switching themes outside of a switched blog 847 * context to ensure templates will be loaded from the new theme. 848 */ 849 if ( ! is_multisite() || ! ms_is_switched() ) { 850 wp_set_template_globals(); 851 } 838 852 839 853 // Clear pattern caches.
Note: See TracChangeset
for help on using the changeset viewer.