[ Index ]

MailPress 544

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-admin/includes/ -> import.php (source)

   1  <?php
   2  if (isset($_GET['mp_import']))
   3  {
   4      $importers = MP_Import_importers::get_all();
   5  
   6      $importer = $_GET['mp_import'];
   7  
   8      // Allow plugins to define importers as well
   9      if (!is_callable($importers[$importer][2]))
  10      {
  11          $_file = MP_ABSPATH . "mp-includes/class/options/import/importers/$importer.php";
  12          if (!is_file($_file)) wp_die(__('Cannot load importer.', MP_TXTDOM));
  13          include($_file);
  14      }
  15  
  16      define('MP_IMPORTING', true);
  17  
  18      call_user_func($importers[$importer][2]);
  19  
  20      return;
  21  }
  22  
  23  $items = MP_AdminPage::get_list(); 
  24  ?>
  25  <div class='wrap'>
  26      <div id="icon-mailpress-tools" class="icon32"><br /></div>
  27      <h1><?php _e('Import/Export'); ?></h1>
  28  <?php
  29  if ($items)
  30  {
  31  ?>
  32          <p>
  33              <?php _e('If you have emails in another system, MailPress can import those into this blog.', MP_TXTDOM); ?>
  34              <br />
  35              <?php _e('MailPress can also export your MP users from this blog.', MP_TXTDOM); ?>
  36              <br />
  37              <?php _e('To get started, choose a system to import/export from below:', MP_TXTDOM); ?>
  38          </p>
  39          <table class='widefat'>
  40              <thead>
  41                  <tr>
  42  <?php     MP_AdminPage::columns_list(); ?>
  43                  </tr>
  44              </thead>
  45              <tfoot>
  46                  <tr>
  47  <?php     MP_AdminPage::columns_list(false); ?>
  48                  </tr>
  49              </tfoot>
  50              <tbody>
  51  <?php     foreach ($items as $id => $data) echo MP_AdminPage::get_row( $id, $data ); ?>
  52              </tbody>
  53          </table>
  54  <?php
  55  } 
  56  else 
  57  {
  58  ?>
  59          <p><?php _e('No importers/exporters available.', MP_TXTDOM); ?></p>
  60  <?php
  61  }
  62  ?>
  63  </div>


Generated: Thu Apr 28 18:38:52 2016 Cross-referenced by PHPXref 0.7.1