diff --git a/lib/config.php b/lib/config.php index 49b73ce..78d60ef 100644 --- a/lib/config.php +++ b/lib/config.php @@ -78,3 +78,13 @@ function roots_display_sidebar() { * Default: 940px is the default Bootstrap container width. */ if (!isset($content_width)) { $content_width = 940; } + +/** + * Define helper constants + */ +$get_theme_name = explode('/themes/', get_template_directory()); + +define('RELATIVE_PLUGIN_PATH', str_replace(home_url() . '/', '', plugins_url())); +define('RELATIVE_CONTENT_PATH', str_replace(home_url() . '/', '', content_url())); +define('THEME_NAME', next($get_theme_name)); +define('THEME_PATH', RELATIVE_CONTENT_PATH . '/themes/' . THEME_NAME); diff --git a/lib/init.php b/lib/init.php index 09b651e..997480b 100644 --- a/lib/init.php +++ b/lib/init.php @@ -26,11 +26,3 @@ add_action('after_setup_theme', 'roots_setup'); // Backwards compatibility for older than PHP 5.3.0 if (!defined('__DIR__')) { define('__DIR__', dirname(__FILE__)); } - -// Define helper constants -$get_theme_name = explode('/themes/', get_template_directory()); - -define('RELATIVE_PLUGIN_PATH', str_replace(home_url() . '/', '', plugins_url())); -define('RELATIVE_CONTENT_PATH', str_replace(home_url() . '/', '', content_url())); -define('THEME_NAME', next($get_theme_name)); -define('THEME_PATH', RELATIVE_CONTENT_PATH . '/themes/' . THEME_NAME);