Changeset 57685 for trunk/src/wp-admin/includes/theme.php
- Timestamp:
- 02/21/2024 07:24:12 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/theme.php
r57644 r57685 1161 1161 * @since 5.2.0 1162 1162 * 1163 * @global string $wp_stylesheet_path Path to current theme's stylesheet directory. 1164 * @global string $wp_template_path Path to current theme's template directory. 1165 * 1163 1166 * @param string $theme Single theme to resume. 1164 1167 * @param string $redirect Optional. URL to redirect to. Default empty string. … … 1167 1170 */ 1168 1171 function resume_theme( $theme, $redirect = '' ) { 1172 global $wp_stylesheet_path, $wp_template_path; 1173 1169 1174 list( $extension ) = explode( '/', $theme ); 1170 1175 … … 1174 1179 */ 1175 1180 if ( ! empty( $redirect ) ) { 1176 $stylesheet_path = get_stylesheet_directory();1177 $template_path = get_template_directory();1178 1179 1181 $functions_path = ''; 1180 if ( str_contains( $ stylesheet_path, $extension ) ) {1181 $functions_path = $ stylesheet_path . '/functions.php';1182 } elseif ( str_contains( $ template_path, $extension ) ) {1183 $functions_path = $ template_path . '/functions.php';1182 if ( str_contains( $wp_stylesheet_path, $extension ) ) { 1183 $functions_path = $wp_stylesheet_path . '/functions.php'; 1184 } elseif ( str_contains( $wp_template_path, $extension ) ) { 1185 $functions_path = $wp_template_path . '/functions.php'; 1184 1186 } 1185 1187
Note: See TracChangeset
for help on using the changeset viewer.