From 4417f0225f79c5857c584eb24e402e19f5ab57e5 Mon Sep 17 00:00:00 2001 From: robneu Date: Mon, 27 Mar 2017 14:59:52 -0400 Subject: [PATCH] Check for an instance of the main GistPress class before running Fixes #72 --- gistpress.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gistpress.php b/gistpress.php index ecb4382..168f23d 100644 --- a/gistpress.php +++ b/gistpress.php @@ -60,8 +60,10 @@ function gistpress_i18n() { */ function gistpress_init() { global $gistpress, $gistpress_logger; - $gistpress->set_logger( $gistpress_logger ); - $gistpress->run(); + if ( $gistpress instanceof GistPress ) { + $gistpress->set_logger( $gistpress_logger ); + $gistpress->run(); + } } add_action( 'init', 'gistpress_init' );