# speechkit/4.2.4/uninstall.php

BeyondWords – AI audio for publishers, version 4.2.4. 38 lines.

- Page: https://pluginprobe.com/plugins/speechkit/4.2.4/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/speechkit/4.2.4/raw/uninstall.php
- Modified: 2023-11-15T21:11:02+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/speechkit/4.2.4/code/uninstall.php#L10-L20`.

```php
<?php

use Beyondwords\Wordpress\Core\Uninstaller;

/**
 * Uninstall script for BeyondWords.
 *
 * Executed when BeyondWords is uninstalled via built-in WordPress commands.
 *
 * @since 3.7.0
 *
 * @SuppressWarnings(PHPMD.ExitExpression)
 */
function beyondwords_uninstall()
{
    if (
        ! defined('WP_UNINSTALL_PLUGIN') ||
        ! WP_UNINSTALL_PLUGIN ||
        dirname(WP_UNINSTALL_PLUGIN) !== dirname(plugin_basename(__FILE__))
    ) {
        status_header(404);
        exit; // phpcs:ignore
    }

    if (! defined('BEYONDWORDS__PLUGIN_DIR')) {
        define('BEYONDWORDS__PLUGIN_DIR', plugin_dir_path(__FILE__));
    }

    require BEYONDWORDS__PLUGIN_DIR . 'vendor/autoload.php';

    Uninstaller::cleanupPluginOptions();
    Uninstaller::cleanupCustomFields();
}

// phpcs:disable
beyondwords_uninstall();
// phpcs:enable

```
