From 245fc65052689352edf0444830484b9ee5b8683b Mon Sep 17 00:00:00 2001 From: Sam Hotchkiss Date: Fri, 16 Jan 2015 01:32:32 -0700 Subject: [PATCH] Option #1 --- class.jetpack.php | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/class.jetpack.php b/class.jetpack.php index 9e8225fcb5264..3c34ba380f528 100644 --- a/class.jetpack.php +++ b/class.jetpack.php @@ -379,7 +379,14 @@ private function Jetpack() { 'siteurl', 'blogname', 'gmt_offset', +<<<<<<< HEAD 'timezone_string' +======= + 'timezone_string', + 'jetpack_main_network_site', + 'jetpack_is_main_network', + 'security_report' +>>>>>>> Option #1 ); /** @@ -1041,6 +1048,35 @@ public function check_twitter_tags() { require_once JETPACK__PLUGIN_DIR . 'class.jetpack-twitter-cards.php'; } } + + + + /** + * Allows plugins to self report for our security dashboard. OPTION #1 + * + * @return null + */ + public function perform_security_reporting() { + + $security_report = array( + 'botnet' => array(), //Values: 'plugin'=>'Plugin Name', 'blocked'=>(int)(optional) + 'backup' => array(), //Values: 'plugin'=>'Plugin Name', 'last'=>(datetime)(optional), 'next'=>(datetime)(optional) + 'file_scanning' => array(), //Values: 'plugin'=>'Plugin Name', 'last'=>(datetime)(optional), 'next'=>(datetime)(optional) + 'spam' => array() //Values: 'plugin'=>'Plugin Name', 'blocked'=>(int)(optional) + ); + + $security_report = apply_filters( 'jetpack_security_report', $security_report ); + + Jetpack_Options::update_option( 'security_report', $security_report ); + + //Use Example: + $security_report['botnet'][] = array( 'plugin' => 'Jetpack Protect', 'blocked' => 12345 ); + + } + + + + /* Jetpack Options API */