Permalink
Browse files

Add support for Git URI

  • Loading branch information...
1 parent e500c1a commit 9fd1e9939b57155399e12160025039bbceb9cff6 @pdclark committed Jul 10, 2012
Showing with 6 additions and 4 deletions.
  1. +0 −2 transports/gitweb.php
  2. +6 −2 updater.php
View
2 transports/gitweb.php
@@ -46,8 +46,6 @@ public function get_data() {
$response = wp_remote_get( $this->url.'/tags' );
if ( is_wp_error( $response ) ) {
- var_dump($response);
- exit;
return false;
}
View
8 updater.php
@@ -119,7 +119,7 @@ public function http_request_timeout() {
* @return array plugin header search terms
*/
public function extra_plugin_headers() {
- return array( 'requires', 'tested' );
+ return array( 'requires', 'tested', 'git uri' );
}
@@ -168,7 +168,11 @@ public function delete_transients() {
* @return object
*/
public function get_repo_transport( $meta ) {
- $parsed = parse_url( $meta['PluginURI'] );
+ if ( !empty( $meta['git uri'] ) ) {
+ $parsed = parse_url( $meta['git uri'] );
+ }else {
+ $parsed = parse_url( $meta['PluginURI'] );
+ }
switch( $parsed['host'] ) {
case 'github.com':

0 comments on commit 9fd1e99

Please sign in to comment.