' . "\n"; echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; // Deploy replaces REPLACE_UMAMI_WEBSITE_ID with a UUID; only emit when set. if (preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i', NOMADRO_UMAMI_WEBSITE_ID)) { echo '' . "\n"; } }, 1); /** Organization + WebSite JSON-LD for trust/SEO. */ add_action('wp_head', static function (): void { if (is_admin()) { return; } $data = [ '@context' => 'https://schema.org', '@graph' => [ [ '@type' => 'Organization', '@id' => home_url('/#organization'), 'name' => 'Nomadro', 'url' => home_url('/'), 'email' => 'hello@nomadro.com', 'description' => 'Practical YouTube channel operations guides—production workflows, analytics, monetization, and creator team playbooks.', ], [ '@type' => 'WebSite', '@id' => home_url('/#website'), 'url' => home_url('/'), 'name' => 'Nomadro', 'publisher' => ['@id' => home_url('/#organization')], 'inLanguage' => 'en-US', ], ], ]; echo '' . "\n"; }, 5); /** Serve ads.txt from WordPress root reliably. */ add_action('init', static function (): void { $uri = isset($_SERVER['REQUEST_URI']) ? strtok($_SERVER['REQUEST_URI'], '?') : ''; if ($uri === '/ads.txt') { status_header(200); header('Content-Type: text/plain; charset=utf-8'); header('X-Robots-Tag: noindex'); echo "google.com, pub-8461145959530971, DIRECT, f08c47fec0942fa0\n"; exit; } }); add_action('wp_enqueue_scripts', static function (): void { wp_enqueue_style( 'nomadro-theme', content_url('mu-plugins/nomadro-theme.css'), [], '2.1.0' ); }, 30); add_action('wp_body_open', static function (): void { if (!is_front_page() && !is_home()) { return; } echo ''; echo 'YouTube operations'; echo 'Run a YouTube channel like an operator.'; echo 'Practical guides on production pipelines, analytics, monetization, and team workflows—written for creators who treat YouTube as a business.'; echo ''; }); add_action('wp_footer', static function (): void { if (!is_front_page() && !is_home()) { return; } echo ''; }, 20); /** Persistent trust links in footer (AdSense reviewers look for these). */ add_action('wp_footer', static function (): void { $links = [ home_url('/about/') => 'About', home_url('/contact/') => 'Contact', home_url('/privacy-policy/') => 'Privacy Policy', home_url('/terms/') => 'Terms of Service', home_url('/disclaimer/') => 'Disclaimer', ]; echo ''; foreach ($links as $url => $label) { echo '' . esc_html($label) . ''; } echo ''; }, 5); /** Harden & hygiene. */ remove_action('wp_head', 'wp_generator'); add_filter('the_generator', '__return_empty_string'); add_filter('xmlrpc_enabled', '__return_false'); /** Disable comments/pings by default for cleaner review surface. */ add_filter('comments_open', '__return_false', 20, 2); add_filter('pings_open', '__return_false', 20, 2); add_filter('comments_array', static function () { return []; }, 10, 2); /** Better author label in bylines. */ add_filter('the_author', static function ($author) { return 'Nomadro Editorial'; }); add_filter('get_the_author_display_name', static function () { return 'Nomadro Editorial'; });
Practical guides on production pipelines, analytics, monetization, and team workflows—written for creators who treat YouTube as a business.