[ Index ]

MailPress 7.1

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

title

Body

[close]

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

   1  <?php
   2  
   3  if ( !( function_exists( 'current_user_can' ) && current_user_can( MP_AdminPage::capability ) ) ) die( 'Access denied' );
   4  
   5  $url_parms = MP_AdminPage::get_url_parms();
   6  
   7  //
   8  // MANAGING H1
   9  //
  10  
  11  $h1 = __( 'MailPress Add-ons', 'MailPress' );
  12  
  13  //
  14  // MANAGING MESSAGE / CHECKBOX RESULTS
  15  //
  16  
  17  $results = array(    'activated'    =>     array(     's' => __( '%s add-on activated', 'MailPress' ),
  18                                          'p' => __( '%s add-ons activated', 'MailPress' )
  19                                  ),
  20                  'deactivated'    =>     array(     's' => __( '%s add-on deactivated', 'MailPress' ),
  21                                          'p' => __( '%s add-ons deactivated', 'MailPress' )
  22                                  ),
  23  );
  24  
  25  foreach ( $results as $k => $v )
  26  {
  27      if ( isset( MP_AdminPage::$get_[$k] ) && MP_AdminPage::$get_[$k] )
  28      {
  29          if ( !isset( $message ) ) 
  30          {
  31              $message = '';
  32          }
  33          $message .= sprintf( _n( $v['s'], $v['p'], MP_AdminPage::$get_[$k] ), MP_AdminPage::$get_[$k] );
  34          $message .=  '<br />';
  35      }
  36  }
  37  
  38  //
  39  // MANAGING BULK ACTIONS
  40  //
  41  
  42  $bulk_actions[''] = __( 'Bulk Actions' );
  43  $context = ( isset( $url_parms['status'] ) ) ? $url_parms['status'] : false;
  44  if ( 'active' != $context )
  45  {
  46  //    $bulk_actions['activate']   = __( 'Activate' );
  47  }
  48  if ( 'inactive' != $context )
  49  {
  50      $bulk_actions['deactivate'] = __( 'Deactivate' );
  51  }
  52  
  53  //
  54  // MANAGING LIST
  55  //
  56  
  57  list( $items, $subsubsub_urls ) = MP_AdminPage::get_list( array( 'url_parms' => $url_parms ) );
  58  
  59  ?>
  60  <div class="wrap">
  61      <h1>
  62          <?php echo esc_html( $h1 ); ?> 
  63  <?php if ( isset( $url_parms['s'] ) ) printf( '<span class="subtitle">' . __( 'Search results for &#8220;%s&#8221;' ) . '</span>', esc_attr( $url_parms['s'] ) ); ?>
  64      </h1>
  65  <?php if ( isset( $message ) ) MP_AdminPage::message( $message ); ?>
  66  
  67      <ul class="subsubsub"><?php echo $subsubsub_urls; ?></ul>
  68  
  69      <form id="posts-filter" method="get">
  70  
  71          <input type="hidden" name="page" value="<?php echo MP_AdminPage::screen; ?>" />
  72  <?php MP_AdminPage::post_url_parms( $url_parms, array( 'status' ) ); ?>
  73  
  74          <p class="search-box">
  75              <input type="text" name="s" class="search-input" value="<?php if ( isset( $url_parms['s'] ) ) echo esc_attr( $url_parms['s'] ); ?>" />
  76              <input type="submit" class="button" value="<?php _e( 'Search', 'MailPress' ); ?>" />
  77          </p>
  78  <?php
  79  if ( $items )
  80  {
  81  ?>
  82          <div class="tablenav top">
  83              <div class="alignleft actions bulkactions">
  84  <?php     MP_AdminPage::get_bulk_actions( $bulk_actions ); ?>
  85              </div>
  86              <br class="clear" />
  87          </div>
  88          <div class="clear"></div>
  89  
  90          <table class="wp-list-table widefat fixed striped plugins">
  91              <thead>
  92                  <tr>
  93  <?php MP_AdminPage::columns_list(); ?>
  94                  </tr>
  95              </thead>
  96              <tbody class="addons">
  97  <?php foreach ( $items as $item ) echo MP_AdminPage::get_row( $item, $url_parms ); ?>
  98              </tbody>
  99              <tfoot>
 100                  <tr>
 101  <?php MP_AdminPage::columns_list( false ); ?>
 102                  </tr>
 103              </tfoot>
 104          </table>
 105          <div class="tablenav bottom">
 106              <div class="alignleft actions bulkactions">
 107  <?php     MP_AdminPage::get_bulk_actions( $bulk_actions, 'action2' ); ?>
 108              </div>
 109              <br class="clear" />
 110          </div>
 111      </form>
 112  <?php
 113  }
 114  else
 115  {
 116  ?>
 117      </form>
 118      <div class="clear"></div>
 119      <p>
 120          <?php _e( 'No results found.', 'MailPress' ) ?>
 121      </p>
 122  <?php
 123  }
 124  ?>
 125  </div>


Generated: Mon Mar 11 18:33:33 2019 Cross-referenced by PHPXref 0.7.1