| @@ -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 | * |
| @@ -434,19 +392,8 @@ | ||
| 434 | 392 | <?php |
| 435 | 393 | } |
| 436 | 394 | |
| 437 | 395 | add_action( 'admin_head', 'give_plugin_notice_css' ); |
| 438 | - | |
| 439 | -/** | |
| 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 | 396 | |
| 450 | 397 | /** |
| 451 | 398 | * Renders the Give Deactivation Survey Form. |
| 452 | 399 | * Note: only for internal use |