Skip to content

Commit

Permalink
add branch to update transient for possible use in RESTful updates
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Sep 5, 2016
1 parent 0e12bbe commit 55328cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* Settings page now uses same function to update settings for both single/multisite
* temporary fix for AJAX updates of private Bitbucket repos [#432](https://github.com/afragen/github-updater/issues/432), can only do one per page load, not very AJAXy :P
* fixed `class Rest_Update` to avoid potential race conditions when RESTful endpoint is used as a webhook
* added `branch` and `branches` to update transient, might be able to use this in RESTful update sometime


#### 5.5.0 / 2016-07-02
* better internationalization for changing plugin _View details_ link
Expand Down
2 changes: 2 additions & 0 deletions src/GitHub_Updater/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,8 @@ public function pre_set_site_transient_update_plugins( $transient ) {
'new_version' => $plugin->remote_version,
'url' => $plugin->uri,
'package' => $plugin->download_link,
'branch' => $plugin->branch,
'branches' => array_keys( $plugin->branches ),
);

/*
Expand Down
2 changes: 2 additions & 0 deletions src/GitHub_Updater/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,8 @@ public function pre_set_site_transient_update_themes( $transient ) {
'new_version' => $theme->remote_version,
'url' => $theme->uri,
'package' => $theme->download_link,
'branch' => $theme->branch,
'branches' => array_keys( $theme->branches ),
);

if ( $this->can_update( $theme ) ) {
Expand Down

0 comments on commit 55328cc

Please sign in to comment.