Stop Dashboard Browser and PHP Version Lookups
Prevents the dashboard from sending your browser's user agent and your server's PHP version to WordPress.org to decide whether to show upgrade warnings.
Opens WPIDE on
Code
add_filter( 'pre_http_request', function ( $response, $args, $url ) {
if ( false !== strpos( $url, 'api.wordpress.org/core/browse-happy/' ) || false !== strpos( $url, 'api.wordpress.org/core/serve-happy/' ) ) {
return new WP_Error( 'wpide_blocked', 'Version check disabled.' );
}
return $response;
}, 10, 3 );
Notes
You will no longer see "Your browser is out of date" or "PHP update required" boxes; keep an eye on Site Health instead.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.