Changeset 14970
- Timestamp:
- 05/27/2010 02:03:06 AM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin.php
r14759 r14970 161 161 wp_die(__('You are not allowed to import.')); 162 162 163 if ( validate_file($importer) ) { 164 wp_die(__('Invalid importer.')); 165 } 163 if ( validate_file($importer) ) 164 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); 166 165 167 166 // Allow plugins to define importers as well 168 167 if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2])) { 169 168 if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) 170 wp_ die(__('Cannot load importer.'));169 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) ); 171 170 include(ABSPATH . "wp-admin/import/$importer.php"); 172 171 } -
trunk/wp-admin/import.php
r14969 r14970 32 32 <?php screen_icon(); ?> 33 33 <h2><?php echo esc_html( $title ); ?></h2> 34 <?php if ( ! empty( $_GET['invalid'] ) ) : ?> 35 <div class="error"><p><strong><?php _e('ERROR:')?></strong> <?php printf( __('The <strong>%s</strong> importer is invalid or is not installed.'), esc_html( $_GET['invalid'] ) ); ?></p></div> 36 <?php endif; ?> 34 37 <p><?php _e('If you have posts or comments in another system, WordPress can import those into this site. To get started, choose a system to import from below:'); ?></p> 35 38
Note: See TracChangeset
for help on using the changeset viewer.