From c8c8caee621a9c10bd42be01305977dc4193c2f8 Mon Sep 17 00:00:00 2001 From: Gary Kealy Date: Tue, 30 Jul 2019 21:30:15 +0100 Subject: [PATCH] Use get_template_directory() --- functions.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/functions.php b/functions.php index 5333aa8..9d29567 100644 --- a/functions.php +++ b/functions.php @@ -27,9 +27,5 @@ $understrap_includes = array( ); foreach ( $understrap_includes as $file ) { - $filepath = locate_template( 'inc' . $file ); - if ( ! $filepath ) { - trigger_error( sprintf( 'Error locating /inc%s for inclusion', $file ), E_USER_ERROR ); - } - require_once $filepath; + require_once get_template_directory() . '/inc' . $file; }