Skip to content

Conversation

@masteradhoc
Copy link
Contributor

Fixes #752

What?

Fix missing text domain arguments in translation function calls on the login header and footer, resolving WordPress Coding Standards (PHPCS) WordPress.WP.I18n.MissingArgDomain errors.

Why?

The affected files contained calls to __() and _x() without explicitly passing the text domain. While this may work at runtime, it violates WordPress i18n best practices and causes PHPCS errors in CI. Explicitly passing the two-factor text domain ensures correct translation loading and compliance with coding standards.

How?

Added the two-factor text domain to all affected internationalization function calls.

Updated the calls to include the required third $domain parameter.

No functional behavior was changed beyond improved translation correctness and standards compliance.

Testing Instructions

  1. Install Plugin Check Plugin
  2. Choose Two Factor, Categories = "General" and Types = "Error" & "Warning"
  3. see results
  4. apply fix
  5. see results

Changelog Entry

Fixed – Added missing text domain arguments to i18n function calls to comply with WordPress coding standards.

@jeffpaul jeffpaul requested a review from kasparsd January 27, 2026 00:49
@jeffpaul jeffpaul added this to the 0.15.0 milestone Jan 27, 2026
</button>

<em><?php esc_html_e( 'This invalidates all currently stored codes.' ); ?></em>
<em><?php esc_html_e( 'This invalidates all currently stored codes.', 'two-factor' ); ?></em>
Copy link
Collaborator

@kasparsd kasparsd Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep this one and remove the other changes since those are clones of WP core files due to bundling of required functions for the two-factor flow to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plugin Check: Missing $domain parameter

3 participants