PHP Cross Reference of WordPress Subversion HEAD |
| [ Index ] [ Classes ] [ Functions ] [ Variables ] [ Constants ] |
[Summary view] [Print] [Text view]
1 <?php 2 require_once ('admin.php'); 3 $title = __('Import'); 4 $parent_file = 'edit.php'; 5 require_once ('admin-header.php'); 6 ?> 7 8 <div class="wrap"> 9 <h2><?php _e('Import'); ?></h2> 10 <p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p> 11 12 <?php 13 14 // Load all importers so that they can register. 15 $import_loc = 'wp-admin/import'; 16 $import_root = ABSPATH.$import_loc; 17 $imports_dir = @ opendir($import_root); 18 if ($imports_dir) { 19 while (($file = readdir($imports_dir)) !== false) { 20 if ($file{0} == '.') { 21 continue; 22 } elseif (substr($file, -4) == '.php') { 23 require_once($import_root . '/' . $file); 24 } 25 } 26 } 27 @closedir($imports_dir); 28 29 $importers = get_importers(); 30 31 if (empty ($importers)) { 32 echo '<p>'.__('No importers are available.').'</p>'; // TODO: make more helpful 33 } else { 34 ?> 35 <table class="widefat"> 36 37 <?php 38 $style = ''; 39 foreach ($importers as $id => $data) { 40 $style = ('class="alternate"' == $style || 'class="alternate active"' == $style) ? '' : 'alternate'; 41 $action = "<a href='admin.php?import=$id' title='".wptexturize(strip_tags($data[1]))."'>{$data[0]}</a>"; 42 43 if ($style != '') 44 $style = 'class="'.$style.'"'; 45 echo " 46 <tr $style> 47 <td class='import-system'>$action</td> 48 <td class='desc'>{$data[1]}</td> 49 </tr>"; 50 } 51 ?> 52 53 </table> 54 <?php 55 } 56 ?> 57 58 </div> 59 60 <?php 61 62 include ('admin-footer.php'); 63 ?> 64
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated Thu Dec 6 06:47:08 2007 for RedAlt XRefs | Cross-referenced by PHPXref 0.6 and RedAlt |