[ Index ]

MailPress 7.1

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

title

Body

[close]

/mp-admin/ -> view_log.php (source)

   1  <?php
   2  class MP_AdminPage extends MP_WP_Admin_page_
   3  {
   4      const screen        = 'mailpress_viewlog';
   5      const capability    = 'MailPress_view_logs';
   6      const help_url        = 'http://blog.mailpress.org/tutorials/add-ons/view_logs/';
   7      const file            = __FILE__;
   8  
   9  ////  Title  ////
  10  
  11  	public static function title()
  12      {
  13          global $title;
  14          $title = __( 'MailPress Log', 'MailPress' );
  15      }
  16  
  17  //// Help ////
  18  
  19  	public static function add_help_tab() 
  20      {
  21          global $current_screen;
  22  
  23          $content = '';
  24          $content .= '<p><strong>' . __( 'View log :', 'MailPress' ) . '</strong></p>';
  25          $content .= '<p>' . __( 'This screen displays the content of the log file selected.', 'MailPress' ) . '</p>';
  26  
  27          $current_screen->add_help_tab( array(     'id'        => 'overview',
  28                                          'title'        => __( 'Overview' ),
  29                                          'content'    => $content )
  30          );
  31  
  32          $content = '';
  33  
  34          $current_screen->add_help_tab( array(     'id'        => 'autorefresh',
  35                                          'title'        => __( 'Autorefresh' ),
  36                                          'content'    => $content )
  37          );
  38      }
  39  
  40  ////  Styles  ////
  41  
  42  	public static function print_styles( $s ) 
  43      {
  44          $styles = ( is_array( $s ) ) ? $s : array();
  45  
  46          wp_register_style( self::screen,     '/' . MP_PATH . 'mp-admin/css/view_log.css' );
  47          $styles[] = self::screen;
  48  
  49          parent::print_styles( $styles );
  50      }
  51  
  52  ////  Scripts  ////
  53  
  54  	public static function print_scripts( $scripts = array() ) 
  55      {
  56          $scripts = apply_filters( 'MailPress_autorefresh_files_js', $scripts );
  57  
  58          parent::print_scripts( $scripts );
  59      }
  60  
  61  ////  for PATH  ////
  62  
  63  	public static function get_path() 
  64      {
  65          return MP_UPL_ABSPATH . 'log';
  66      }
  67  
  68  
  69  ////  for URL  ////
  70  	public static function get_url() 
  71      {
  72          return MP_UPL_URL . 'log';
  73      }
  74  }


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