wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php:365Prints the dark-mode switch script.
void public function the_script() { $path = 'assets/js/dark-mode-toggler.js'; $js = rtrim( file_get_contents( trailingslashit( get_template_directory() ) . $path ) ); $js .= "\n//# sourceURL=" . esc_url_raw( trailingslashit( get_template_directory_uri() ) . $path ); if ( function_exists( 'wp_print_inline_script_tag' ) ) { wp_print_inline_script_tag( $js ); } else { printf( "<script>%s</script>\n", $js ); } }Introduced in Twenty Twenty-One 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.