make debug file optional

This commit is contained in:
Matthias Pfefferle 2023-05-11 14:40:47 +02:00
parent cfa8974ffa
commit 663c6315c9

View file

@ -88,8 +88,9 @@ if ( \get_option( 'blog_public', 1 ) ) {
Rest\NodeInfo::init(); Rest\NodeInfo::init();
} }
if ( \WP_DEBUG ) { $debug_file = \dirname( __FILE__ ) . '/includes/debug.php';
require_once \dirname( __FILE__ ) . '/includes/debug.php'; if ( \WP_DEBUG && file_exists( $debug_file ) && is_readable( $debug_file ) ) {
require_once $debug_file;
} }
/** /**