fix(release): repair functions.php + ARCHITECTURE.md truncations from prior commit
The prior commit (4a506e1c) was assembled from a sandbox bash mount that
returned a truncated view of two files. Net effect:
- functions.php was cut at line 235, dropping the closing of
peptide_starter_inline_dark_mode_script() and its add_action
registration. wp_head dark-mode script was effectively removed.
- ARCHITECTURE.md was cut mid-paragraph and lost its Version section.
Both files are now rebuilt from main + minimum-delta patches:
- functions.php: +4 minimal additions (perf-asset-policy @see, version
bump, require_once, add_action). Dark-mode script preserved.
- ARCHITECTURE.md: +3 lines (perf-asset-policy in inc/ tree, version
banner bumped). Version section preserved.
- style.css, CHANGELOG.md, CONVENTIONS.md: also rebuilt from main +
targeted patches as a safety measure (no functional change vs the
prior commit, just guaranteed-untruncated).
Verified: every file ends with a trailing newline; functions.php contains
the dark-mode add_action; ARCHITECTURE.md contains the Version section.
Co-authored-by: Engineer Theme (in-session subagent) <engineer-theme@peptiderepo.users.noreply.github.com>
This commit is contained in:
@@ -233,4 +233,11 @@ function peptide_starter_inline_dark_mode_script() {
|
||||
var html = document.documentElement;
|
||||
var stored = localStorage.getItem('peptide-starter-theme');
|
||||
var defaultTheme = <?php echo wp_json_encode( $default_dark ); ?>;
|
||||
var systemDark = window.matchMedia('(prefers-col
|
||||
var systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
var theme = stored || (systemDark ? 'dark' : defaultTheme);
|
||||
html.setAttribute('data-theme', theme);
|
||||
})();
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
add_action( 'wp_head', 'peptide_starter_inline_dark_mode_script' );
|
||||
|
||||
Reference in New Issue
Block a user