From 7560bd66e2a13dc29d1c8968e39f33118fad14f5 Mon Sep 17 00:00:00 2001 From: Prasath Nadarajah <n.prasath.002@gmail.com> Date: Mon, 20 Aug 2012 10:47:37 +0530 Subject: [PATCH] Changing code to load environment dynamically --- includes/class-wp-push-syndication-server.php | 2 +- push-syndication-server.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/includes/class-wp-push-syndication-server.php b/includes/class-wp-push-syndication-server.php index b3ea108..b8cf922 100644 --- a/includes/class-wp-push-syndication-server.php +++ b/includes/class-wp-push-syndication-server.php @@ -9,7 +9,7 @@ require_once( dirname( __FILE__ ) . '/includes/class-wp-client-factory.php' ); -class Push_Syndication_Server { +class WP_Push_Syndication_Server { private $push_syndicate_settings; private $push_syndicate_tranports; diff --git a/push-syndication-server.php b/push-syndication-server.php index 2255ee7..c02ae13 100644 --- a/push-syndication-server.php +++ b/push-syndication-server.php @@ -12,7 +12,14 @@ License: GPLv2 or later **************************************************************************/ +require_once ( dirname( __FILE__ ) . '/includes/class-wpcom-push-syndication-server.php' ); +require_once ( dirname( __FILE__ ) . '/includes/class-wp-push-syndication-server.php' ); -$Push_Syndication_Server = new Push_Syndication_Server(); + +if ( !defined( 'PUSH_SYNDICATION_ENVIRONMENT' ) ) + define( 'PUSH_SYNDICATION_ENVIRONMENT', 'WP' ); + +$push_syndication_server_class = PUSH_SYNDICATION_ENVIRONMENT . 'Push_Syndication_Server'; +$push_syndication_server = new $push_syndication_server_class(); ?> -- GitLab