WP.org is not very good (read: evil) organization. They collect data without user consent, they are not transparent in what data they collecting, and they make it hard to disable this.
For example: There’s no easy way to exclude custom theme for update check. WordPress have filters for everything, but they don’t have this filterable. Maybe they want to monopolize theme market (maybe they are trying to say: you want to create theme? you need to use wp.org theme repository).
The only way to disable theme update check to wp.org repository is using this code (well, it’s pretty much a hack):
/* Filter HTTP Request */ add_filter( 'http_request_args', 'my_disable_theme_update', 5, 2 ); /** * How to disable WordPress.org theme update * Useful for theme shop, or custom theme for client with the same theme slug as wp.org theme. * @author David Chandra <david@shellcreeper.com> */ function my_disable_theme_update( $r, $url ){ /* Array of theme slug (folder) to exclude */ $themes = array( 'twentyfifteen', 'twentyfourteen', ); /* Bail, if not using WP 3.7+, before that it's using serialize data */ global $wp_version; if ( version_compare( $wp_version, '3.7', '<' ) ){ return $r; } /* Bail, if not theme update check. */ if ( false === strpos( $url, 'api.wordpress.org/themes/update-check' ) ){ return $r; } /* Remove themes */ $r_body = wp_remote_retrieve_body( $r ); if( isset( $r_body['themes'] ) ){ $r_themes = json_decode( $r_body['themes'], true ); foreach( $themes as $theme ){ unset( $r_themes['themes'][$theme] ); } $r['body']['themes'] = json_encode( $r_themes ); } return $r; }
It’s not future proof, WP.org core team can change it anytime they want, and make the code above useless without any prior notice. Like when they update to WP 3.7, and change their API method from using serialize data to JSON.
They make every code backward-compatible, except in how to disable data collection. So the old code from Mark Jaquith no longer works.