From baa53925ab6069581a44e8847c5bcad3bb6579e9 Mon Sep 17 00:00:00 2001 From: kevin dees Date: Fri, 28 Aug 2015 16:30:48 -0400 Subject: [PATCH] make typerocket includible from a plugin --- config.sample.php | 2 +- core/start.php | 5 ++--- src/Config.php | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/config.sample.php b/config.sample.php index 430baed..5fe5fad 100644 --- a/config.sample.php +++ b/config.sample.php @@ -65,7 +65,7 @@ | */ define('TR_PLUGINS_FOLDER_PATH', __DIR__ . '/plugins'); -define('TR_URL_PLUGINS_FOLDER', get_stylesheet_directory_uri() . '/' .TR_FOLDER . '/plugins'); +define('TR_PLUGINS_URL', get_stylesheet_directory_uri() . '/' .TR_FOLDER . '/plugins'); /* |-------------------------------------------------------------------------- diff --git a/core/start.php b/core/start.php index 5caa734..4f8f11c 100644 --- a/core/start.php +++ b/core/start.php @@ -21,7 +21,7 @@ | Set the version for TypeRocket using the style major.minor.patch | */ -define( 'TR_VERSION', '2.0.11' ); +define( 'TR_VERSION', '2.0.12' ); /* |-------------------------------------------------------------------------- @@ -94,9 +94,8 @@ | the typerocket_loaded hook to access TypeRocket from your WP plugins. | */ -do_action( 'typerocket_loaded' ); - add_action( 'after_setup_theme', function () { + do_action( 'typerocket_loaded' ); \TypeRocket\Registry::initHooks(); } ); diff --git a/src/Config.php b/src/Config.php index 565481a..7b1d62c 100644 --- a/src/Config.php +++ b/src/Config.php @@ -88,7 +88,7 @@ private function defaultPaths() 'extend' => defined( 'TR_APP_FOLDER_PATH' ) ? TR_APP_FOLDER_PATH : __DIR__ . '/../app', 'urls' => array( 'theme' => get_stylesheet_directory_uri(), - 'assets' => get_stylesheet_directory_uri() . '/' . self::$folder . '/assets', + 'assets' => defined( 'TR_ASSETS_URL' ) ? TR_ASSETS_URL : get_stylesheet_directory_uri() . '/' . self::$folder . '/assets', 'plugins' => defined( 'TR_PLUGINS_URL' ) ? TR_PLUGINS_URL : get_stylesheet_directory_uri() . '/' . self::$folder . '/plugins' ) );