HEX
Server: Apache
System: Linux c119.dattaweb.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: c1190199 (57165)
PHP: 7.4.33
Disabled: mail, system, shell, exec, system_exec, shell_exec, mysql_pconnect, passthru, popen, proc_open, proc_close, proc_nice, proc_terminate, proc_get_status, escapeshellarg, escapeshellcmd, eval, dl, imap_mail, libvirt_connect, gnupg_init, unsetenv, apache_setenv, pcntl_exec, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_get_handler, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_getpriority, pcntl_setpriority, pcntl_async_signals, opcache_get_status, opcache_reset, opcache_get_configuration
Upload Files
File: /home/c1190199/public_html/wp-content/plugins/wp-downloadmanager/uninstall.php
<?php
/*
 * Uninstall plugin
 */
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) )
    exit ();

$option_names = array(
    'download_path'
    , 'download_path_url'
    , 'download_page_url'
    , 'download_method'
    , 'download_categories'
    , 'download_sort'
    , 'download_template_header'
    , 'download_template_footer'
    , 'download_template_category_header'
    , 'download_template_category_footer'
    , 'download_template_listing'
    , 'download_template_embedded'
    , 'download_template_most'
    , 'download_template_pagingheader'
    , 'download_template_pagingfooter'
    , 'download_nice_permalink'
    , 'download_template_download_page_link'
    , 'download_template_none'
    , 'widget_download_most_downloaded'
    , 'widget_download_recent_downloads'
    , 'download_options'
    , 'widget_downloads'
);


if ( is_multisite() ) {
    $ms_sites = wp_get_sites();

    if( 0 < sizeof( $ms_sites ) ) {
        foreach ( $ms_sites as $ms_site ) {
            switch_to_blog( $ms_site['blog_id'] );
            if( sizeof( $option_names ) > 0 ) {
                foreach( $option_names as $option_name ) {
                    delete_option( $option_name );
                    plugin_uninstalled();
                }
            }
        }
    }

    restore_current_blog();
} else {
    if( sizeof( $option_names ) > 0 ) {
        foreach( $option_names as $option_name ) {
            delete_option( $option_name );
            plugin_uninstalled();
        }
    }
}

/**
 * Delete plugin table when uninstalled
 *
 * @access public
 * @return void
 */
function plugin_uninstalled() {
    global $wpdb;

    $table_names = array( 'downloads' );
    if( sizeof( $table_names ) > 0 ) {
        foreach( $table_names as $table_name ) {
            $table = $wpdb->prefix . $table_name;
            $wpdb->query( "DROP TABLE IF EXISTS $table" );
        }
    }
}