Skip to content

Commit a11dcfe

Browse files
committed
petition uninstall issue fixed
1 parent ef921cd commit a11dcfe

File tree

6 files changed

+25
-27
lines changed

6 files changed

+25
-27
lines changed

cbxpetition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* Plugin Name: CBX Petition
1717
* Plugin URI: https://codeboxr.com/product/cbx-petition-for-wordpress/
1818
* Description: A plugin to create, manage petition and collect signatures for petition
19-
* Version: 2.0.7
19+
* Version: 2.0.8
2020
* Author: Codeboxr
2121
* Author URI: http://codeboxr.com
2222
* License: GPL-2.0+
@@ -33,7 +33,7 @@
3333
}
3434

3535
defined( 'CBXPETITION_PLUGIN_NAME' ) or define( 'CBXPETITION_PLUGIN_NAME', 'cbxpetition' );
36-
defined( 'CBXPETITION_PLUGIN_VERSION' ) or define( 'CBXPETITION_PLUGIN_VERSION', '2.0.7' );
36+
defined( 'CBXPETITION_PLUGIN_VERSION' ) or define( 'CBXPETITION_PLUGIN_VERSION', '2.0.8' );
3737
defined( 'CBXPETITION_BASE_NAME' ) or define( 'CBXPETITION_BASE_NAME', plugin_basename( __FILE__ ) );
3838
defined( 'CBXPETITION_ROOT_PATH' ) or define( 'CBXPETITION_ROOT_PATH', plugin_dir_path( __FILE__ ) );
3939
defined( 'CBXPETITION_ROOT_URL' ) or define( 'CBXPETITION_ROOT_URL', plugin_dir_url( __FILE__ ) );
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* @subpackage cbxpetition/includes
1414
* @author CBX Team <info@codeboxr.com>
1515
*/
16-
class Uninstall {
16+
class CBXPetitionUninstall {
1717
/**
1818
* Uninstall plugin functionality
1919
*
@@ -48,9 +48,9 @@ public static function uninstall() {
4848
* @return void
4949
*/
5050
public static function uninstall_tasks() {
51-
if ( ! current_user_can( 'activate_plugins' ) ) {
51+
/*if ( ! current_user_can( 'activate_plugins' ) ) {
5252
return;
53-
}
53+
}*/
5454

5555

5656
$settings = new CBXSetting();
@@ -101,4 +101,4 @@ public static function uninstall_tasks() {
101101
do_action( 'cbxpetition_plugin_uninstall_after' );
102102
}
103103
}//end method uninstall
104-
}//end class Uninstall
104+
}//end class CBXPetitionUninstall

includes/Helpers/PetitionHelper.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,17 +2261,6 @@ public static function get_settings_fields() {
22612261
],
22622262
'default' => 'no',
22632263
],
2264-
/*'delete_global_config' => [
2265-
'name' => 'delete_global_config',
2266-
'label' => esc_html__( 'On Uninstall delete plugin data', 'cbxpetition' ),
2267-
'desc' => '<p>' . esc_html__( 'Delete Global Config data(options/plugin settings), custom table(s), files/folders, all petition custom post type created by this plugin on uninstall. Please note that this process can not be undone and it is recommended to keep full database and files backup before doing this.', 'cbxpetition' ) . '</p>',
2268-
'type' => 'radio',
2269-
'options' => [
2270-
'yes' => esc_html__( 'Yes', 'cbxpetition' ),
2271-
'no' => esc_html__( 'No', 'cbxpetition' ),
2272-
],
2273-
'default' => 'no',
2274-
],*/
22752264
'reset_data' => [
22762265
'name' => 'reset_data',
22772266
'label' => esc_html__( 'Reset all section', 'cbxpetition' ),

readme.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Contributors: codeboxr, manchumahara
33
Tags: petition,activism,signature,change,campaign
44
Requires at least: 5.3
55
Tested up to: 6.8
6-
Stable tag: 2.0.7
6+
Stable tag: 2.0.8
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

10-
A plugin to create, manage petition and collect signatures for petition
10+
A plugin to create, manage petition and collect signatures for petition inside WordPress environment.
1111

1212
== Description ==
1313

@@ -16,7 +16,7 @@ CBX Petition for WordPress makes it easy to create, manage, and showcase online
1616

1717
### CBX Petition by [Codeboxr](https://codeboxr.com/product/cbx-petition-for-wordpress/)
1818

19-
>📋 [Documentation](https://codeboxr.com/doc/cbxpetition-doc/) | 🌟 [Upgrade to PRO](https://codeboxr.com/product/cbx-petition-for-wordpress/) | 👨‍💻 [Free Support](https://wordpress.org/support/plugin/cbxpetition/) | 📱 [Free Support](https://wordpress.org/support/plugin/cbxpetition/) | 🤴 [Pro Support](https://codeboxr.com/contact-us)
19+
>🤴 [Demo](https://codeboxr.net/wordpress/petition/save-the-green-park-stop-unplanned-commercial-construction/) | 📋 [Documentation](https://codeboxr.com/doc/cbxpetition-doc/) | 🌟 [Upgrade to PRO](https://codeboxr.com/product/cbx-petition-for-wordpress/) | 👨‍💻 [Free Support](https://wordpress.org/support/plugin/cbxpetition/) | 📱 [Free Support](https://wordpress.org/support/plugin/cbxpetition/) | 🤴 [Pro Support](https://codeboxr.com/contact-us)
2020

2121

2222
**If you think any necessary feature is missing contact with us, we will add in new release. Best way to check the feature is install the free core version in any dev site and explore**
@@ -84,7 +84,7 @@ CBX Petition for WordPress makes it easy to create, manage, and showcase online
8484
8. Petition Details widget compatible with shortcode [cbxpetition]
8585
9. Petition Summary widget compatible with shortcode [cbxpetition_summary]
8686
10. Petition Latest Listing widget compatible with shortcode [cbxpetition_latest]
87-
11. Any elemnetor widget missing? let us know
87+
11. Any elementor widget missing? let us know
8888

8989
**Block Widgets(Pro)**
9090

@@ -195,6 +195,9 @@ Get the [pro addon](https://codeboxr.com/product/cbx-petition-for-wordpress/)
195195

196196

197197
== Changelog ==
198+
= 2.0.8 =
199+
* [fixed] Uninstall error fixed
200+
198201
= 2.0.7 =
199202
* [fixed] Elementor widget improved and bug fixed
200203
* [fixed] Block widget improved and bug fixed

templates/admin/support.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ class="button outline primary pull-right"><?php esc_html_e( 'Global Settings', '
8585
</div>
8686
</div>
8787
<div class="content">
88+
<div class="cbx-backend-settings-row">
89+
<p>
90+
Version - 2.0.8
91+
</p>
92+
<ul>
93+
<li>[fixed] Uninstall error fixed</li>
94+
</ul>
95+
</div>
8896
<div class="cbx-backend-settings-row">
8997
<p>
9098
Version - 2.0.7

uninstall.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
<?php
22

3-
use Cbx\Petition\Helpers;
4-
5-
use Cbx\Petition\CBXSetting;
6-
73
/**
84
* Fired when the plugin is uninstalled.
95
*
@@ -19,13 +15,15 @@
1915
exit;
2016
}
2117

18+
require_once plugin_dir_path( __FILE__ ) . "vendor/autoload.php";
19+
2220
/**
2321
* The code that runs during plugin uninstall.
2422
*/
2523
function uninstall_cbxpetition() {
26-
require_once plugin_dir_path( __FILE__ ) . 'includes/Uninstall.php';
24+
require_once plugin_dir_path( __FILE__ ) . 'includes/CBXPetitionUninstall.php';
2725

28-
Uninstall::uninstall();
26+
CBXPetitionUninstall::uninstall();
2927
}//end function uninstall_cbxpetition
3028

3129
if ( ! defined( 'CBXPETITION_PLUGIN_NAME' ) ) {

0 commit comments

Comments
 (0)