Skip to content

Commit

Permalink
Option #1
Browse files Browse the repository at this point in the history
  • Loading branch information
samhotchkiss committed Jan 22, 2015
1 parent f95e311 commit 245fc65
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions class.jetpack.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

/**
Expand Down Expand Up @@ -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 */

Expand Down

0 comments on commit 245fc65

Please sign in to comment.