admin_url( 'admin-ajax.php' ), 'nonce' => wp_create_nonce( 'oribi_contact_nonce' ), ] ); // Threaded comments (if ever enabled) if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } ); /* ── Font Awesome 6 Free (CDN) ─────────────────────────────── */ add_action( 'wp_enqueue_scripts', function () { wp_enqueue_style( 'font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css', [], null ); } ); add_action( 'enqueue_block_editor_assets', function () { wp_enqueue_style( 'font-awesome', 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css', [], null ); } ); /* ── Google Fonts - dynamic based on theme settings ────────── */ add_action( 'wp_enqueue_scripts', 'oribi_enqueue_selected_fonts' ); add_action( 'enqueue_block_editor_assets', 'oribi_enqueue_selected_fonts' ); /** * Enqueue Google Fonts stylesheets for the selected body & heading fonts. */ function oribi_enqueue_selected_fonts() { if ( ! function_exists( 'oribi_get_setting' ) ) { return; } $slugs = array_unique( array_filter( [ oribi_get_setting( 'font_family' ), oribi_get_setting( 'font_heading' ), ] ) ); foreach ( $slugs as $slug ) { $url = oribi_get_google_font_url( $slug ); if ( $url ) { wp_enqueue_style( 'oribi-gf-' . $slug, $url, [], null ); } } } /* ── Generated theme CSS (colour / font / spacing overrides) ─ */ add_action( 'wp_enqueue_scripts', 'oribi_enqueue_generated_css', 20 ); add_action( 'enqueue_block_editor_assets', 'oribi_enqueue_generated_css', 20 ); /** * Enqueue the dynamically generated CSS file that applies design-token * overrides from the admin settings page. */ function oribi_enqueue_generated_css() { if ( ! function_exists( 'oribi_generated_css_url' ) ) { return; } $url = oribi_generated_css_url(); $ver = get_theme_mod( 'oribi_css_version', '1' ); wp_enqueue_style( 'oribi-custom-tokens', $url, [ 'oribi-main' ], $ver ); }