Skip to content

Conversation

@DAnn2012
Copy link

@DAnn2012 DAnn2012 commented Sep 27, 2025

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Security fix
  • Improvement
  • New Feature
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Text changes
  • Other... Please describe:

Description

Fixed Function in class-setup-wizard.php

Refactored localization logic for step indicator

This update improves the way the step indicator string is localized. Previously, the code used esc_html_e() with a sprintf() wrapper, which could lead to issues with proper translation of the entire sentence structure. The new implementation uses printf() with esc_html__(), allowing translators to work with the full sentence 'Step %s of 4' rather than piecing together fragments.

Before:

esc_html_e( sprintf( '%s %d of 4', 'Step', $active_number ), 'directorist' );

After:

printf( esc_html__( 'Step %s of 4', 'directorist' ), esc_html( $active_number ) );

This change ensures better internationalization support and cleaner separation of translation and output logic.

Checklist

@DAnn2012 DAnn2012 requested a review from vairafiq as a code owner September 27, 2025 21:22
@Armanul46 Armanul46 changed the base branch from trunk to development September 28, 2025 08:53
@Armanul46
Copy link
Collaborator

FILE: includes/classes/class-setup-wizard.php

FOUND 1 ERROR AFFECTING 1 LINE

1034 | ERROR | All output should be run through an escaping function (see the
| | Security sections in the WordPress Developer Handbooks), found
| | '$active_number'.
| | (WordPress.Security.EscapeOutput.OutputNotEscaped)

@Armanul46 Armanul46 added this to the 8.5 milestone Sep 29, 2025
@Armanul46
Copy link
Collaborator

Please describe the issue in this way.
https://prnt.sc/uIQlqgYpVldd

@Armanul46 Armanul46 modified the milestones: 8.5, 8.5.1 Oct 19, 2025
@Armanul46 Armanul46 removed this from the 8.5.1 milestone Nov 10, 2025
@DAnn2012
Copy link
Author

Hello @Armanul46

When you can, could you take a look at this PR of mine?

Thanks.

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.

2 participants