[ Index ]

MailPress 544

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

title

Body

[close]

/mp-includes/class/options/dashboard/widgets/ -> recent_archives.php (source)

   1  <?php
   2  global $mp_mails;
   3  $mp_mails = new MP_Query();
   4  $mp_mails->query();
   5  if ($mp_mails->mail_count)
   6  {
   7  class MP_Dashboard_recent_archives extends MP_dashboard_widget_
   8  {
   9      var $id = 'mp_recent_archives';
  10  
  11  	function __construct($name)
  12      {
  13          wp_register_script('mp-thickbox',         '/' . MP_PATH . 'mp-includes/js/mp_thickbox.js', array('thickbox'), false, 1);
  14          wp_enqueue_script ('mp-thickbox');
  15  
  16          parent::__construct($name);
  17      }
  18  
  19  	function widget()
  20      {
  21          global $mp_mails;
  22          $i = 0;
  23  ?>
  24  <ul>
  25  <?php             
  26          while ($mp_mails->have_mails()) : $mp_mails->the_mail();
  27              $args = array();
  28              $args['id']     = $mp_mails->get_the_ID();
  29              $args['action']     = 'iview';
  30              $args['preview_iframe'] = 1; $args['TB_iframe']= 'true';
  31              $view_url        = esc_url(MP_::url(MP_Action_url, $args));
  32  ?>
  33      <li id='mail-<?php $mp_mails->the_ID(); ?>'>
  34          <h4 style='font-weight:normal;'>
  35              <a class='thickbox thickbox-preview' title="<?php _e('View', MP_TXTDOM ); ?>" href="<?php echo $view_url; ?>" >
  36                  <?php $mp_mails->the_subject(); ?>
  37              </a>
  38              <abbr title='<?php $mp_mails->the_date('Y/m/d g:i:s A'); ?>' style='color:#999;font-family:"Lucida Grande",Verdana,Arial,"Bitstream Vera Sans",sans-serif;font-size:11px;margin-left:3px;'>
  39                  <?php $mp_mails->the_date(); ?>
  40              </abbr>
  41          </h4>
  42          <p style='margin:0;padding:0;'>
  43          <?php $mp_mails->the_Theme(); ?> (<?php $mp_mails->the_Template(); ?>)
  44          </p>
  45      </li>
  46  <?php
  47              $i++;
  48              if ($i == 10) break;    
  49          endwhile;
  50  ?>
  51  </ul>
  52  <p class="textright">
  53      <a class="button" href="<?php echo MailPress_mails . '&amp;status=archived'; ?>">
  54          <?php _e('View all'); ?>
  55      </a>
  56  </p>
  57  <?php
  58      }
  59  }
  60  new MP_Dashboard_recent_archives(__( 'MailPress - Recent Archives', MP_TXTDOM ));
  61  }


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