Plugin_Upgrader_Skin example

// Used in the HTML title tag.         $title        = __( 'Update Plugin' );
        $parent_file  = 'plugins.php';
        $submenu_file = 'plugins.php';

        wp_enqueue_script( 'updates' );
        require_once ABSPATH . 'wp-admin/admin-header.php';

        $nonce = 'upgrade-plugin_' . $plugin;
        $url   = 'update.php?action=upgrade-plugin&plugin=' . urlencode( $plugin );

        $upgrader = new Plugin_Upgrader( new Plugin_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'plugin' ) ) );
        $upgrader->upgrade( $plugin );

        require_once ABSPATH . 'wp-admin/admin-footer.php';

    } elseif ( 'activate-plugin' === $action ) {
        if ( ! current_user_can( 'update_plugins' ) ) {
            wp_die( __( 'Sorry, you are not allowed to update plugins for this site.' ) );
        }

        check_admin_referer( 'activate-plugin_' . $plugin );
        if ( ! isset( $_GET['failure'] ) && ! isset( $_GET['success'] ) ) {
            
Home | Imprint | This part of the site doesn't use cookies.