diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:51:18 +0000 |
commit | 0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch) | |
tree | e139a90049b158d4eed892d1662ee7f5c358fa31 /wp-admin/includes/class-file-upload-upgrader.php | |
parent | Adding upstream version 6.5.5+dfsg1. (diff) | |
download | wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.tar.xz wordpress-0e41b5d52fdc6af6442816b5f465c9db9f84e126.zip |
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wp-admin/includes/class-file-upload-upgrader.php')
-rw-r--r-- | wp-admin/includes/class-file-upload-upgrader.php | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/wp-admin/includes/class-file-upload-upgrader.php b/wp-admin/includes/class-file-upload-upgrader.php index 1201c6d..48e1aac 100644 --- a/wp-admin/includes/class-file-upload-upgrader.php +++ b/wp-admin/includes/class-file-upload-upgrader.php @@ -72,7 +72,24 @@ class File_Upload_Upgrader { if ( 'pluginzip' === $form || 'themezip' === $form ) { if ( ! wp_zip_file_is_valid( $file['file'] ) ) { wp_delete_file( $file['file'] ); - wp_die( __( 'Incompatible Archive.' ) ); + + if ( 'pluginzip' === $form ) { + $plugins_page = sprintf( + '<a href="%s">%s</a>', + self_admin_url( 'plugin-install.php' ), + __( 'Return to the Plugin Installer' ) + ); + wp_die( __( 'Incompatible Archive.' ) . '<br />' . $plugins_page ); + } + + if ( 'themezip' === $form ) { + $themes_page = sprintf( + '<a href="%s" target="_parent">%s</a>', + self_admin_url( 'theme-install.php' ), + __( 'Return to the Theme Installer' ) + ); + wp_die( __( 'Incompatible Archive.' ) . '<br />' . $themes_page ); + } } } |