[ Index ]

MailPress 544

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

title

Body

[close]

/mp-content/add-ons/ -> MailPress_connection_sendmail.php (source)

   1  <?php
   2  if (class_exists('MailPress') && !class_exists('MailPress_connection_sendmail') )
   3  {
   4  /*
   5  Plugin Name: MailPress_connection_sendmail 
   6  Plugin URI: http://blog.mailpress.org/tutorials/add-ons/connection_sendmail/
   7  Description: Connection : use Sendmail
   8  Version: 5.4.4
   9  */
  10  
  11  class MailPress_connection_sendmail
  12  {
  13      const option_name = 'MailPress_connection_sendmail';
  14  
  15  	function __construct()
  16      {
  17          new MP_Connection_sendmail();
  18  
  19  // for wp admin
  20          if (is_admin())
  21          {
  22          // for link on plugin page
  23              add_filter('plugin_action_links',             array(__CLASS__, 'plugin_action_links'), 10, 2 );
  24          // for settings
  25              add_filter('MailPress_scripts',             array(__CLASS__, 'scripts'), 8, 2);
  26          }
  27      }
  28  
  29  ////  ADMIN  ////
  30  ////  ADMIN  ////
  31  ////  ADMIN  ////
  32  ////  ADMIN  ////
  33  
  34  // for link on plugin page
  35  	public static function plugin_action_links($links, $file)
  36      {
  37          return MailPress::plugin_links($links, $file, plugin_basename(__FILE__), 'connection_sendmail');
  38      }
  39  
  40  // for settings
  41  	public static function scripts($scripts, $screen) 
  42      {
  43          if ($screen != MailPress_page_settings) return $scripts;
  44  
  45          wp_register_script( 'mp-sendmail',     '/' . MP_PATH . 'mp-admin/js/settings_sendmail.js', array(), false, 1);
  46          $scripts[] = 'mp-sendmail';
  47  
  48          return $scripts;
  49      }
  50  }
  51  new MailPress_connection_sendmail();
  52  }


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