+ ADD robots.txt and ads.txt files
This commit is contained in:
@@ -23,8 +23,8 @@ class AppMuPlugin
|
||||
public function __construct()
|
||||
{
|
||||
// Define constants
|
||||
$this->define_constants();
|
||||
|
||||
$this->define_constants();
|
||||
|
||||
if (defined('ERROR_LOG_TO_STDOUT')) {
|
||||
if (ERROR_LOG_TO_STDOUT) {
|
||||
// WP error log to stdout
|
||||
@@ -35,7 +35,7 @@ class AppMuPlugin
|
||||
// Filter S3 Uploads params.
|
||||
$this->s3_uploads_endpoint();
|
||||
}
|
||||
|
||||
|
||||
if (defined('SMTP_ENABLED') && SMTP_ENABLED) {
|
||||
// If SMTP is enabled, setup PHPMailer
|
||||
if (defined('SMTP_SERVER') && defined('SMTP_PORT')) {
|
||||
@@ -75,7 +75,7 @@ class AppMuPlugin
|
||||
}, 10);
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function s3_uploads_endpoint() {
|
||||
// Filter S3 Uploads params.
|
||||
add_filter('s3_uploads_s3_client_params', function ($params) {
|
||||
@@ -88,7 +88,7 @@ class AppMuPlugin
|
||||
|
||||
private function header_security() {
|
||||
// Add Security headers.
|
||||
add_filter('wp_headers',
|
||||
add_filter('wp_headers',
|
||||
function ($headers) {
|
||||
$headers['X-Frame-Options'] = 'SAMEORIGIN';
|
||||
$headers['X-Content-Type-Options'] = 'nosniff';
|
||||
@@ -138,7 +138,7 @@ class AppMuPlugin
|
||||
add_action('phpmailer_init', function ($phpmailer) {
|
||||
$phpmailer->Host = SMTP_SERVER;
|
||||
$phpmailer->Port = SMTP_PORT;
|
||||
|
||||
|
||||
// If SMTP_LOGIN is defined, use it for authentication
|
||||
if (defined('SMTP_LOGIN')) {
|
||||
$phpmailer->SMTPAuth = true; // Enable SMTP authentication
|
||||
@@ -175,6 +175,18 @@ class AppMuPlugin
|
||||
}
|
||||
|
||||
private function two_factor_default() {
|
||||
add_filter('two_factor_providers', function ($providers)
|
||||
{
|
||||
// Disable FIDO U2F by default
|
||||
// ISSUE https://wordpress.org/support/topic/i-cant-add-my-yubikey/
|
||||
$providers['Two_Factor_FIDO_U2F'] = '';
|
||||
// Disable Dummy provider by default
|
||||
$providers['Two_Factor_Dummy'] = '';
|
||||
return $providers;
|
||||
});
|
||||
|
||||
// Enable Two Factor Email by default
|
||||
// force email two factor authentication
|
||||
add_filter('two_factor_enabled_providers_for_user', function ($providers)
|
||||
{
|
||||
if (! in_array('Two_Factor_Email', $providers))
|
||||
|
||||
Reference in New Issue
Block a user