796 // 5.5 |
796 // 5.5 |
797 'wp-admin/css/ie.css', |
797 'wp-admin/css/ie.css', |
798 'wp-admin/css/ie.min.css', |
798 'wp-admin/css/ie.min.css', |
799 'wp-admin/css/ie-rtl.css', |
799 'wp-admin/css/ie-rtl.css', |
800 'wp-admin/css/ie-rtl.min.css', |
800 'wp-admin/css/ie-rtl.min.css', |
|
801 // 5.6 |
|
802 'wp-includes/js/jquery/ui/position.min.js', |
|
803 'wp-includes/js/jquery/ui/widget.min.js', |
|
804 // 5.7 |
|
805 'wp-includes/blocks/classic/block.json', |
|
806 // 5.8 |
|
807 'wp-admin/images/freedoms.png', |
|
808 'wp-admin/images/privacy.png', |
|
809 'wp-admin/images/about-badge.svg', |
|
810 'wp-admin/images/about-color-palette.svg', |
|
811 'wp-admin/images/about-color-palette-vert.svg', |
|
812 'wp-admin/images/about-header-brushes.svg', |
|
813 'wp-includes/block-patterns/large-header.php', |
|
814 'wp-includes/block-patterns/heading-paragraph.php', |
|
815 'wp-includes/block-patterns/quote.php', |
|
816 'wp-includes/block-patterns/text-three-columns-buttons.php', |
|
817 'wp-includes/block-patterns/two-buttons.php', |
|
818 'wp-includes/block-patterns/two-images.php', |
|
819 'wp-includes/block-patterns/three-buttons.php', |
|
820 'wp-includes/block-patterns/text-two-columns-with-images.php', |
|
821 'wp-includes/block-patterns/text-two-columns.php', |
|
822 'wp-includes/block-patterns/large-header-button.php', |
|
823 'wp-includes/blocks/subhead/block.json', |
|
824 'wp-includes/blocks/subhead', |
|
825 'wp-includes/css/dist/editor/editor-styles.css', |
|
826 'wp-includes/css/dist/editor/editor-styles.min.css', |
|
827 'wp-includes/css/dist/editor/editor-styles-rtl.css', |
|
828 'wp-includes/css/dist/editor/editor-styles-rtl.min.css', |
801 ); |
829 ); |
802 |
830 |
803 /** |
831 /** |
804 * Stores new files in wp-content to copy |
832 * Stores new files in wp-content to copy |
805 * |
833 * |
916 apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); |
945 apply_filters( 'update_feedback', __( 'Verifying the unpacked files…' ) ); |
917 |
946 |
918 // Sanity check the unzipped distribution. |
947 // Sanity check the unzipped distribution. |
919 $distro = ''; |
948 $distro = ''; |
920 $roots = array( '/wordpress/', '/wordpress-mu/' ); |
949 $roots = array( '/wordpress/', '/wordpress-mu/' ); |
|
950 |
921 foreach ( $roots as $root ) { |
951 foreach ( $roots as $root ) { |
922 if ( $wp_filesystem->exists( $from . $root . 'readme.html' ) && $wp_filesystem->exists( $from . $root . 'wp-includes/version.php' ) ) { |
952 if ( $wp_filesystem->exists( $from . $root . 'readme.html' ) |
|
953 && $wp_filesystem->exists( $from . $root . 'wp-includes/version.php' ) |
|
954 ) { |
923 $distro = $root; |
955 $distro = $root; |
924 break; |
956 break; |
925 } |
957 } |
926 } |
958 } |
|
959 |
927 if ( ! $distro ) { |
960 if ( ! $distro ) { |
928 $wp_filesystem->delete( $from, true ); |
961 $wp_filesystem->delete( $from, true ); |
|
962 |
929 return new WP_Error( 'insane_distro', __( 'The update could not be unpacked' ) ); |
963 return new WP_Error( 'insane_distro', __( 'The update could not be unpacked' ) ); |
930 } |
964 } |
931 |
965 |
932 /* |
966 /* |
933 * Import $wp_version, $required_php_version, and $required_mysql_version from the new version. |
967 * Import $wp_version, $required_php_version, and $required_mysql_version from the new version. |
934 * DO NOT globalise any variables imported from `version-current.php` in this function. |
968 * DO NOT globalise any variables imported from `version-current.php` in this function. |
935 * |
969 * |
936 * BC Note: $wp_filesystem->wp_content_dir() returned unslashed pre-2.8 |
970 * BC Note: $wp_filesystem->wp_content_dir() returned unslashed pre-2.8. |
937 */ |
971 */ |
938 $versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php'; |
972 $versions_file = trailingslashit( $wp_filesystem->wp_content_dir() ) . 'upgrade/version-current.php'; |
|
973 |
939 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) { |
974 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $versions_file ) ) { |
940 $wp_filesystem->delete( $from, true ); |
975 $wp_filesystem->delete( $from, true ); |
941 return new WP_Error( 'copy_failed_for_version_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); |
976 |
|
977 return new WP_Error( |
|
978 'copy_failed_for_version_file', |
|
979 __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), |
|
980 'wp-includes/version.php' |
|
981 ); |
942 } |
982 } |
943 |
983 |
944 $wp_filesystem->chmod( $versions_file, FS_CHMOD_FILE ); |
984 $wp_filesystem->chmod( $versions_file, FS_CHMOD_FILE ); |
|
985 |
|
986 /* |
|
987 * `wp_opcache_invalidate()` only exists in WordPress 5.5 or later, |
|
988 * so don't run it when upgrading from older versions. |
|
989 */ |
|
990 if ( function_exists( 'wp_opcache_invalidate' ) ) { |
|
991 wp_opcache_invalidate( $versions_file ); |
|
992 } |
|
993 |
945 require WP_CONTENT_DIR . '/upgrade/version-current.php'; |
994 require WP_CONTENT_DIR . '/upgrade/version-current.php'; |
946 $wp_filesystem->delete( $versions_file ); |
995 $wp_filesystem->delete( $versions_file ); |
947 |
996 |
948 $php_version = phpversion(); |
997 $php_version = phpversion(); |
949 $mysql_version = $wpdb->db_version(); |
998 $mysql_version = $wpdb->db_version(); |
950 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. |
999 $old_wp_version = $GLOBALS['wp_version']; // The version of WordPress we're updating from. |
951 $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. |
1000 $development_build = ( false !== strpos( $old_wp_version . $wp_version, '-' ) ); // A dash in the version indicates a development release. |
952 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); |
1001 $php_compat = version_compare( $php_version, $required_php_version, '>=' ); |
|
1002 |
953 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) { |
1003 if ( file_exists( WP_CONTENT_DIR . '/db.php' ) && empty( $wpdb->is_mysql ) ) { |
954 $mysql_compat = true; |
1004 $mysql_compat = true; |
955 } else { |
1005 } else { |
956 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); |
1006 $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ); |
957 } |
1007 } |
1069 } |
1127 } |
1070 |
1128 |
1071 // If we're using the direct method, we can predict write failures that are due to permissions. |
1129 // If we're using the direct method, we can predict write failures that are due to permissions. |
1072 if ( $check_is_writable && 'direct' === $wp_filesystem->method ) { |
1130 if ( $check_is_writable && 'direct' === $wp_filesystem->method ) { |
1073 $files_writable = array_filter( $check_is_writable, array( $wp_filesystem, 'is_writable' ) ); |
1131 $files_writable = array_filter( $check_is_writable, array( $wp_filesystem, 'is_writable' ) ); |
|
1132 |
1074 if ( $files_writable !== $check_is_writable ) { |
1133 if ( $files_writable !== $check_is_writable ) { |
1075 $files_not_writable = array_diff_key( $check_is_writable, $files_writable ); |
1134 $files_not_writable = array_diff_key( $check_is_writable, $files_writable ); |
|
1135 |
1076 foreach ( $files_not_writable as $relative_file_not_writable => $file_not_writable ) { |
1136 foreach ( $files_not_writable as $relative_file_not_writable => $file_not_writable ) { |
1077 // If the writable check failed, chmod file to 0644 and try again, same as copy_dir(). |
1137 // If the writable check failed, chmod file to 0644 and try again, same as copy_dir(). |
1078 $wp_filesystem->chmod( $file_not_writable, FS_CHMOD_FILE ); |
1138 $wp_filesystem->chmod( $file_not_writable, FS_CHMOD_FILE ); |
|
1139 |
1079 if ( $wp_filesystem->is_writable( $file_not_writable ) ) { |
1140 if ( $wp_filesystem->is_writable( $file_not_writable ) ) { |
1080 unset( $files_not_writable[ $relative_file_not_writable ] ); |
1141 unset( $files_not_writable[ $relative_file_not_writable ] ); |
1081 } |
1142 } |
1082 } |
1143 } |
1083 |
1144 |
1084 // Store package-relative paths (the key) of non-writable files in the WP_Error object. |
1145 // Store package-relative paths (the key) of non-writable files in the WP_Error object. |
1085 $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; |
1146 $error_data = version_compare( $old_wp_version, '3.7-beta2', '>' ) ? array_keys( $files_not_writable ) : ''; |
1086 |
1147 |
1087 if ( $files_not_writable ) { |
1148 if ( $files_not_writable ) { |
1088 return new WP_Error( 'files_not_writable', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), implode( ', ', $error_data ) ); |
1149 return new WP_Error( |
|
1150 'files_not_writable', |
|
1151 __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), |
|
1152 implode( ', ', $error_data ) |
|
1153 ); |
1089 } |
1154 } |
1090 } |
1155 } |
1091 } |
1156 } |
1092 |
1157 |
1093 /** This filter is documented in wp-admin/includes/update-core.php */ |
1158 /** This filter is documented in wp-admin/includes/update-core.php */ |
1094 apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) ); |
1159 apply_filters( 'update_feedback', __( 'Enabling Maintenance mode…' ) ); |
|
1160 |
1095 // Create maintenance file to signal that we are upgrading. |
1161 // Create maintenance file to signal that we are upgrading. |
1096 $maintenance_string = '<?php $upgrading = ' . time() . '; ?>'; |
1162 $maintenance_string = '<?php $upgrading = ' . time() . '; ?>'; |
1097 $maintenance_file = $to . '.maintenance'; |
1163 $maintenance_file = $to . '.maintenance'; |
1098 $wp_filesystem->delete( $maintenance_file ); |
1164 $wp_filesystem->delete( $maintenance_file ); |
1099 $wp_filesystem->put_contents( $maintenance_file, $maintenance_string, FS_CHMOD_FILE ); |
1165 $wp_filesystem->put_contents( $maintenance_file, $maintenance_string, FS_CHMOD_FILE ); |
1100 |
1166 |
1101 /** This filter is documented in wp-admin/includes/update-core.php */ |
1167 /** This filter is documented in wp-admin/includes/update-core.php */ |
1102 apply_filters( 'update_feedback', __( 'Copying the required files…' ) ); |
1168 apply_filters( 'update_feedback', __( 'Copying the required files…' ) ); |
|
1169 |
1103 // Copy new versions of WP files into place. |
1170 // Copy new versions of WP files into place. |
1104 $result = _copy_dir( $from . $distro, $to, $skip ); |
1171 $result = _copy_dir( $from . $distro, $to, $skip ); |
|
1172 |
1105 if ( is_wp_error( $result ) ) { |
1173 if ( is_wp_error( $result ) ) { |
1106 $result = new WP_Error( $result->get_error_code(), $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) ); |
1174 $result = new WP_Error( |
|
1175 $result->get_error_code(), |
|
1176 $result->get_error_message(), |
|
1177 substr( $result->get_error_data(), strlen( $to ) ) |
|
1178 ); |
1107 } |
1179 } |
1108 |
1180 |
1109 // Since we know the core files have copied over, we can now copy the version file. |
1181 // Since we know the core files have copied over, we can now copy the version file. |
1110 if ( ! is_wp_error( $result ) ) { |
1182 if ( ! is_wp_error( $result ) ) { |
1111 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { |
1183 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { |
1112 $wp_filesystem->delete( $from, true ); |
1184 $wp_filesystem->delete( $from, true ); |
1113 $result = new WP_Error( 'copy_failed_for_version_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); |
1185 $result = new WP_Error( |
1114 } |
1186 'copy_failed_for_version_file', |
|
1187 __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), |
|
1188 'wp-includes/version.php' |
|
1189 ); |
|
1190 } |
|
1191 |
1115 $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); |
1192 $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); |
|
1193 |
|
1194 /* |
|
1195 * `wp_opcache_invalidate()` only exists in WordPress 5.5 or later, |
|
1196 * so don't run it when upgrading from older versions. |
|
1197 */ |
|
1198 if ( function_exists( 'wp_opcache_invalidate' ) ) { |
|
1199 wp_opcache_invalidate( $to . 'wp-includes/version.php' ); |
|
1200 } |
1116 } |
1201 } |
1117 |
1202 |
1118 // Check to make sure everything copied correctly, ignoring the contents of wp-content. |
1203 // Check to make sure everything copied correctly, ignoring the contents of wp-content. |
1119 $skip = array( 'wp-content' ); |
1204 $skip = array( 'wp-content' ); |
1120 $failed = array(); |
1205 $failed = array(); |
|
1206 |
1121 if ( isset( $checksums ) && is_array( $checksums ) ) { |
1207 if ( isset( $checksums ) && is_array( $checksums ) ) { |
1122 foreach ( $checksums as $file => $checksum ) { |
1208 foreach ( $checksums as $file => $checksum ) { |
1123 if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
1209 if ( 'wp-content' === substr( $file, 0, 10 ) ) { |
1124 continue; |
1210 continue; |
1125 } |
1211 } |
|
1212 |
1126 if ( ! file_exists( $working_dir_local . $file ) ) { |
1213 if ( ! file_exists( $working_dir_local . $file ) ) { |
1127 continue; |
1214 continue; |
1128 } |
1215 } |
1129 if ( '.' === dirname( $file ) && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ), true ) ) { |
1216 |
|
1217 if ( '.' === dirname( $file ) |
|
1218 && in_array( pathinfo( $file, PATHINFO_EXTENSION ), array( 'html', 'txt' ), true ) |
|
1219 ) { |
1130 $skip[] = $file; |
1220 $skip[] = $file; |
1131 continue; |
1221 continue; |
1132 } |
1222 } |
1133 if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) == $checksum ) { |
1223 |
|
1224 if ( file_exists( ABSPATH . $file ) && md5_file( ABSPATH . $file ) === $checksum ) { |
1134 $skip[] = $file; |
1225 $skip[] = $file; |
1135 } else { |
1226 } else { |
1136 $failed[] = $file; |
1227 $failed[] = $file; |
1137 } |
1228 } |
1138 } |
1229 } |
1139 } |
1230 } |
1140 |
1231 |
1141 // Some files didn't copy properly. |
1232 // Some files didn't copy properly. |
1142 if ( ! empty( $failed ) ) { |
1233 if ( ! empty( $failed ) ) { |
1143 $total_size = 0; |
1234 $total_size = 0; |
|
1235 |
1144 foreach ( $failed as $file ) { |
1236 foreach ( $failed as $file ) { |
1145 if ( file_exists( $working_dir_local . $file ) ) { |
1237 if ( file_exists( $working_dir_local . $file ) ) { |
1146 $total_size += filesize( $working_dir_local . $file ); |
1238 $total_size += filesize( $working_dir_local . $file ); |
1147 } |
1239 } |
1148 } |
1240 } |
1149 |
1241 |
1150 // If we don't have enough free space, it isn't worth trying again. |
1242 // If we don't have enough free space, it isn't worth trying again. |
1151 // Unlikely to be hit due to the check in unzip_file(). |
1243 // Unlikely to be hit due to the check in unzip_file(). |
1152 $available_space = @disk_free_space( ABSPATH ); |
1244 $available_space = @disk_free_space( ABSPATH ); |
|
1245 |
1153 if ( $available_space && $total_size >= $available_space ) { |
1246 if ( $available_space && $total_size >= $available_space ) { |
1154 $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); |
1247 $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); |
1155 } else { |
1248 } else { |
1156 $result = _copy_dir( $from . $distro, $to, $skip ); |
1249 $result = _copy_dir( $from . $distro, $to, $skip ); |
|
1250 |
1157 if ( is_wp_error( $result ) ) { |
1251 if ( is_wp_error( $result ) ) { |
1158 $result = new WP_Error( $result->get_error_code() . '_retry', $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) ); |
1252 $result = new WP_Error( |
|
1253 $result->get_error_code() . '_retry', |
|
1254 $result->get_error_message(), |
|
1255 substr( $result->get_error_data(), strlen( $to ) ) |
|
1256 ); |
1159 } |
1257 } |
1160 } |
1258 } |
1161 } |
1259 } |
1162 |
1260 |
1163 // Custom content directory needs updating now. |
1261 // Custom content directory needs updating now. |
1164 // Copy languages. |
1262 // Copy languages. |
1165 if ( ! is_wp_error( $result ) && $wp_filesystem->is_dir( $from . $distro . 'wp-content/languages' ) ) { |
1263 if ( ! is_wp_error( $result ) && $wp_filesystem->is_dir( $from . $distro . 'wp-content/languages' ) ) { |
1166 if ( WP_LANG_DIR != ABSPATH . WPINC . '/languages' || @is_dir( WP_LANG_DIR ) ) { |
1264 if ( WP_LANG_DIR !== ABSPATH . WPINC . '/languages' || @is_dir( WP_LANG_DIR ) ) { |
1167 $lang_dir = WP_LANG_DIR; |
1265 $lang_dir = WP_LANG_DIR; |
1168 } else { |
1266 } else { |
1169 $lang_dir = WP_CONTENT_DIR . '/languages'; |
1267 $lang_dir = WP_CONTENT_DIR . '/languages'; |
1170 } |
1268 } |
1171 |
1269 |
1176 clearstatcache(); // For FTP, need to clear the stat cache. |
1274 clearstatcache(); // For FTP, need to clear the stat cache. |
1177 } |
1275 } |
1178 |
1276 |
1179 if ( @is_dir( $lang_dir ) ) { |
1277 if ( @is_dir( $lang_dir ) ) { |
1180 $wp_lang_dir = $wp_filesystem->find_folder( $lang_dir ); |
1278 $wp_lang_dir = $wp_filesystem->find_folder( $lang_dir ); |
|
1279 |
1181 if ( $wp_lang_dir ) { |
1280 if ( $wp_lang_dir ) { |
1182 $result = copy_dir( $from . $distro . 'wp-content/languages/', $wp_lang_dir ); |
1281 $result = copy_dir( $from . $distro . 'wp-content/languages/', $wp_lang_dir ); |
|
1282 |
1183 if ( is_wp_error( $result ) ) { |
1283 if ( is_wp_error( $result ) ) { |
1184 $result = new WP_Error( $result->get_error_code() . '_languages', $result->get_error_message(), substr( $result->get_error_data(), strlen( $wp_lang_dir ) ) ); |
1284 $result = new WP_Error( |
|
1285 $result->get_error_code() . '_languages', |
|
1286 $result->get_error_message(), |
|
1287 substr( $result->get_error_data(), strlen( $wp_lang_dir ) ) |
|
1288 ); |
1185 } |
1289 } |
1186 } |
1290 } |
1187 } |
1291 } |
1188 } |
1292 } |
1189 |
1293 |
1190 /** This filter is documented in wp-admin/includes/update-core.php */ |
1294 /** This filter is documented in wp-admin/includes/update-core.php */ |
1191 apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); |
1295 apply_filters( 'update_feedback', __( 'Disabling Maintenance mode…' ) ); |
|
1296 |
1192 // Remove maintenance file, we're done with potential site-breaking changes. |
1297 // Remove maintenance file, we're done with potential site-breaking changes. |
1193 $wp_filesystem->delete( $maintenance_file ); |
1298 $wp_filesystem->delete( $maintenance_file ); |
1194 |
1299 |
1195 // 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, preventing installation of Twenty Twelve. |
1300 // 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, |
|
1301 // preventing installation of Twenty Twelve. |
1196 if ( '3.5' === $old_wp_version ) { |
1302 if ( '3.5' === $old_wp_version ) { |
1197 if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) ) { |
1303 if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) |
|
1304 && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) |
|
1305 ) { |
1198 $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); |
1306 $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); |
1199 } |
1307 } |
1200 } |
1308 } |
1201 |
1309 |
1202 /* |
1310 /* |
1203 * Copy new bundled plugins & themes. |
1311 * Copy new bundled plugins & themes. |
1204 * This gives us the ability to install new plugins & themes bundled with |
1312 * This gives us the ability to install new plugins & themes bundled with |
1205 * future versions of WordPress whilst avoiding the re-install upon upgrade issue. |
1313 * future versions of WordPress whilst avoiding the re-install upon upgrade issue. |
1206 * $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated. |
1314 * $development_build controls us overwriting bundled themes and plugins when a non-stable release is being updated. |
1207 */ |
1315 */ |
1208 if ( ! is_wp_error( $result ) && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) ) { |
1316 if ( ! is_wp_error( $result ) |
|
1317 && ( ! defined( 'CORE_UPGRADE_SKIP_NEW_BUNDLED' ) || ! CORE_UPGRADE_SKIP_NEW_BUNDLED ) |
|
1318 ) { |
1209 foreach ( (array) $_new_bundled_files as $file => $introduced_version ) { |
1319 foreach ( (array) $_new_bundled_files as $file => $introduced_version ) { |
1210 // If a $development_build or if $introduced version is greater than what the site was previously running. |
1320 // If a $development_build or if $introduced version is greater than what the site was previously running. |
1211 if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) { |
1321 if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) { |
1212 $directory = ( '/' === $file[ strlen( $file ) - 1 ] ); |
1322 $directory = ( '/' === $file[ strlen( $file ) - 1 ] ); |
1213 |
1323 |