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:
@@ -58,7 +58,7 @@ class DashboardWidget {
|
||||
public function init() {
|
||||
|
||||
// This widget should be displayed for certain high-level users only.
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
if ( ! current_user_can( wp_mail_smtp()->get_capability_manage_options() ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ class DashboardWidget {
|
||||
|
||||
check_admin_referer( 'wp_mail_smtp_' . static::SLUG . '_nonce' );
|
||||
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
if ( ! current_user_can( wp_mail_smtp()->get_capability_manage_options() ) ) {
|
||||
wp_send_json_error();
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ class DashboardWidget {
|
||||
|
||||
check_admin_referer( 'wp_mail_smtp_' . static::SLUG . '_nonce' );
|
||||
|
||||
if ( ! current_user_can( 'manage_options' ) ) {
|
||||
if ( ! current_user_can( wp_mail_smtp()->get_capability_manage_options() ) ) {
|
||||
wp_send_json_error();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user