PHP 클래스 Global_SMTP_Mailer

파일 보기 프로젝트 열기: rohmann/global-smtp 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$instance Singleton

공개 메소드들

메소드 설명
__construct ( ) Checks settings, and hooks into phpmailer if everything is good.
check_headers ( array $atts ) : array Filter for wp_mail used for introspection
get_from ( $from ) : string Callback for wp_mail_from filter.
get_from_name ( $from_name ) : string Callback for wp_mail_from_name filter Applies the from name constant if a "From" header was not present.
instance ( ) : object Get this plugin's main class instance
launch ( ) Self Instantiate Note: Plugin can be disable internally by setting GLOBAL_SMTP_DISABLE to true.
mailer ( $phpmailer ) Hook PHP Mailer to use our SMTP settings
register_admin_menu ( ) : none Register our admin menu in the correct context.
render_admin_page ( ) : none Display the admin page

보호된 메소드들

메소드 설명
prepare_settings ( ) Prepare PHP Mailer settings. Allows for minimum configuration by asumming common defualts.
validate ( ) : boolean | WP_Error Validate Configuration to ensure things are setup correctly

메소드 상세

__construct() 공개 메소드

Checks settings, and hooks into phpmailer if everything is good.
public __construct ( )

check_headers() 공개 메소드

Filter for wp_mail used for introspection
public check_headers ( array $atts ) : array
$atts array Arguments passed into wp_mail
리턴 array Unmodified $atts

get_from() 공개 메소드

Applies the from address constant if a "From" header was not present.
public get_from ( $from ) : string
리턴 string from email address

get_from_name() 공개 메소드

Callback for wp_mail_from_name filter Applies the from name constant if a "From" header was not present.
public get_from_name ( $from_name ) : string
리턴 string from email address

instance() 공개 정적인 메소드

Get this plugin's main class instance
public static instance ( ) : object
리턴 object

launch() 공개 정적인 메소드

This is useful if you have different needs between staging and production environments.
public static launch ( )

mailer() 공개 메소드

Hook PHP Mailer to use our SMTP settings
public mailer ( $phpmailer )

prepare_settings() 보호된 메소드

Prepare PHP Mailer settings. Allows for minimum configuration by asumming common defualts.
protected prepare_settings ( )

register_admin_menu() 공개 메소드

Register our admin menu in the correct context.
public register_admin_menu ( ) : none
리턴 none

render_admin_page() 공개 메소드

Display the admin page
public render_admin_page ( ) : none
리턴 none

validate() 보호된 메소드

Validate Configuration to ensure things are setup correctly
protected validate ( ) : boolean | WP_Error
리턴 boolean | WP_Error Returns true if successful, else WP_Error with message

프로퍼티 상세

$instance 보호되어 있는 정적으로 프로퍼티

Singleton
protected static $instance