Add a filter to getVcsService

The filter 'puc_get_vcs_service' will then allow user to add their self hosted gitlab or bitbucket as a recognised service
like so
add_filter('puc_get_vcs_service', function($service, $host) {
    if ($host == 'gitlab.mydomain.com') {
        return 'GitLab';
    }
    return $service;
}, 10, 2);
This commit is contained in:
Adrien Foulon 2019-02-25 19:03:46 +01:00 committed by GitHub
parent 57a25d905a
commit 02592c7fc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -207,8 +207,8 @@ if ( !class_exists('Puc_v4p5_Factory', false) ):
$service = $knownServices[$host];
}
}
return $service;
return apply_filter('puc_get_vcs_service', $service, $host, $path, $metadataUrl);
}
/**