Changes from trunk/wp-admin/import.php at r17086 to branches/3.0/wp-admin/import.php at r15327
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/wp-admin/import.php
r17086 r15327 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"> Documentation on Import</a>') . '</p>' .23 '<p>' . __('<a href="http://codex.wordpress.org/Tools_Import_SubPanel" target="_blank">Import Documentation</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( admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]));40 wp_redirect("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 48 45 require_once ('admin-header.php'); 49 46 $parent_file = 'tools.php'; … … 62 59 // Load all importers so that they can register. 63 60 $import_loc = 'wp-admin/import'; 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 } 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); 75 69 } 76 70 } 77 closedir( $imports_dir );78 71 } 72 @closedir($imports_dir); 79 73 80 74 $importers = get_importers(); … … 115 109 } 116 110 if ( empty($action) ) 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="' .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="' . 119 113 esc_attr__('Install importer') . '">' . $data[0] . '</a>'; 120 114 } else { … … 137 131 138 132 if ( current_user_can('install_plugins') ) 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>';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>'; 140 134 ?> 141 135
Note: See TracChangeset
for help on using the changeset viewer.