| @@ -1,4 +1,4 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | /** |
| 3 | 3 | * Deactivation popup admin |
| 4 | 4 | * |
| @@ -11,15 +11,27 @@ | ||
| 11 | 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | 12 | exit; // Exit if accessed directly. |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | -global $status, $page, $s; | |
| 16 | - | |
| 17 | -if ( is_plugin_active( 'booking-calendar-com/booking-calendar-com.php' ) ) { | |
| 18 | - $wpbc_deactivate_url = wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . WPBC_PRO_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PRO_PLUGIN_FILENAME . '&plugin_status=' . $status . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . WPBC_PRO_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PRO_PLUGIN_FILENAME ); | |
| 19 | -} else { | |
| 20 | - $wpbc_deactivate_url = wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . WPBC_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PLUGIN_FILENAME . '&plugin_status=' . $status . '&paged=' . $page . '&s=' . $s, 'deactivate-plugin_' . WPBC_PLUGIN_DIRNAME . htmlentities('/', ENT_COMPAT) . WPBC_PLUGIN_FILENAME ); | |
| 21 | -} | |
| 15 | +global $status, $page, $s; | |
| 16 | + | |
| 17 | +$wpbc_plugin_basename = is_plugin_active( 'booking-calendar-com/booking-calendar-com.php' ) | |
| 18 | + ? 'booking-calendar-com/booking-calendar-com.php' | |
| 19 | + : WPBC_PLUGIN_DIRNAME . '/' . WPBC_PLUGIN_FILENAME; | |
| 20 | + | |
| 21 | +$wpbc_deactivate_url = wp_nonce_url( | |
| 22 | + add_query_arg( | |
| 23 | + array( | |
| 24 | + 'action' => 'deactivate', | |
| 25 | + 'plugin' => $wpbc_plugin_basename, | |
| 26 | + 'plugin_status' => (string) $status, | |
| 27 | + 'paged' => (string) $page, | |
| 28 | + 's' => (string) $s, | |
| 29 | + ), | |
| 30 | + self_admin_url( 'plugins.php' ) | |
| 31 | + ), | |
| 32 | + 'deactivate-plugin_' . $wpbc_plugin_basename | |
| 33 | +); | |
| 22 | 34 | |
| 23 | 35 | ?> |
| 24 | 36 | <div id="wpbc_deactivate-feedback-popup-wrapper"> |
| 25 | 37 | <div class="wpbc_deactivate-feedback-popup-inner"> |