HEX
Server: Apache/2.4.62 (Debian)
System: Linux plxsite 6.8.0-47-generic #47-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 21:40:26 UTC 2024 x86_64
User: root (0)
PHP: 8.1.30
Disabled: NONE
Upload Files
File: /var/www/html/wp-content/plugins/easy-table-of-contents/uninstall.php
<?php
/**
 * Delete plugin data when plugin is uninstalled
 * @since   2.0.73
 * */
// Exit if accessed directly
if( !defined( 'WP_UNINSTALL_PLUGIN' ) )
   exit;

/**
 * Delete data when delete data option is enabled
 * @since   2.0.73
 * */
function eztoc_delete_data_on_uninstall() {

   $ez_toc_options  =  get_option( 'ez-toc-settings' );
   if ( is_array( $ez_toc_options ) && ! empty( $ez_toc_options['delete-data-on-uninstall'] ) ) {

      delete_option( 'ez-toc-settings' );
      delete_option( 'ez-toc-post-meta-content' );
      delete_option( 'ez_toc_do_activation_redirect' );

   }

}

eztoc_delete_data_on_uninstall();