From 7e97868d869f80c749722d04bd8b13dd7f72820b Mon Sep 17 00:00:00 2001 From: Frankie Jarrett Date: Thu, 15 May 2014 11:51:13 -0500 Subject: [PATCH 1/2] Change priority of connectors load to be after widgets_init --- stream.php | 2 +- tests/tests/test-stream.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stream.php b/stream.php index 73090b284..27acce20b 100755 --- a/stream.php +++ b/stream.php @@ -93,7 +93,7 @@ private function __construct() { // Load connectors require_once WP_STREAM_INC_DIR . 'connectors.php'; - add_action( 'init', array( 'WP_Stream_Connectors', 'load' ), 0 ); + add_action( 'init', array( 'WP_Stream_Connectors', 'load' ), 2 ); // Just after widgets_init at 1 // Load query class require_once WP_STREAM_INC_DIR . 'query.php'; diff --git a/tests/tests/test-stream.php b/tests/tests/test-stream.php index 53a040c25..840f8eee1 100644 --- a/tests/tests/test-stream.php +++ b/tests/tests/test-stream.php @@ -21,7 +21,7 @@ public function test_constructor() { $actions_tests = array( array( 'init', 'WP_Stream_Settings', 'load' ), array( 'plugins_loaded', 'WP_Stream_Log', 'load' ), - array( 'init', 'WP_Stream_Connectors', 'load', 0 ), + array( 'init', 'WP_Stream_Connectors', 'load', 2 ), // Just after widgets_init at 1 ); $this->do_action_validation( $actions_tests ); From 952b005e5dc71064ce52f166a5d6aae67931af0e Mon Sep 17 00:00:00 2001 From: Frankie Jarrett Date: Thu, 15 May 2014 12:05:18 -0500 Subject: [PATCH 2/2] Use init priority of 9 instead of 2 --- stream.php | 2 +- tests/tests/test-stream.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/stream.php b/stream.php index 27acce20b..ef3744328 100755 --- a/stream.php +++ b/stream.php @@ -93,7 +93,7 @@ private function __construct() { // Load connectors require_once WP_STREAM_INC_DIR . 'connectors.php'; - add_action( 'init', array( 'WP_Stream_Connectors', 'load' ), 2 ); // Just after widgets_init at 1 + add_action( 'init', array( 'WP_Stream_Connectors', 'load' ), 9 ); // Load query class require_once WP_STREAM_INC_DIR . 'query.php'; diff --git a/tests/tests/test-stream.php b/tests/tests/test-stream.php index 840f8eee1..15e8ed1c2 100644 --- a/tests/tests/test-stream.php +++ b/tests/tests/test-stream.php @@ -21,7 +21,7 @@ public function test_constructor() { $actions_tests = array( array( 'init', 'WP_Stream_Settings', 'load' ), array( 'plugins_loaded', 'WP_Stream_Log', 'load' ), - array( 'init', 'WP_Stream_Connectors', 'load', 2 ), // Just after widgets_init at 1 + array( 'init', 'WP_Stream_Connectors', 'load', 9 ), ); $this->do_action_validation( $actions_tests );