| @@ -124,50 +124,8 @@ | ||
| 124 | 124 | return $title; |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | 127 | /** |
| 128 | - * Store recently activated Give's addons to wp options. | |
| 129 | - * | |
| 130 | - * @since 2.1.0 | |
| 131 | - */ | |
| 132 | -function give_recently_activated_addons() { | |
| 133 | - // Check if action is set. | |
| 134 | - if ( isset( $_REQUEST['action'] ) ) { | |
| 135 | - $plugin_action = ( '-1' !== $_REQUEST['action'] ) ? $_REQUEST['action'] : ( isset( $_REQUEST['action2'] ) ? $_REQUEST['action2'] : '' ); | |
| 136 | - $plugins = []; | |
| 137 | - | |
| 138 | - switch ( $plugin_action ) { | |
| 139 | - case 'activate': // Single add-on activation. | |
| 140 | - $plugins[] = $_REQUEST['plugin']; | |
| 141 | - break; | |
| 142 | - case 'activate-selected': // If multiple add-ons activated. | |
| 143 | - $plugins = $_REQUEST['checked']; | |
| 144 | - break; | |
| 145 | - } | |
| 146 | - | |
| 147 | - if ( ! empty( $plugins ) ) { | |
| 148 | - | |
| 149 | - $give_addons = give_get_recently_activated_addons(); | |
| 150 | - | |
| 151 | - foreach ( $plugins as $plugin ) { | |
| 152 | - // Get plugins which has 'Give-' as prefix. | |
| 153 | - if ( stripos( $plugin, 'Give-' ) !== false ) { | |
| 154 | - $give_addons[] = $plugin; | |
| 155 | - } | |
| 156 | - } | |
| 157 | - | |
| 158 | - if ( ! empty( $give_addons ) ) { | |
| 159 | - // Update the Give's activated add-ons. | |
| 160 | - update_option( 'give_recently_activated_addons', $give_addons, false ); | |
| 161 | - } | |
| 162 | - } | |
| 163 | - } | |
| 164 | -} | |
| 165 | - | |
| 166 | -// Add add-on plugins to wp option table. | |
| 167 | -add_action( 'activated_plugin', 'give_recently_activated_addons', 10 ); | |
| 168 | - | |
| 169 | -/** | |
| 170 | 128 | * Create new menu in plugin section that include all the add-on |
| 171 | 129 | * |
| 172 | 130 | * @since 2.1.0 |
| 173 | 131 | * |
| @@ -436,22 +394,12 @@ | ||
| 436 | 394 | |
| 437 | 395 | add_action( 'admin_head', 'give_plugin_notice_css' ); |
| 438 | 396 | |
| 439 | 397 | /** |
| 440 | - * Get list of add-on last activated. | |
| 441 | - * | |
| 442 | - * @since 2.1.3 | |
| 443 | - * | |
| 444 | - * @return mixed|array list of recently activated add-on | |
| 445 | - */ | |
| 446 | -function give_get_recently_activated_addons() { | |
| 447 | - return get_option( 'give_recently_activated_addons', [] ); | |
| 448 | -} | |
| 449 | - | |
| 450 | -/** | |
| 451 | 398 | * Renders the Give Deactivation Survey Form. |
| 452 | 399 | * Note: only for internal use |
| 453 | 400 | * |
| 401 | + * @since 4.10.0 Updated the icon path to the new build directory. | |
| 454 | 402 | * @since 2.2 |
| 455 | 403 | */ |
| 456 | 404 | function give_deactivation_popup() { |
| 457 | 405 | // Bailout. |
| @@ -465,9 +413,9 @@ | ||
| 465 | 413 | ob_start(); |
| 466 | 414 | ?> |
| 467 | 415 | |
| 468 | 416 | <h2 id="deactivation-survey-title"> |
| 469 | - <img src="<?php echo esc_url( GIVE_PLUGIN_URL ); ?>/assets/dist/images/give-icon-full-circle.svg"> | |
| 417 | + <img src="<?php echo esc_url( GIVE_PLUGIN_URL ); ?>/build/assets/dist/images/give-icon-full-circle.svg"> | |
| 470 | 418 | <span><?php esc_html_e( 'GiveWP Deactivation', 'give' ); ?></span> |
| 471 | 419 | </h2> |
| 472 | 420 | <form class="deactivation-survey-form" method="POST"> |
| 473 | 421 | <p><?php esc_html_e( 'If you have a moment, please let us know why you are deactivating Give. All submissions are anonymous and we only use this feedback to improve this plugin.', 'give' ); ?></p> |