Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-admin/import.php

    r17086 r15327  
    2121    '<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>' .
    2222    '<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>' .
    2424    '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
    2525);
     
    3838
    3939if ( ! 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]);
    4141    exit;
    4242}
    4343
    4444add_thickbox();
    45 wp_enqueue_script( 'plugin-install' );
    46 wp_admin_css( 'plugin-install' );
    47 
    4845require_once ('admin-header.php');
    4946$parent_file = 'tools.php';
     
    6259// Load all importers so that they can register.
    6360$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);
     63if ($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);
    7569        }
    7670    }
    77     closedir( $imports_dir );
    7871}
     72@closedir($imports_dir);
    7973
    8074$importers = get_importers();
     
    115109            }
    116110            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="' .
    119113                                        esc_attr__('Install importer') . '">' . $data[0] . '</a>';
    120114        } else {
     
    137131
    138132if ( 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>';
    140134?>
    141135
Note: See TracChangeset for help on using the changeset viewer.