revert 8cad3c2d3d
revert Merge pull request 'feat(widgets): add phase 4 validation and accessibility' (#6) from worktree/widgets-phase-4 into main Reviewed-on: https://gitea.rutua.cn/kate522/wordpress-theme-aksrt/pulls/6
This commit is contained in:
1 parent
e1723a8f08
commit
463ef36ed3
23 files changed
+53
-8078
No files matched your search
@@ -258,13 +258,8 @@ foreach ($pinned_assets as $asset => $hash) {
|
||||
$path = $root . '/assets/widgets/third-party/' . $asset;
|
||||
if (!is_file($path)) {
|
||||
$errors[] = 'Missing pinned widget dependency: ' . $asset;
|
||||
} else {
|
||||
$contents = (string) file_get_contents($path);
|
||||
$raw_hash = hash('sha256', $contents);
|
||||
$lf_hash = hash('sha256', str_replace("\r\n", "\n", $contents));
|
||||
if ($raw_hash !== $hash && $lf_hash !== $hash) {
|
||||
$errors[] = 'Pinned widget dependency changed: ' . $asset;
|
||||
}
|
||||
} elseif (hash_file('sha256', $path) !== $hash) {
|
||||
$errors[] = 'Pinned widget dependency changed: ' . $asset;
|
||||
}
|
||||
}
|
||||
if (!is_file($root . '/assets/widgets/third-party/THIRD_PARTY.md')) {
|
||||
|
||||
Reference in new issue
Block a user