/home/techb158/public_html/wp-admin/includes
NameSizeModeActions
admin-filters.php80340666editdlrm
admin.php36280666editdlrm
ajax-actions.php1535400666editdlrm
bookmark.php116780666editdlrm
class-automatic-upgrader-skin.php36630666editdlrm
class-bulk-plugin-upgrader-skin.php25900666editdlrm
class-bulk-theme-upgrader-skin.php26600666editdlrm
class-bulk-upgrader-skin.php66610666editdlrm
class-core-upgrader.php151980666editdlrm
class-custom-background.php217500666editdlrm
class-custom-image-header.php492490666editdlrm
class-file-upload-upgrader.php41630666editdlrm
class-ftp-pure.php54260666editdlrm
class-ftp-sockets.php84790666editdlrm
class-ftp.php273420666editdlrm
class-language-pack-upgrader-skin.php28700666editdlrm
class-language-pack-upgrader.php155280666editdlrm
class-pclzip.php1966670666editdlrm
class-plugin-installer-skin.php119470666editdlrm
class-plugin-upgrader-skin.php32780666editdlrm
class-plugin-upgrader.php232490666editdlrm
class-theme-installer-skin.php129740666editdlrm
class-theme-upgrader-skin.php41760666editdlrm
class-theme-upgrader.php267830666editdlrm
class-walker-category-checklist.php50920666editdlrm
class-walker-nav-menu-checklist.php57810666editdlrm
class-walker-nav-menu-edit.php142980666editdlrm
class-wp-ajax-upgrader-skin.php41930666editdlrm
class-wp-application-passwords-list-table.php69490666editdlrm
class-wp-automatic-updater.php619050666editdlrm
class-wp-comments-list-table.php346200666editdlrm
class-wp-community-events.php186470666editdlrm
class-wp-debug-data.php710430666editdlrm
class-wp-filesystem-base.php256220666editdlrm
class-wp-filesystem-direct.php191660666editdlrm
class-wp-filesystem-ftpext.php249260666editdlrm
class-wp-filesystem-ftpsockets.php203560666editdlrm
class-wp-filesystem-ssh2.php258150666editdlrm
class-wp-importer.php82790666editdlrm
class-wp-internal-pointers.php45930666editdlrm
class-wp-links-list-table.php101030666editdlrm
class-wp-list-table-compat.php14970666editdlrm
class-wp-list-table.php548730666editdlrm
class-wp-media-list-table.php277860666editdlrm
class-wp-ms-sites-list-table.php235980666editdlrm
class-wp-ms-themes-list-table.php302660666editdlrm
class-wp-ms-users-list-table.php161880666editdlrm
class-wp-plugin-install-list-table.php250760666editdlrm
class-wp-plugins-list-table.php615490666editdlrm
class-wp-post-comments-list-table.php14530666editdlrm
class-wp-posts-list-table.php684570666editdlrm
class-wp-privacy-data-export-requests-list-table.php60260666editdlrm
class-wp-privacy-data-removal-requests-list-table.php61780666editdlrm
class-wp-privacy-policy-content.php330210666editdlrm
class-wp-privacy-requests-table.php148060666editdlrm
class-wp-screen.php375660666editdlrm
class-wp-site-health-auto-updates.php143370666editdlrm
class-wp-site-health.php1311680666editdlrm
class-wp-site-icon.php64890666editdlrm
class-wp-terms-list-table.php215840666editdlrm
class-wp-theme-install-list-table.php157030666editdlrm
class-wp-themes-list-table.php103390666editdlrm
class-wp-upgrader-skin.php70640666editdlrm
class-wp-upgrader-skins.php14770666editdlrm
class-wp-upgrader.php483670666editdlrm
class-wp-users-list-table.php193510666editdlrm
comment.php94570666editdlrm
continents-cities.php205400666editdlrm
credits.php58320666editdlrm
dashboard.php706160666editdlrm
deprecated.php419600666editdlrm
edit-tag-messages.php14780666editdlrm
export.php259760666editdlrm
file.php984240666editdlrm
image-edit.php441470666editdlrm
image.php451720666editdlrm
import.php66170666editdlrm
list-table.php38020666editdlrm
media.php1201880666editdlrm
menu.php96400666editdlrm
meta-boxes.php668570666editdlrm
misc.php464430666editdlrm
ms-admin-filters.php12960666editdlrm
ms-deprecated.php37700666editdlrm
ms.php359590666editdlrm
nav-menu.php491360666editdlrm
network.php270380666editdlrm
noop.php11480666editdlrm
options.php43030666editdlrm
plugin-install.php391870666editdlrm
plugin.php932950666editdlrm
post.php822290666editdlrm
privacy-tools.php337320666editdlrm
revision.php166290666editdlrm
schema.php455830666editdlrm
screen.php63900666editdlrm
taxonomy.php84830666editdlrm
template.php998300666editdlrm
theme-install.php70100666editdlrm
theme.php475330666editdlrm
translation-install.php110480666editdlrm
update-core.php861420666editdlrm
update.php348290666editdlrm
upgrade.php1166740666editdlrm
user.php239130666editdlrm
widgets.php105460666editdlrm
Edit: /home/techb158/public_html/wp-admin/includes/class-file-upload-upgrader.php (4163B)
false, 'test_type' => false, ); $file = wp_handle_upload( $_FILES[ $form ], $overrides ); if ( isset( $file['error'] ) ) { wp_die( $file['error'] ); } if ( 'pluginzip' === $form || 'themezip' === $form ) { if ( ! wp_zip_file_is_valid( $file['file'] ) ) { wp_delete_file( $file['file'] ); if ( 'pluginzip' === $form ) { $plugins_page = sprintf( '%s', self_admin_url( 'plugin-install.php' ), __( 'Return to the Plugin Installer' ) ); wp_die( __( 'Incompatible Archive.' ) . '
' . $plugins_page ); } if ( 'themezip' === $form ) { $themes_page = sprintf( '%s', self_admin_url( 'theme-install.php' ), __( 'Return to the Theme Installer' ) ); wp_die( __( 'Incompatible Archive.' ) . '
' . $themes_page ); } } } $this->filename = $_FILES[ $form ]['name']; $this->package = $file['file']; // Construct the attachment array. $attachment = array( 'post_title' => $this->filename, 'post_content' => $file['url'], 'post_mime_type' => $file['type'], 'guid' => $file['url'], 'context' => 'upgrader', 'post_status' => 'private', ); // Save the data. $this->id = wp_insert_attachment( $attachment, $file['file'] ); // Schedule a cleanup for 2 hours from now in case of failed installation. wp_schedule_single_event( time() + 2 * HOUR_IN_SECONDS, 'upgrader_scheduled_cleanup', array( $this->id ) ); } elseif ( is_numeric( $_GET[ $urlholder ] ) ) { // Numeric Package = previously uploaded file, see above. $this->id = (int) $_GET[ $urlholder ]; $attachment = get_post( $this->id ); if ( empty( $attachment ) ) { wp_die( __( 'Please select a file' ) ); } $this->filename = $attachment->post_title; $this->package = get_attached_file( $attachment->ID ); } else { // Else, It's set to something, Back compat for plugins using the old (pre-3.3) File_Uploader handler. $uploads = wp_upload_dir(); if ( ! ( $uploads && false === $uploads['error'] ) ) { wp_die( $uploads['error'] ); } $this->filename = sanitize_file_name( $_GET[ $urlholder ] ); $this->package = $uploads['basedir'] . '/' . $this->filename; if ( ! str_starts_with( realpath( $this->package ), realpath( $uploads['basedir'] ) ) ) { wp_die( __( 'Please select a file' ) ); } } } /** * Deletes the attachment/uploaded file. * * @since 3.2.2 * * @return bool Whether the cleanup was successful. */ public function cleanup() { if ( $this->id ) { wp_delete_attachment( $this->id ); } elseif ( file_exists( $this->package ) ) { return @unlink( $this->package ); } return true; } }