WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Core_Upgrader::check_files() public WP 3.7.0

Compare the disk file checksums against the expected checksums.

Это метод класса: Core_Upgrader{}

Хуков нет.

Возвращает

true/false. True if the checksums match, otherwise false.

Использование

$Core_Upgrader = new Core_Upgrader();
$Core_Upgrader->check_files();

Заметки

  • Global. Строка. $wp_version The WordPress version string.
  • Global. Строка. $wp_local_package Locale code of the package.

Список изменений

С версии 3.7.0 Введена.

Код Core_Upgrader::check_files() WP 5.5.1

wp-admin/includes/class-core-upgrader.php
<?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;
}