Theme_Upgrader_Skin example

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

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

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

        $upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact( 'title', 'nonce', 'url', 'theme' ) ) );
        $upgrader->upgrade( $theme );

        require_once ABSPATH . 'wp-admin/admin-footer.php';
    } elseif ( 'update-selected-themes' === $action ) {
        if ( ! current_user_can( 'update_themes' ) ) {
            wp_die( __( 'Sorry, you are not allowed to update themes for this site.' ) );
        }

        check_admin_referer( 'bulk-update-themes' );

        if ( isset( $_GET['themes'] ) ) {
            
Home | Imprint | This part of the site doesn't use cookies.