[wp-trac] [WordPress Trac] #62132: Make wordpress.org API connections for updates, plugins and themes configurable to a different location
WordPress Trac
noreply at wordpress.org
Mon Sep 30 18:44:10 UTC 2024
#62132: Make wordpress.org API connections for updates, plugins and themes
configurable to a different location
-----------------------------+------------------------------
Reporter: jamesking56 | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
-----------------------------+------------------------------
Comment (by jorbin):
While not a configuration option, it is currently possible to change this
using the `pre_http_request` filter using something like:
{{{
add_filter( 'pre_http_request', function( $response, $parsed_args, $url )
{
if ( str_starts_with( $url, 'http://api.wordpress.org' ) ||
str_starts_with( $url, 'https://api.wordpress.org' ) ){
$new_url = ''; // insert your update server here.
return wp_remote_request( $new_url, $parsed_args );
}
return $response;
}, 10, 3);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62132#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list