Skip to content

Commit fa86648

Browse files
committed
Add FluentSMTP admin guard
1 parent 5a4dc97 commit fa86648

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

mu-plugins/fluent-smtp.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,32 @@ static function () {
3939
0,
4040
0
4141
);
42+
43+
// Hide notice on the plugin-install search screen
44+
add_action(
45+
'admin_head-plugin-install.php',
46+
static function () {
47+
echo '<style>.fluent_smtp_box { display: none !important; }</style>';
48+
}
49+
);
50+
51+
// Suppress the subscription prompt
52+
add_filter(
53+
'pre_option__fluentsmtp_dismissed_timestamp',
54+
static function () {
55+
return time();
56+
}
57+
);
58+
59+
// Remove the promotion from admin footer
60+
add_filter(
61+
'admin_footer_text',
62+
static function ($text) {
63+
if (empty($_GET['page']) || $_GET['page'] !== 'fluent-mail') {
64+
return $text;
65+
}
66+
67+
return '';
68+
},
69+
PHP_INT_MAX
70+
);

0 commit comments

Comments
 (0)