Prvi commit: WordPress tema Europe Wonder s CI/CD konfiguracijo
This commit is contained in:
commit
135cc3b4c6
438 files changed
+56454
No files matched your search
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Custom SMTP Configuration for Europe Wonder
|
||||
*/
|
||||
|
||||
// Vklopi WordPress beleženje za razhroščevanje
|
||||
if (!defined('WP_DEBUG')) {
|
||||
define('WP_DEBUG', true);
|
||||
}
|
||||
if (!defined('WP_DEBUG_LOG')) {
|
||||
define('WP_DEBUG_LOG', true);
|
||||
}
|
||||
if (!defined('WP_DEBUG_DISPLAY')) {
|
||||
define('WP_DEBUG_DISPLAY', false);
|
||||
}
|
||||
|
||||
// Preveri, če WP Mail SMTP vtičnik še ni definiral teh konstant
|
||||
if (!defined('WPMS_ON') && function_exists('wp_mail')) {
|
||||
// Glavni SMTP konfiguracijski parametri
|
||||
add_action('phpmailer_init', 'custom_smtp_setup', 10);
|
||||
function custom_smtp_setup($phpmailer) {
|
||||
// Nastavi SMTP
|
||||
$phpmailer->isSMTP();
|
||||
|
||||
// Izdajatelj (from naslov)
|
||||
$phpmailer->From = "noreply@europewonder.com";
|
||||
$phpmailer->FromName = "Europe Wonder";
|
||||
|
||||
// Obvezne nastavitve
|
||||
$phpmailer->Host = 'mail.europewonder.com';
|
||||
$phpmailer->SMTPAuth = true;
|
||||
$phpmailer->Port = 465;
|
||||
$phpmailer->Username = 'noreply@europewonder.com';
|
||||
$phpmailer->Password = '#Napoti112358';
|
||||
|
||||
// Varnostne nastavitve
|
||||
$phpmailer->SMTPSecure = 'ssl';
|
||||
|
||||
// Dodatne nastavitve
|
||||
$phpmailer->SMTPAutoTLS = false;
|
||||
|
||||
// Razhroščevanje (nastavi true za razvoj, false za produkcijo)
|
||||
$phpmailer->SMTPDebug = 0;
|
||||
|
||||
// Beleženje
|
||||
error_log('SMTP setup complete with host: ' . $phpmailer->Host . ' and username: ' . $phpmailer->Username);
|
||||
}
|
||||
|
||||
// Definiramo konstante, ki preprečujejo dvojno konfiguracijo
|
||||
define('WPMS_ON', true);
|
||||
|
||||
// Beleženje, da je konfiguracija vključena
|
||||
error_log('Custom SMTP configuration activated');
|
||||
}
|
||||
|
||||
// Popravek za "From" naslov, ki ga včasih prepisuje WordPress
|
||||
add_filter('wp_mail_from', 'custom_mail_from');
|
||||
function custom_mail_from($email) {
|
||||
return 'noreply@europewonder.com';
|
||||
}
|
||||
|
||||
// Popravek za "From" ime, ki ga včasih prepisuje WordPress
|
||||
add_filter('wp_mail_from_name', 'custom_mail_from_name');
|
||||
function custom_mail_from_name($name) {
|
||||
return 'Europe Wonder';
|
||||
}
|
||||
Reference in new issue
Block a user