From 69a38025a65abdfbbff323058abd2fafd7365bc0 Mon Sep 17 00:00:00 2001 From: Prasath Nadarajah <n.prasath.002@gmail.com> Date: Thu, 2 Aug 2012 12:42:48 -0700 Subject: [PATCH] loggign errored sites and displaying them --- push-syndication-server/push-syndication-server.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/push-syndication-server/push-syndication-server.php b/push-syndication-server/push-syndication-server.php index bda6102..1a688ac 100644 --- a/push-syndication-server/push-syndication-server.php +++ b/push-syndication-server/push-syndication-server.php @@ -464,10 +464,18 @@ class Push_Syndication_Server { $selected_siteoptions = array_intersect_key( wp_load_alloptions(), array_combine(get_option( 'syn_selected_siteoptions' ), get_option( 'syn_selected_siteoptions' )) ); + // Holds the error sites with the error message + $error_sites = array(); + foreach( $sites as $site ) { $transport_type = get_post_meta( $site->ID, 'syn_transport_type', true); $client = wp_client_factory::get_client( $transport_type ,$site->ID ); - $client->set_options( $selected_siteoptions, $site->ID ); + $result = $client->set_options( $selected_siteoptions, $site->ID ); + if( !$result ) { + $error_sites[] = array( + + ); + } } } -- GitLab