[wp-hackers] Plugin Privacy Option (was Revisiting phone home and privacy)
Stephen Rider
wp-hackers at striderweb.com
Wed Dec 16 03:58:11 UTC 2009
>> Has anyone created a Codex page about this whole issue? It would be
>> good to have this code there. Anyone with strong feelings about the
>> issue want to put one together? It could have sections explaining each
>> part of the update process and have ways of circumventing each:
>> Sending url, sending server info, sending plugins list.
Mark Jaquith posted this on his site, but I thought it should be repeated here for those coming to this thread later in the archives....
function cws_hidden_plugin_12345( $r, $url ) {
if ( 0 !== strpos( $url, 'http://api.wordpress.org/plugins/update-check' ) )
return $r; // Not a plugin update request. Bail immediately.
$plugins = unserialize( $r['body']['plugins'] );
unset( $plugins->plugins[ plugin_basename( __FILE__ ) ] );
unset( $plugins->active[ array_search( plugin_basename( __FILE__ ), $plugins->active ) ] );
$r['body']['plugins'] = serialize( $plugins );
return $r;
}
add_filter( 'http_request_args', 'cws_hidden_plugin_12345', 5, 2 );
More here: <http://markjaquith.wordpress.com/2009/12/14/excluding-your-plugin-or-theme-from-update-checks/>
Thank you Mark!
--
Stephen Rider
http://striderweb.com/
More information about the wp-hackers
mailing list