[ Index ]

MailPress 7.0.1

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

title

Body

[close]

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

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


Generated: Mon Jan 28 00:07:10 2019 Cross-referenced by PHPXref 0.7.1