[ Index ]

MailPress 7.1

[ 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: 7.1
   9  */
  10  
  11  class MailPress_connection_sendmail
  12  {
  13  	function __construct()
  14      {
  15          new MP_Swift_Connection_sendmail();
  16  
  17  // for wp admin
  18          if ( is_admin() )
  19          {
  20          // for link on plugin page
  21              add_filter( 'plugin_action_links',             array( __CLASS__, 'plugin_action_links' ), 10, 2 );
  22          // for settings
  23              add_filter( 'MailPress_scripts',             array( __CLASS__, 'scripts' ), 8, 2 );
  24          }
  25      }
  26  
  27  ////  ADMIN  ////
  28  ////  ADMIN  ////
  29  ////  ADMIN  ////
  30  ////  ADMIN  ////
  31  
  32  // for link on plugin page
  33  	public static function plugin_action_links( $links, $file )
  34      {
  35          return MailPress::plugin_links( $links, $file, plugin_basename( __FILE__ ), 'connection_sendmail' );
  36      }
  37  
  38  // for settings
  39  	public static function scripts( $scripts, $screen ) 
  40      {
  41          if ( $screen != MailPress_page_settings ) return $scripts;
  42  
  43          wp_register_script( 'mp-sendmail',     '/' . MP_PATH . 'mp-admin/js/settings_sendmail.js', array(), false, 1 );
  44          $scripts[] = 'mp-sendmail';
  45  
  46          return $scripts;
  47      }
  48  }
  49  new MailPress_connection_sendmail();
  50  }


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