Plugin Directory

Changeset 3103431


Ignore:
Timestamp:
06/17/2024 08:36:50 AM (22 months ago)
Author:
comzeradd
Message:

Add option for translating admin panel message

Location:
config-email-smtp
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • config-email-smtp/trunk/config-email-smtp.php

    r2962181 r3103431  
    66* Plugin URI:  https://codeberg.org/comzeradd/config-email-smtp
    77* Description: Sets email SMTP configuration out of wp-config variables.
    8 * Version:     0.1.0
     8* Version:     0.2.0
    99* Author:      Nikos Roussos
    1010* Author URI:  https://roussos.cc
     
    2525function display_config_email_smtp_page(): void
    2626{
    27     $message = '<h1>Config Email SMTP</h1>
    28                 <div>A simple Wordpress plugin to configure email SMTP preferences using wp-config variables.<br>
    29                 All you have to do is copy-paste the lines below at your <code>wp-config.php</code> and adjust
    30                 the variables with the proper values for the SMTP server you want to use.</div>
    31                 <div class="card">
    32                 /* SMTP configuration */<br>
    33                 define(\'SMTP_HOST\', \'smtp.example.com\'); // Mail server hostname<br>
    34                 define(\'SMTP_PORT\', 25); // SMTP port number (25, 465 or 587)<br>
    35                 define(\'SMTP_SECURE\', \'ssl\'); // Encryption system to use (ssl or tls)<br>
    36                 define(\'SMTP_USERNAME\', \'myusername\'); // SMTP Authentication Username<br>
    37                 define(\'SMTP_PASSWORD\', \'mypassword\'); // SMTP Authentication Password<br>
    38                 define(\'SMTP_FROMMAIL\', \'noreply@example.com\'); // From email address<br>
    39                 define(\'SMTP_FROMNAME\', \'WordPress\'); // From email name<br>
    40                 </div>';
     27    $title = '<h1>Config Email SMTP</h1>';
     28
     29    $message = __(
     30        'A simple Wordpress plugin to configure email SMTP preferences using wp-config variables.<br>
     31        All you have to do is copy-paste the lines below at your <code>wp-config.php</code> and adjust
     32        the variables with the proper values for the SMTP server you want to use.',
     33        'config-email-smtp'
     34    );
     35
     36    $help_text = '<div class="card">
     37        /* SMTP configuration */<br>
     38        define(\'SMTP_HOST\', \'smtp.example.com\'); // Mail server hostname<br>
     39        define(\'SMTP_PORT\', 25); // SMTP port number (25, 465 or 587)<br>
     40        define(\'SMTP_SECURE\', \'ssl\'); // Encryption system to use (ssl or tls)<br>
     41        define(\'SMTP_USERNAME\', \'myusername\'); // SMTP Authentication Username<br>
     42        define(\'SMTP_PASSWORD\', \'mypassword\'); // SMTP Authentication Password<br>
     43        define(\'SMTP_FROMMAIL\', \'noreply@example.com\'); // From email address<br>
     44        define(\'SMTP_FROMNAME\', \'WordPress\'); // From email name<br>
     45        </div>';
     46
    4147    $allowed_html = array(
    4248        'h1' => array(),
     
    4652        'br' => array()
    4753    );
    48     echo wp_kses($message, $allowed_html);
     54
     55    echo wp_kses($title . '<div>' . $message . '</div>' . $help_text, $allowed_html);
    4956}
    5057
  • config-email-smtp/trunk/readme.txt

    r2962187 r3103431  
    44Tags: email, smtp
    55Requires at least: 5.0
    6 Tested up to: 6.3
    7 Stable tag: 0.1.0
     6Tested up to: 6.5
     7Stable tag: 0.2.0
    88License: GPLv3 or later
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
Note: See TracChangeset for help on using the changeset viewer.