Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions plugin/test-plugin-update/test-plugin-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ function aaa_result($res, $action, $args) {
$api_url = 'http://url_to_api_server/';
$plugin_slug = basename(dirname(__FILE__));

/** Enable my local themes and plugins repository FFS!!! */
add_filter( 'http_request_host_is_external', 'allow_my_custom_host', 10, 3 );
function allow_my_custom_host( $allow, $host, $url ) {
if ( $host == 'yourhost.com' )
$allow = true;
return $allow;
}

// Take over the update check
add_filter('pre_set_site_transient_update_plugins', 'check_for_plugin_update');
Expand Down