| 1 |
<?php |
| 2 |
/** |
| 3 |
* Uninstall routine for WP Attachments. |
| 4 |
* |
| 5 |
* Runs only when the plugin is deleted from the Plugins screen. |
| 6 |
* Removes all plugin data including visitor IP records. |
| 7 |
* |
| 8 |
* @package WP_Attachments |
| 9 |
*/ |
| 10 |
|
| 11 |
// Never run this file outside of the WordPress uninstall flow. |
| 12 |
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 13 |
exit; |
| 14 |
} |
| 15 |
|
| 16 |
// Clean up IP data that was stored by the plugin. |
| 17 |
// Keep download counters (wpa-download) and post settings (wpa_off). |
| 18 |
delete_post_meta_by_key( 'wpa-download-control' ); |
| 19 |
|