PHP Класс Global_SMTP_Mailer

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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