Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
afragen committed Aug 31, 2022
2 parents 4435eef + 0d05456 commit 6869620
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#### [unreleased]

#### 11.0.6 / 2022-08-31
* fix `rename_on_activation` with `move_dir`

#### 11.0.5 / 2022-08-29
* now requires WP 5.9 for readme parser `str_contains()` polyfill

Expand Down
2 changes: 1 addition & 1 deletion git-updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Plugin Name: Git Updater
* Plugin URI: https://git-updater.com
* Description: A plugin to automatically update GitHub hosted plugins, themes, and language packs. Additional API plugins available for Bitbucket, GitLab, Gitea, and Gist.
* Version: 11.0.5
* Version: 11.0.6
* Author: Andy Fragen
* License: MIT
* Domain Path: /languages
Expand Down
10 changes: 9 additions & 1 deletion src/Git_Updater/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,16 @@ public function rename_on_activation() {
update_site_option( 'git_updater', array_merge( $options, [ 'current_branch_git-updater' => 'develop' ] ) );
}

require_once __DIR__ . '/Shim.php';
if ( $slug && 'git-updater/git-updater.php' !== $slug ) {
move_dir( $plugin_dir . dirname( $slug ), $plugin_dir . 'git-updater' );
if ( function_exists( 'move_dir' ) ) {
$result = \move_dir( $plugin_dir . dirname( $slug ), $plugin_dir . 'git-updater' );
} else {
$result = move_dir( $plugin_dir . dirname( $slug ), $plugin_dir . 'git-updater' );
}
if ( \is_wp_error( $result ) ) {
return $result;
}
}
}
}

0 comments on commit 6869620

Please sign in to comment.