This commit is contained in:
Javier Casares 2026-06-05 10:58:27 +00:00
commit cdaca54e7b
3 changed files with 99 additions and 5 deletions

View file

@ -0,0 +1,75 @@
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Reply-To for WP_Mail\n"
"POT-Creation-Date: 2024-10-31 08:58+0100\n"
"PO-Revision-Date: 2024-10-31 08:58+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"X-Generator: Poedit 3.5\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: replyto.php\n"
"X-Poedit-SourceCharset: UTF-8\n"
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
"X-Poedit-SearchPath-0: .\n"
"X-Poedit-SearchPathExcluded-0: *.min.js\n"
#. translators: %s: email address
#: replyto.php:36
#, php-format
msgid "Reply-To: <%s>"
msgstr ""
#: replyto.php:90
msgid "WP Mail Reply-To Settings"
msgstr ""
#: replyto.php:91
msgid "Reply-To"
msgstr ""
#: replyto.php:115
msgid "Reply-To Configuration"
msgstr ""
#: replyto.php:122
msgid "Reply-To Email Address"
msgstr ""
#: replyto.php:134
msgid ""
"Set the email address to be used in the \"Reply-To\" header of outgoing "
"emails."
msgstr ""
#: replyto.php:143
msgid "Enter the email address to be used as \"Reply-To\"."
msgstr ""
#: replyto.php:163
msgid "Save Settings"
msgstr ""
#. Plugin Name of the plugin/theme
msgid "Reply-To for WP_Mail"
msgstr ""
#. Description of the plugin/theme
msgid ""
"Configure your \"Reply-To:\" for WP_Mail with validation and admin settings."
msgstr ""
#. Author of the plugin/theme
msgid "Javier Casares"
msgstr ""
#. Author URI of the plugin/theme
msgid "https://www.javiercasares.com/"
msgstr ""

View file

@ -3,9 +3,9 @@ Contributors: javiercasares
Tags: email, reply-to
Requires at least: 4.1
Tested up to: 6.7
Stable tag: 1.0.0
Stable tag: 1.0.1
Requires PHP: 5.6
Version: 1.0.0
Version: 1.0.1
License: GPL-2.0-or-later
License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
@ -28,6 +28,12 @@ Extract the contents of the ZIP and upload the contents to the `/wp-content/plug
== Changelog ==
= [1.0.1] - 2024-10-31 =
**Added**
* Translation ready.
= [1.0.0] - 2024-10-22 =
**Added**

View file

@ -4,12 +4,13 @@
* Description: Configure your "Reply-To:" for WP_Mail with validation and admin settings.
* Requires at least: 4.1
* Requires PHP: 5.6
* Version: 1.0.0
* Version: 1.0.1
* Author: Javier Casares
* Author URI: https://www.javiercasares.com/
* License: GPL-2.0-or-later
* License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
* Text Domain: wp-mail-replyto
* Domain Path: /languages
*
* @package wp-mail-replyto
*
@ -30,7 +31,11 @@ function wp_mail_replyto( $args ) {
// Define the new "Reply-To" if configured.
if ( ! empty( $reply_to_email ) ) {
$new_reply_to = 'Reply-To: <' . sanitize_email( $reply_to_email ) . '>';
$new_reply_to = sprintf(
/* translators: %s: email address */
__( 'Reply-To: <%s>', 'wp-mail-replyto' ),
sanitize_email( $reply_to_email )
);
}
// Initialize variables for "From" and existing "Reply-To".
@ -152,7 +157,7 @@ function wp_mail_replyto_render_settings_page() {
<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>
<form action="options.php" method="post">
<?php
wp_nonce_field();
wp_nonce_field( 'update-options' );
settings_fields( 'wp_mail_replyto_settings_group' );
do_settings_sections( 'wp-mail-replyto' );
submit_button( esc_html__( 'Save Settings', 'wp-mail-replyto' ) );
@ -161,3 +166,11 @@ function wp_mail_replyto_render_settings_page() {
</div>
<?php
}
/**
* Load plugin textdomain for translations.
*/
function wp_mail_replyto_load_textdomain() {
load_plugin_textdomain( 'wp-mail-replyto', false, basename( __DIR__ ) . '/languages' );
}
add_action( 'plugins_loaded', 'wp_mail_replyto_load_textdomain' );