/home/vianto5/distritosatelite.mx/wp-content/plugins/wp-mail-smtp/src/Providers
Edit: /home/vianto5/distritosatelite.mx/wp-content/plugins/wp-mail-smtp/src/Providers/OptionsAbstract.php (18316B)
connection = $connection;
} else {
$this->connection = wp_mail_smtp()->get_connections_manager()->get_primary_connection();
}
$this->connection_options = $this->connection->get_options();
if (
empty( $params['slug'] ) ||
empty( $params['title'] )
) {
return;
}
$this->slug = sanitize_key( $params['slug'] );
$this->title = sanitize_text_field( $params['title'] );
if ( ! empty( $params['description'] ) ) {
$this->description = wp_kses_post( $params['description'] );
}
if ( ! empty( $params['notices'] ) ) {
foreach ( (array) $params['notices'] as $key => $notice ) {
$key = sanitize_key( $key );
if ( empty( $key ) ) {
continue;
}
$notice = wp_kses(
$notice,
array(
'br' => true,
'strong' => true,
'em' => true,
'a' => array(
'href' => true,
'rel' => true,
'target' => true,
),
)
);
if ( empty( $notice ) ) {
continue;
}
$this->notices[ $key ] = $notice;
}
}
if ( isset( $params['recommended'] ) ) {
$this->recommended = (bool) $params['recommended'];
}
if ( isset( $params['disabled'] ) ) {
$this->disabled = (bool) $params['disabled'];
}
if ( ! empty( $params['php'] ) ) {
$this->php = sanitize_text_field( $params['php'] );
}
if ( ! empty( $params['logo_url'] ) ) {
$this->logo_url = esc_url_raw( $params['logo_url'] );
}
$this->supports = ( ! empty( $params['supports'] ) ) ? $params['supports'] : $this->get_supports_defaults();
$this->options = Options::init();
}
/**
* @inheritdoc
*/
public function get_logo_url() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_logo_url', $this->logo_url, $this );
}
/**
* @inheritdoc
*/
public function get_slug() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_slug', $this->slug, $this );
}
/**
* @inheritdoc
*/
public function get_title() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_title', $this->title, $this );
}
/**
* @inheritdoc
*/
public function get_description() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_description', $this->description, $this );
}
/**
* Get the mailer provider notices.
*
* @since 4.3.0
*
* @return array
*/
public function get_notices() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_notices', $this->notices, $this );
}
/**
* Some mailers may display a notice above its options.
*
* @since 1.6.0
*
* @param string $type
*
* @return string
*/
public function get_notice( $type ) {
$type = sanitize_key( $type );
return apply_filters( 'wp_mail_smtp_providers_provider_get_notice', isset( $this->notices[ $type ] ) ? $this->notices[ $type ] : '', $this );
}
/**
* @inheritdoc
*/
public function get_php_version() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_php_version', $this->php, $this );
}
/**
* @inheritdoc
*/
public function display_options() {
?>
'wp-mail-smtp[' . $this->get_slug() . '][autotls]',
'id' => 'wp-mail-smtp-setting-' . $this->get_slug() . '-autotls',
'checked' => (bool) $this->connection_options->get( $this->get_slug(), 'autotls' ),
'disabled' => $this->connection_options->is_const_defined( $this->get_slug(), 'autotls' ),
]
);
?>
'wp-mail-smtp[' . $this->get_slug() . '][auth]',
'id' => 'wp-mail-smtp-setting-' . $this->get_slug() . '-auth',
'checked' => (bool) $this->connection_options->get( $this->get_slug(), 'auth' ),
'disabled' => $this->connection_options->is_const_defined( $this->get_slug(), 'auth' ),
]
);
?>
connection_options->is_const_defined( $this->get_slug(), 'pass' ) ) : ?>
display_const_set_message( 'WPMS_SMTP_PASS' ); ?>
define( \'WPMS_SMTP_PASS\', \'your_old_password\' );'
);
?>
wp-config.php',
'WPMS_ON'
);
?>
define( 'WPMS_ON', false );
get_slug();
$value = $this->connection_options->get( $slug, 'pass' );
UI::hidden_password_field(
[
'name' => "wp-mail-smtp[{$slug}][pass]",
'id' => "wp-mail-smtp-setting-{$slug}-pass",
'value' => $value,
'clear_text' => esc_html__( 'Remove Password', 'wp-mail-smtp' ),
]
);
?>
%2$s ',
esc_url( wp_mail_smtp()->get_utm_url( 'https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/', 'SMTP Password - Learn More' ) ),
esc_html__( 'Learn More', 'wp-mail-smtp' )
)
?>
recommended, $this );
}
/**
* Whether this mailer is disabled or not.
* Used for displaying Pro mailers inside Lite plugin.
*
* @since 1.7.0
*
* @return bool
*/
public function is_disabled() {
return (bool) apply_filters( 'wp_mail_smtp_providers_provider_is_disabled', $this->disabled, $this );
}
/**
* Check whether we can use this provider based on the PHP version.
* Valid for those, that use SDK.
*
* @since 1.0.0
*
* @return bool
*/
public function is_php_correct() {
return version_compare( phpversion(), $this->php, '>=' );
}
/**
* Display a helpful message to those users, that are using an outdated version of PHP,
* which is not supported by the currently selected Provider.
*
* @since 1.0.0
*/
protected function display_php_warning() {
?>
get_title() ),
esc_html( $this->php ),
esc_html( phpversion() )
);
?>
WPBeginner\'s tutorial on how to set up SSL.', 'wp-mail-smtp' ),
[
'a' => [
'href' => [],
'target' => [],
],
]
),
esc_html( $this->get_title() )
);
?>
%s', $this->options->get_const_set_message( $constant ) ); //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/**
* Return the defaults for the mailer supported settings.
*
* @since 2.3.0
*
* @return array
*/
public function get_supports_defaults() {
return [
'from_email' => true,
'from_name' => true,
'return_path' => true,
'from_email_force' => true,
'from_name_force' => true,
];
}
/**
* Get the mailer supported settings.
*
* @since 2.3.0
*
* @return array
*/
public function get_supports() {
return apply_filters( 'wp_mail_smtp_providers_provider_get_supports', $this->supports, $this );
}
}