Changeset 60913 for trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
- Timestamp:
- 10/07/2025 11:32:04 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php
r56559 r60913 364 364 */ 365 365 public function the_script() { 366 echo '<script>'; 367 include get_template_directory() . '/assets/js/dark-mode-toggler.js'; // phpcs:ignore WPThemeReview.CoreFunctionality.FileInclude 368 echo '</script>'; 366 $path = 'assets/js/dark-mode-toggler.js'; 367 $js = rtrim( file_get_contents( trailingslashit( get_template_directory() ) . $path ) ); 368 $js .= "\n//# sourceURL=" . esc_url_raw( trailingslashit( get_template_directory_uri() ) . $path ); 369 if ( function_exists( 'wp_print_inline_script_tag' ) ) { 370 wp_print_inline_script_tag( $js ); 371 } else { 372 printf( "<script>%s</script>\n", $js ); 373 } 369 374 } 370 375
Note: See TracChangeset
for help on using the changeset viewer.