WordPress.org

Plugin Directory

Changeset 573978


Ignore:
Timestamp:
07/18/12 07:59:49 (21 months ago)
Author:
ramiy
Message:

Remove "phoning home" according to wordpress plugin guidelines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • treato/trunk/treato.php

    r573739 r573978  
    44Plugin URI: http://treato.com/ 
    55Description: Treato travels around the Web to collect and analyze patient written forum and blog posts. The plugin gives access to this new aggregated information. 
    6 Version: 1.0.5 
     6Version: 1.0.6 
    77Author: Treato 
    88Author URI: http://treato.com/ 
     
    194194add_action( 'widgets_init', create_function( '', 'register_widget("Treato");' )); 
    195195 
    196  
    197  
    198 /** 
    199  * Server Ping for stats purpose. 
    200  */ 
    201 function ping( $host ) { 
    202     exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval); 
    203     return $rval === 0; 
    204 } 
    205  
    206  
    207 /** 
    208  * Registers activation hook for the plugin. 
    209  */ 
    210 function treato_activate() { 
    211     // Send mail 
    212     $to = 'roee@treato.com'; 
    213     $subject = 'Treato WordPress Plugin Activation'; 
    214     $message = home_url(); 
    215     mail( $to, $subject, $message ); 
    216     // Ping server 
    217     $ping = ping( 'http://treato.com/widgets/general/wordpress/?action=activate&site=' . home_url() ); 
    218 } 
    219 register_activation_hook( __FILE__, 'treato_activate' ); 
    220  
    221  
    222 /** 
    223  * Registers deactivation hook for the plugin. 
    224  */ 
    225 function treato_deactivate() { 
    226     // Send mail 
    227     $to = 'roee@treato.com'; 
    228     $subject = 'Treato WordPress Plugin Deactivation'; 
    229     $message = home_url(); 
    230     mail( $to, $subject, $message );  
    231     // Ping server 
    232     $ping = ping( 'http://treato.com/widgets/general/wordpress/?action=deactivation&site=' . home_url() ); 
    233 } 
    234 register_deactivation_hook( __FILE__, 'treato_deactivate' ); 
    235  
    236  
    237 /** 
    238  * Registers uninstall hook for the plugin. 
    239  */ 
    240 function treato_uninstall() { 
    241     // Send mail 
    242     $to = 'roee@treato.com'; 
    243     $subject = 'Treato WordPress Plugin Uninstall'; 
    244     $message = home_url(); 
    245     mail( $to, $subject, $message );  
    246     // Ping server 
    247     $ping = ping( 'http://treato.com/widgets/general/wordpress/?action=uninstall&site=' . home_url() ); 
    248 } 
    249 register_uninstall_hook( __FILE__, 'treato_uninstall' ); 
    250  
    251196?> 
Note: See TracChangeset for help on using the changeset viewer.