From 1b30055287f00367aa9f61b1aff235fc3b641742 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Tue, 9 Oct 2018 08:58:25 -0400 Subject: [PATCH] Log activation errors if in debug mode --- includes/init.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/init.php b/includes/init.php index dc28418..a7d5ade 100644 --- a/includes/init.php +++ b/includes/init.php @@ -19,6 +19,9 @@ add_action( 'user_register', function( $user_id ) { add_action( 'pterotype_init', function() { \schema\run_migrations(); \actors\initialize_actors(); + if ( WP_DEBUG ) { + file_put_contents( __DIR__ . '/activation_errors.log', ob_get_contents() ); + } } ); add_action( 'pterotype_load', function() {