| 1 |
<?php |
| 2 |
/** |
| 3 |
* Parse.ly plugin uninstaller |
| 4 |
* |
| 5 |
* Deletes the `parsely` option from the database. |
| 6 |
* |
| 7 |
* @package Parsely |
| 8 |
* @since 3.0.0 |
| 9 |
*/ |
| 10 |
|
| 11 |
declare(strict_types=1); |
| 12 |
|
| 13 |
namespace Parsely; |
| 14 |
|
| 15 |
// If uninstall.php is not called by WordPress, die. |
| 16 |
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
| 17 |
die; |
| 18 |
} |
| 19 |
|
| 20 |
$parsely_option_name = 'parsely'; |
| 21 |
|
| 22 |
delete_option( $parsely_option_name ); |
| 23 |
|
| 24 |
// For site options in Multisite. |
| 25 |
delete_site_option( $parsely_option_name ); |
| 26 |
|
| 27 |
// Delete page options. |
| 28 |
delete_metadata( 'user', -1, 'wp_parsely_page', '', true ); |
| 29 |
|