SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > wp-user-frontend > includes > > Admin


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/wp-user-frontend/includes//Admin

NameTypeSizeLast ModifiedActions
Forms Directory - -
template-parts Directory - -
views Directory - -
Admin_Installer.php File 7984 bytes January 02 2024 16:35:50.
Admin_Settings.php File 6505 bytes February 13 2024 11:27:44.
Admin_Subscription.php File 80836 bytes July 15 2025 12:13:42.
Admin_Tools.php File 21386 bytes March 19 2025 14:25:12.
Admin_Welcome.php File 1710 bytes January 02 2024 16:35:50.
Customizer_Options.php File 5026 bytes January 02 2024 16:35:50.
Dashboard_Metabox.php File 6888 bytes June 30 2025 16:27:10.
List_Table_Subscribers.php File 7141 bytes April 23 2025 15:02:24.
List_Table_Transactions.php File 18871 bytes September 12 2024 14:30:42.
Menu.php File 15789 bytes August 04 2025 15:46:00.
Plugin_Upgrade_Notice.php File 2674 bytes March 19 2025 14:25:12.
Posting.php File 23792 bytes March 20 2025 14:31:02.
Promotion.php File 11527 bytes March 19 2025 14:25:12.
Shortcodes_Button.php File 4579 bytes February 13 2024 11:27:44.
Subscription.php File 63415 bytes July 15 2025 12:13:42.
Upgrades.php File 4195 bytes July 15 2025 12:13:42.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/wp-user-frontend/includes//Admin/Upgrades.php

<?php

namespace WeDevs\Wpuf\Admin;

/**
 * Plugin Upgrade Routine
 *
 * @since 2.2
 */
class Upgrades {

    /**
     * The upgrades
     *
     * @var array
     */
    private static $upgrades = [
        '2.1.9'  => 'upgrades/upgrade-2.1.9.php',
        '2.6.0'  => 'upgrades/upgrade-2.6.0.php',
        '2.7.0'  => 'upgrades/upgrade-2.7.0.php',
        '2.8.0'  => 'upgrades/upgrade-2.8.0.php',
        '2.8.2'  => 'upgrades/upgrade-2.8.2.php',
        '2.8.5'  => 'upgrades/upgrade-2.8.5.php',
        '2.9.2'  => 'upgrades/upgrade-2.9.2.php',
        '3.6.0'  => 'upgrades/upgrade-3.6.0.php',
        '4.0.4'  => 'upgrades/upgrade-4.0.4.php',
        '4.0.8'  => 'upgrades/upgrade-4.0.8.php',
        '4.0.11' => 'upgrades/upgrade-4.0.11.php',
        '4.1.0'  => 'upgrades/upgrade-4.1.0.php',
        '4.1.7'  => 'upgrades/upgrade-4.1.7.php',
    ];

    /**
     * The class constructor
     *
     * @since 3.6.0
     *
     * @return void
     */
    public function __construct() {
        add_action( 'admin_notices', [ $this, 'show_upgrade_notice' ] );
        add_action( 'admin_init', [ $this, 'perform_updates' ] );
    }

    /**
     * Get the plugin version
     *
     * @return string
     */
    public function get_version() {
        return get_option( 'wpuf_version' );
    }

    /**
     * Check if the plugin needs any update
     *
     * @return bool
     */
    public function needs_update() {
        // may be it's the first install
        if ( ! $this->get_version() ) {
            return false;
        }
        // check if current version is greater than installed version and any update key is available
        if ( version_compare( $this->get_version(), WPUF_VERSION, '<' ) && in_array( WPUF_VERSION, array_keys( self::$upgrades ), true ) ) {
            return true;
        }

        return false;
    }

    /**
     * Perform all the necessary upgrade routines
     *
     * @return void
     */
    public function perform_updates() {
        if ( ! isset( $_GET['nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['nonce'] ) ), 'wpuf_do_update' ) ) {
            return;
        }

        if ( empty( $_GET['wpuf_do_update'] ) || ! sanitize_text_field( wp_unslash( $_GET['wpuf_do_update'] ) ) ) {
            return;
        }

        $installed_version = $this->get_version();

        foreach ( self::$upgrades as $version => $file ) {
            if ( version_compare( $installed_version, $version, '<' ) ) {
                $path = WPUF_ROOT . '/includes/' . $file;
                if ( file_exists( $path ) ) {
                    include_once $path;
                }
            }
        }

        update_option( wpuf()->get_db_version_key(), WPUF_VERSION );
    }

    /**
     * Show upgrade notice.
     *
     * @since 3.6.0
     *
     * @return void
     */
    public function show_upgrade_notice() {
        if ( ! current_user_can( 'update_plugins' ) || ! $this->needs_update() ) {
            return;
        }

        if ( $this->needs_update() ) {
            $url  = ! empty( $_SERVER['REQUEST_URI'] ) ? sanitize_text_field( wp_unslash( $_SERVER['REQUEST_URI'] ) ) : '';
            $link = add_query_arg(
                [
                    'wpuf_do_update' => true,
                    'nonce'          => wp_create_nonce( 'wpuf_do_update' ),
                ],
                $url
            );
            ?>
            <div id="message" class="updated">
                <p><?php printf( '<strong>%s</strong>', esc_html__( 'WPUF Data Update Required', 'wp-user-frontend' ) ); ?></p>
                <p class="submit"><a href="<?php echo esc_url( $link ); ?>" class="wpuf-update-btn button-primary"><?php esc_html_e( 'Run the updater', 'wp-user-frontend' ); ?></a></p>
            </div>

            <script type="text/javascript">
                jQuery('.wpuf-update-btn').click('click', function() {
                    return confirm( '<?php esc_attr_e( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'wp-user-frontend' ); ?>' );
                });
            </script>
            <?php
        }
    }
}

SILENT KILLER Tool