angelleye / paypal-security-for-wordpress

A security scanner for WordPress that looks for PayPal concerns and provides feedback.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Remote logs for activation/deactivation. #9

Closed angelleye closed 9 years ago

angelleye commented 9 years ago

Need to add remote log for when people activate or disable the plugin like we've done with my other plugins. This logs it in a custom db table I have on my server.

For activation the snippet would be this..

// Log activation in Angell EYE database via web service.
$log_url = $_SERVER['HTTP_HOST'];
$log_plugin_id = 10;
$log_activation_status = 1;
wp_remote_request('http://www.angelleye.com/web-services/wordpress/update-plugin-status.php?url='.$log_url.'&plugin_id='.$log_plugin_id.'&activation_status='.$log_activation_status);

For the deactivate it would be...

// Log activation in Angell EYE database via web service.
$log_url = $_SERVER['HTTP_HOST'];
$log_plugin_id = 10;
$log_activation_status = 0;
wp_remote_request('http://www.angelleye.com/web-services/wordpress/update-plugin-status.php?url='.$log_url.'&plugin_id='.$log_plugin_id.'&activation_status='.$log_activation_status);

Those would go in the register_activation_hook and register_deactivation_hook methods.