From d86721279023bd987b7aaac8280c8d6115dd5dd5 Mon Sep 17 00:00:00 2001 From: FrankZamora Date: Thu, 27 Nov 2025 13:41:13 -0600 Subject: [PATCH] Debug: Add logging to hooks registration --- .../Infrastructure/Wordpress/YoutubeFacadeHooksRegistrar.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Public/YoutubeFacade/Infrastructure/Wordpress/YoutubeFacadeHooksRegistrar.php b/Public/YoutubeFacade/Infrastructure/Wordpress/YoutubeFacadeHooksRegistrar.php index d7a0afd4..727d5ca9 100644 --- a/Public/YoutubeFacade/Infrastructure/Wordpress/YoutubeFacadeHooksRegistrar.php +++ b/Public/YoutubeFacade/Infrastructure/Wordpress/YoutubeFacadeHooksRegistrar.php @@ -31,9 +31,14 @@ final class YoutubeFacadeHooksRegistrar */ public function register(): void { + // Debug: Log that registration is happening + file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " HooksRegistrar::register() called\n", FILE_APPEND); + // Filter post content to replace YouTube iframes with facades add_filter('the_content', [$this->contentFilter, 'filter'], 20); + file_put_contents('/tmp/yt-debug.log', date('H:i:s') . " the_content filter registered\n", FILE_APPEND); + // Enqueue facade assets add_action('wp_enqueue_scripts', [$this, 'enqueueAssets'], 15); }