Skip to content

Commit

Permalink
17-06-2022
Browse files Browse the repository at this point in the history
### 1.1.4
[Fixed] Plugins (unless the integration itself) got deactivated after Updating.
  • Loading branch information
smileBeda committed Jun 17, 2022
1 parent 6e7e7cd commit 8f6d9ca
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Donate link: https://paypal.me/tukutoi
Tags: directory, plugins
Requires at least: 1.0.0
Tested up to: 4.9.15
Stable tag: 1.1.3
Stable tag: 1.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down
12 changes: 2 additions & 10 deletions admin/class-cp-plgn-drctry-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,12 @@ public function update_cp_plugin() {
* We cannot use Upgrader Class, because CP has no way of
* selecting custom file URL. Only WP Can do that.
*
* Thus we need to manually deactivate, delete, and then install the plugin.
* We also need to make sure our own plugin can update itself.
* Since it would deactivate before deleting/updating, we need to re-intsall it instead.
* We simply replace the plugin entirely.
*
* @since 1.0.0 Update Plugin
* @since 1.1.3 Update itself
*/
if ( 'tukutoi-cp-directory-integration/tukutoi-cp-directory-integration.php' === $_POST['slug'] ) {
$this->install_cp_plugin( true );
}

deactivate_plugins( sanitize_text_field( wp_unslash( $_POST['slug'] ) ), true );
delete_plugins( array( sanitize_text_field( wp_unslash( $_POST['slug'] ) ) ) );
$this->install_cp_plugin();
$this->install_cp_plugin( true );

}

Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
= 1.1.4 =
[Fixed] Plugins (unless the integration itself) got deactivated after Updating.

= 1.1.3 =
[Fixed] Plugin could not update itself.
[Fixed] Request-URI Too Long when performing several searches without resetting the search.
Expand Down
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ The plugin does not take any responsibility for Plugins downloaded from the Clas

## Changelog

### 1.1.4
[Fixed] Plugins (unless the integration itself) got deactivated after Updating.

### 1.1.3
[Fixed] Plugin could not update itself.
[Fixed] Request-URI Too Long when performing several searches without resetting the search.
Expand Down
4 changes: 2 additions & 2 deletions tukutoi-cp-directory-integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Plugin Name: CP Plugin Directory
* Plugin URI: https://www.tukutoi.com/
* Description: Integrates the ClassicPress Plugin Directory into the ClassicPress Admin Interface.
* Version: 1.1.3
* Version: 1.1.4
* Author: bedas
* Requires at least: 4.9.15
* Requires PHP: 7.0.0
Expand All @@ -37,7 +37,7 @@
* Start at version 1.0.0 and use SemVer - https://semver.org
* Rename this for your plugin and update it as you release new versions.
*/
define( 'CP_PLGN_DRCTRY_VERSION', '1.1.3' );
define( 'CP_PLGN_DRCTRY_VERSION', '1.1.4' );

/**
* Define the Plugin basename
Expand Down

0 comments on commit 8f6d9ca

Please sign in to comment.