Changeset 47808 for trunk/src/wp-admin/includes/update-core.php
- Timestamp:
- 05/16/2020 06:40:52 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update-core.php
r47771 r47808 1042 1042 if ( is_array( $checksums ) ) { 1043 1043 foreach ( $checksums as $file => $checksum ) { 1044 if ( 'wp-content' == substr( $file, 0, 10 ) ) {1044 if ( 'wp-content' === substr( $file, 0, 10 ) ) { 1045 1045 continue; 1046 1046 } … … 1115 1115 if ( isset( $checksums ) && is_array( $checksums ) ) { 1116 1116 foreach ( $checksums as $file => $checksum ) { 1117 if ( 'wp-content' == substr( $file, 0, 10 ) ) {1117 if ( 'wp-content' === substr( $file, 0, 10 ) ) { 1118 1118 continue; 1119 1119 } … … 1188 1188 1189 1189 // 3.5 -> 3.5+ - an empty twentytwelve directory was created upon upgrade to 3.5 for some users, preventing installation of Twenty Twelve. 1190 if ( '3.5' == $old_wp_version ) {1190 if ( '3.5' === $old_wp_version ) { 1191 1191 if ( is_dir( WP_CONTENT_DIR . '/themes/twentytwelve' ) && ! file_exists( WP_CONTENT_DIR . '/themes/twentytwelve/style.css' ) ) { 1192 1192 $wp_filesystem->delete( $wp_filesystem->wp_themes_dir() . 'twentytwelve/' ); … … 1204 1204 // If a $development_build or if $introduced version is greater than what the site was previously running. 1205 1205 if ( $development_build || version_compare( $introduced_version, $old_wp_version, '>' ) ) { 1206 $directory = ( '/' == $file[ strlen( $file ) - 1 ] ); 1207 list($type, $filename) = explode( '/', $file, 2 ); 1206 $directory = ( '/' === $file[ strlen( $file ) - 1 ] ); 1207 1208 list( $type, $filename ) = explode( '/', $file, 2 ); 1208 1209 1209 1210 // Check to see if the bundled items exist before attempting to copy them. … … 1212 1213 } 1213 1214 1214 if ( 'plugins' == $type ) {1215 if ( 'plugins' === $type ) { 1215 1216 $dest = $wp_filesystem->wp_plugins_dir(); 1216 } elseif ( 'themes' == $type ) {1217 } elseif ( 'themes' === $type ) { 1217 1218 // Back-compat, ::wp_themes_dir() did not return trailingslash'd pre-3.2. 1218 1219 $dest = trailingslashit( $wp_filesystem->wp_themes_dir() ); … … 1344 1345 } 1345 1346 1346 if ( 'f' == $fileinfo['type'] ) {1347 if ( 'f' === $fileinfo['type'] ) { 1347 1348 if ( ! $wp_filesystem->copy( $from . $filename, $to . $filename, true, FS_CHMOD_FILE ) ) { 1348 1349 // If copy failed, chmod file to 0644 and try again. … … 1352 1353 } 1353 1354 } 1354 } elseif ( 'd' == $fileinfo['type'] ) {1355 } elseif ( 'd' === $fileinfo['type'] ) { 1355 1356 if ( ! $wp_filesystem->is_dir( $to . $filename ) ) { 1356 1357 if ( ! $wp_filesystem->mkdir( $to . $filename, FS_CHMOD_DIR ) ) { … … 1400 1401 1401 1402 // Ensure we only run this on the update-core.php page. The Core_Upgrader may be used in other contexts. 1402 if ( 'update-core.php' != $pagenow ) {1403 if ( 'update-core.php' !== $pagenow ) { 1403 1404 return; 1404 1405 } 1405 1406 1406 if ( 'do-core-upgrade' != $action && 'do-core-reinstall' != $action ) {1407 if ( 'do-core-upgrade' !== $action && 'do-core-reinstall' !== $action ) { 1407 1408 return; 1408 1409 }
Note: See TracChangeset
for help on using the changeset viewer.