Skip to content

Commit

Permalink
fix for GlotPress
Browse files Browse the repository at this point in the history
  • Loading branch information
javiercasares committed Nov 2, 2024
1 parent ec11fa4 commit fb1f053
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
6 changes: 3 additions & 3 deletions languages/wp-mail-replyto.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
msgid ""
msgstr ""
"Project-Id-Version: Reply-To for WP_Mail\n"
"POT-Creation-Date: 2024-10-31 08:58+0100\n"
"POT-Creation-Date: 2024-11-02 10:48+0100\n"
"PO-Revision-Date: 2024-10-31 08:58+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -16,8 +16,8 @@ msgstr ""
"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"
"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"

Expand Down
10 changes: 8 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: javiercasares
Tags: email, reply-to
Requires at least: 4.1
Tested up to: 6.7
Stable tag: 1.0.1
Stable tag: 1.0.2
Requires PHP: 5.6
Version: 1.0.1
Version: 1.0.2
License: GPL-2.0-or-later
License URI: https://spdx.org/licenses/GPL-2.0-or-later.html

Expand All @@ -28,6 +28,12 @@ Extract the contents of the ZIP and upload the contents to the `/wp-content/plug

== Changelog ==

= [1.0.2] - 2024-11-02 =

**Fixed**

* Preparation for GlotPress.

= [1.0.1] - 2024-10-31 =

**Added**
Expand Down
32 changes: 16 additions & 16 deletions replyto.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* 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.1
* Version: 1.0.2
* 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
* Text Domain: replyto
* Domain Path: /languages
*
* @package wp-mail-replyto
* @package replyto
*
* @version 1.0.0
*/
Expand All @@ -33,7 +33,7 @@ function wp_mail_replyto( $args ) {
if ( ! empty( $reply_to_email ) ) {
$new_reply_to = sprintf(
/* translators: %s: email address */
__( 'Reply-To: <%s>', 'wp-mail-replyto' ),
__( 'Reply-To: <%s>', 'replyto' ),
sanitize_email( $reply_to_email )
);
}
Expand Down Expand Up @@ -87,10 +87,10 @@ function ( $header ) {
*/
function wp_mail_replyto_add_settings_page() {
add_options_page(
esc_html__( 'WP Mail Reply-To Settings', 'wp-mail-replyto' ),
esc_html__( 'Reply-To', 'wp-mail-replyto' ),
esc_html__( 'WP Mail Reply-To Settings', 'replyto' ),
esc_html__( 'Reply-To', 'replyto' ),
'manage_options',
'wp-mail-replyto',
'replyto',
'wp_mail_replyto_render_settings_page'
);
}
Expand All @@ -112,16 +112,16 @@ function wp_mail_replyto_register_settings() {

add_settings_section(
'wp_mail_replyto_main_section',
esc_html__( 'Reply-To Configuration', 'wp-mail-replyto' ),
esc_html__( 'Reply-To Configuration', 'replyto' ),
'wp_mail_replyto_main_section_callback',
'wp-mail-replyto'
'replyto'
);

add_settings_field(
'wp_mail_replyto_email_field',
esc_html__( 'Reply-To Email Address', 'wp-mail-replyto' ),
esc_html__( 'Reply-To Email Address', 'replyto' ),
'wp_mail_replyto_email_field_callback',
'wp-mail-replyto',
'replyto',
'wp_mail_replyto_main_section'
);
}
Expand All @@ -131,7 +131,7 @@ function wp_mail_replyto_register_settings() {
* Callback for the settings section description.
*/
function wp_mail_replyto_main_section_callback() {
echo '<p>' . esc_html__( 'Set the email address to be used in the "Reply-To" header of outgoing emails.', 'wp-mail-replyto' ) . '</p>';
echo '<p>' . esc_html__( 'Set the email address to be used in the "Reply-To" header of outgoing emails.', 'replyto' ) . '</p>';
}

/**
Expand All @@ -140,7 +140,7 @@ function wp_mail_replyto_main_section_callback() {
function wp_mail_replyto_email_field_callback() {
$email = get_option( 'wp_mail_replyto_email', '' );
echo '<input type="email" id="wp_mail_replyto_email" name="wp_mail_replyto_email" value="' . esc_attr( $email ) . '" size="50" />';
echo '<p class="description">' . esc_html__( 'Enter the email address to be used as "Reply-To".', 'wp-mail-replyto' ) . '</p>';
echo '<p class="description">' . esc_html__( 'Enter the email address to be used as "Reply-To".', 'replyto' ) . '</p>';
}

/**
Expand All @@ -159,8 +159,8 @@ function wp_mail_replyto_render_settings_page() {
<?php
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' ) );
do_settings_sections( 'replyto' );
submit_button( esc_html__( 'Save Settings', 'replyto' ) );
?>
</form>
</div>
Expand All @@ -171,6 +171,6 @@ function wp_mail_replyto_render_settings_page() {
* Load plugin textdomain for translations.
*/
function wp_mail_replyto_load_textdomain() {
load_plugin_textdomain( 'wp-mail-replyto', false, basename( __DIR__ ) . '/languages' );
load_plugin_textdomain( 'replyto', false, basename( __DIR__ ) . '/languages' );
}
add_action( 'plugins_loaded', 'wp_mail_replyto_load_textdomain' );

0 comments on commit fb1f053

Please sign in to comment.