get( 'Version' ); $styles = array( 'lede-style' => 'style.css', 'lede-layout' => 'assets/css/layout.css', ); foreach ( $styles as $handle => $file ) { wp_enqueue_style( $handle, get_parent_theme_file_uri( $file ), array(), $version ); wp_style_add_data( $handle, 'path', get_parent_theme_file_path( $file ) ); } } add_action( 'wp_enqueue_scripts', 'lede_enqueue_styles' ); /** * Preloads the body font so text renders in it on first paint. * * Child themes that change the body font should filter this list * (return an empty array to disable), or the preloaded file is wasted. */ function lede_preload_fonts(): void { $fonts = apply_filters( 'lede_preload_fonts', array( get_parent_theme_file_uri( 'assets/fonts/inter/Inter-Variable.woff2' ) ) ); foreach ( (array) $fonts as $font ) { printf( '' . "\n", esc_url( $font ) ); } } add_action( 'wp_head', 'lede_preload_fonts', 1 ); /** * Makes the comment form title an h2 (core default: h3). * * With no comments there's no "N responses" h2, so an h3 would follow the * post's h1 directly and break heading order. * * @param array $defaults Comment form defaults. * @return array */ function lede_comment_form_defaults( array $defaults ): array { $defaults['title_reply_before'] = '