Skip to content

Instantly share code, notes, and snippets.

@thadallender
Created December 3, 2015 19:02
Show Gist options
  • Save thadallender/c0617423beba9a0c9eea to your computer and use it in GitHub Desktop.
Save thadallender/c0617423beba9a0c9eea to your computer and use it in GitHub Desktop.
Filter for allowing local theme and plugin repo updates (for testing, never us on production site)
<?php
/** Enable my local themes and plugins repository FFS!!! */
function allow_my_custom_host( $allow, $host, $url ) {
if ( $host == 'put-your-repository-domain-here.com' )
$allow = true;
return $allow;
}
add_filter( 'http_request_host_is_external', 'allow_my_custom_host', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment