Changes from branches/3.0/wp-admin/import.php at r15327 to trunk/wp-admin/import.php at r17086
- File:
-
- 1 edited
-
trunk/wp-admin/import.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/import.php
r15327 r17086 21 21 '<p>' . __('In previous versions of WordPress, all the importers were built-in, but they have been turned into plugins as of version 3.0 since most people only use them once or infrequently.') . '</p>' . 22 22 '<p><strong>' . __('For more information:') . '</strong></p>' . 23 '<p>' . __('<a href="http://codex.wordpress.org/Tools_Import_SubPanel" target="_blank"> Import Documentation</a>') . '</p>' .23 '<p>' . __('<a href="http://codex.wordpress.org/Tools_Import_SubPanel" target="_blank">Documentation on Import</a>') . '</p>' . 24 24 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 25 25 ); … … 38 38 39 39 if ( ! empty( $_GET['invalid'] ) && !empty($popular_importers[$_GET['invalid']][3]) ) { 40 wp_redirect( "import.php?import=" . $popular_importers[$_GET['invalid']][3]);40 wp_redirect( admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]) ); 41 41 exit; 42 42 } 43 43 44 44 add_thickbox(); 45 wp_enqueue_script( 'plugin-install' ); 46 wp_admin_css( 'plugin-install' ); 47 45 48 require_once ('admin-header.php'); 46 49 $parent_file = 'tools.php'; … … 59 62 // Load all importers so that they can register. 60 63 $import_loc = 'wp-admin/import'; 61 $import_root = ABSPATH.$import_loc; 62 $imports_dir = @ opendir($import_root); 63 if ($imports_dir) { 64 while (($file = readdir($imports_dir)) !== false) { 65 if ($file{0} == '.') { 66 continue; 67 } elseif (substr($file, -4) == '.php') { 68 require_once($import_root . '/' . $file); 64 $import_root = ABSPATH . $import_loc; 65 66 if ( file_exists( $import_root ) ) { 67 $imports_dir = opendir($import_root); 68 if ($imports_dir) { 69 while (($file = readdir($imports_dir)) !== false) { 70 if ($file[0] == '.') { 71 continue; 72 } elseif (substr($file, -4) == '.php') { 73 require_once($import_root . '/' . $file); 74 } 69 75 } 70 76 } 77 closedir( $imports_dir ); 71 78 } 72 @closedir($imports_dir);73 79 74 80 $importers = get_importers(); … … 109 115 } 110 116 if ( empty($action) ) 111 $action = '<a href="' . esc_url( admin_url('plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug .112 '&from=import&TB_iframe=true&width=600&height=550' )) . '" class="thickbox" title="' .117 $action = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=' . $plugin_slug . 118 '&from=import&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox" title="' . 113 119 esc_attr__('Install importer') . '">' . $data[0] . '</a>'; 114 120 } else { … … 131 137 132 138 if ( current_user_can('install_plugins') ) 133 echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugins directory</a> to see if an importer is available.'), esc_url( admin_url('plugin-install.php?tab=search&type=tag&s=importer')) ) . '</p>';139 echo '<p>' . sprintf( __('If the importer you need is not listed, <a href="%s">search the plugins directory</a> to see if an importer is available.'), esc_url( network_admin_url( 'plugin-install.php?tab=search&type=tag&s=importer' ) ) ) . '</p>'; 134 140 ?> 135 141
Note: See TracChangeset
for help on using the changeset viewer.