Created
October 14, 2024 16:56
-
-
Save evrpress/38337b270e6a108454259efba1b33dc4 to your computer and use it in GitHub Desktop.
load SCF from WP Engine servers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This only works if you like to update the plugin. | |
* https://x.com/xaver_/status/1845760999908847628 | |
*/ | |
// load SCF from WP Engine servers | |
add_filter( 'pre_http_request', function ( $bool, $r, $url ) { | |
if ( false !== strpos( $url, '//downloads.wordpress.org/plugin/advanced-custom-fields.' ) ) { | |
$url = 'https://www.advancedcustomfields.com/latest/'; | |
return wp_remote_request( $url, $r ); | |
} | |
return $bool; | |
}, 10, 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment