Merged in feature/117-dev-dev01 (pull request #8)

auto-patch  117-dev-dev01-2023-12-15T16_09_06

* auto-patch  117-dev-dev01-2023-12-15T16_09_06
This commit is contained in:
Tony Volpe
2023-12-15 16:10:57 +00:00
parent 0825f6bd5f
commit 3dc9eca989
1424 changed files with 28118 additions and 10097 deletions

View File

@@ -175,7 +175,7 @@ class Core {
}
// Plugin admin area notices. Display to "admins" only.
if ( current_user_can( 'manage_options' ) ) {
if ( current_user_can( wp_mail_smtp()->get_capability_manage_options() ) ) {
add_action( 'admin_notices', array( '\WPMailSMTP\WP', 'display_admin_notices' ) );
add_action( 'admin_notices', array( $this, 'display_general_notices' ) );
@@ -609,7 +609,7 @@ class Core {
public function detect_conflicts() {
// Display only for those who can actually deactivate plugins.
if ( ! current_user_can( 'manage_options' ) ) {
if ( ! current_user_can( wp_mail_smtp()->get_capability_manage_options() ) ) {
return;
}
@@ -1346,4 +1346,23 @@ class Core {
return;
}
}
/**
* Get the default capability to manage everything for WP Mail SMTP.
*
* @since 3.11.0
*
* @return string
*/
public function get_capability_manage_options() {
/**
* Filters the default capability to manage everything for WP Mail SMTP.
*
* @since 3.11.0
*
* @param string $capability The default capability to manage everything for WP Mail SMTP.
*/
return apply_filters( 'wp_mail_smtp_core_get_capability_manage_options', 'manage_options' );
}
}