plugin updates

This commit is contained in:
Tony Volpe
2024-07-18 20:40:50 +00:00
parent 1cbeccbe26
commit f13cad0e36
314 changed files with 45107 additions and 30963 deletions

View File

@@ -31,6 +31,7 @@ class Helpers {
'mailgun',
'postmark',
'sparkpost',
'smtp2go',
],
true
);

View File

@@ -66,4 +66,53 @@ class UI {
</label>
<?php
}
/**
* Output an obfuscated password field.
*
* @since 4.1.0
*
* @param array $args Field attributes.
*
* @return void
*/
public static function hidden_password_field( $args ) { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
$args = wp_parse_args(
$args,
[
'name' => '',
'id' => '',
'value' => '',
'clear_text' => esc_html__( 'Remove', 'wp-mail-smtp' ),
]
);
$value = str_repeat( '*', strlen( $args['value'] ) );
// phpcs:disable Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
?>
<div class="wp-mail-smtp-input-btn-row">
<input type="password"
spellcheck="false"
autocomplete="new-password"
<?php if ( ! empty( $value ) ) : ?>disabled<?php endif; ?>
<?php if ( ! empty( $args['name'] && empty( $value ) ) ) : ?>name="<?php echo esc_attr( $args['name'] ); ?>"<?php endif; ?>
<?php if ( ! empty( $args['name'] ) ) : ?>data-name="<?php echo esc_attr( $args['name'] ); ?>"<?php endif; ?>
<?php if ( ! empty( $args['id'] ) ) : ?>id="<?php echo esc_attr( $args['id'] ); ?>"<?php endif; ?>
<?php if ( ! empty( $value ) ) : ?>value="<?php echo esc_attr( $value ); ?>"<?php endif; ?>/>
<?php if ( ! empty( $value ) ) : ?>
<button type="button"
class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-grey"
data-clear-field="<?php echo esc_attr( $args['id'] ); ?>"><?php echo esc_html( $args['clear_text'] ); ?></button>
<?php endif; ?>
</div>
<?php
// phpcs:enable Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace
}
}