Uses
Uses | Description |
---|---|
wp-admin/includes/update.php: get_core_checksums() | Gets and caches the checksums for the given version of WordPress. |
Compare the disk file checksums against the expected checksums.
(bool) True if the checksums match, otherwise false.
File: wp-admin/includes/class-core-upgrader.php
public function check_files() { global $wp_version, $wp_local_package; $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' ); if ( ! is_array( $checksums ) ) { return false; } foreach ( $checksums as $file => $checksum ) { // Skip files which get updated. if ( 'wp-content' === substr( $file, 0, 10 ) ) { continue; } if ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum ) { return false; } } return true; }
Version | Description |
---|---|
3.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/core_upgrader/check_files