From eec11c76b9d54c208a540918adc559b8afd49fe1 Mon Sep 17 00:00:00 2001 From: Scott Walkinshaw Date: Fri, 21 Sep 2012 16:27:33 -0400 Subject: [PATCH] Re-order init file --- lib/init.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/init.php b/lib/init.php index 47f1c1b..65c440c 100644 --- a/lib/init.php +++ b/lib/init.php @@ -3,19 +3,6 @@ * Roots initial setup and constants */ -// 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('WP_BASE', wp_base_dir()); -define('THEME_NAME', next($get_theme_name)); -define('RELATIVE_PLUGIN_PATH', str_replace(site_url() . '/', '', plugins_url())); -define('FULL_RELATIVE_PLUGIN_PATH', WP_BASE . '/' . RELATIVE_PLUGIN_PATH); -define('RELATIVE_CONTENT_PATH', str_replace(site_url() . '/', '', content_url())); -define('THEME_PATH', RELATIVE_CONTENT_PATH . '/themes/' . THEME_NAME); - function roots_setup() { // Make theme available for translation @@ -40,3 +27,16 @@ function roots_setup() { } 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('WP_BASE', wp_base_dir()); +define('THEME_NAME', next($get_theme_name)); +define('RELATIVE_PLUGIN_PATH', str_replace(site_url() . '/', '', plugins_url())); +define('FULL_RELATIVE_PLUGIN_PATH', WP_BASE . '/' . RELATIVE_PLUGIN_PATH); +define('RELATIVE_CONTENT_PATH', str_replace(site_url() . '/', '', content_url())); +define('THEME_PATH', RELATIVE_CONTENT_PATH . '/themes/' . THEME_NAME);