From 6d7ca72756f83aff5b3525af91995a1478af174e Mon Sep 17 00:00:00 2001
From: Prasath Nadarajah <n.prasath.002@gmail.com>
Date: Thu, 2 Aug 2012 23:15:31 -0700
Subject: [PATCH] check whether the site is enabled

---
 push-syndication-server/push-syndication-server.php | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/push-syndication-server/push-syndication-server.php b/push-syndication-server/push-syndication-server.php
index 843a9e1..c0b0111 100644
--- a/push-syndication-server/push-syndication-server.php
+++ b/push-syndication-server/push-syndication-server.php
@@ -60,6 +60,8 @@ class Push_Syndication_Server {
 		add_action( 'syn_delete_content', array(&$this, 'delete_content') );
 		add_action( 'syn_syndicate_options', array(&$this, 'syndicate_options') );
 
+	    add_action('admin_notices', array(&$this, 'syndicate_options'));
+
     }
 
     public function init() {
@@ -432,6 +434,10 @@ class Push_Syndication_Server {
 
 	}
 
+	public function display_siteoptions_admin_messages() {
+
+	}
+
 	/*******  SYNCING OPTIONS  *******/
 	public function schedule_syndicate_options_cron() {
 
@@ -468,6 +474,11 @@ class Push_Syndication_Server {
 		$error_sites = array();
 
 		foreach( $sites as $site ) {
+
+			$site_enabled = get_post_meta( $site->ID, 'syn_site_enabled', true);
+			if( $site_enabled != 'on' )
+				continue;
+
 			$transport_type = get_post_meta( $site->ID, 'syn_transport_type', true);
 			$client = wp_client_factory::get_client( $transport_type  ,$site->ID );
 			$result = $client->set_options( $selected_siteoptions, $site->ID );
-- 
GitLab