Skip to content

Conversation

@geminorum
Copy link

Prefix/suffix for new site slug input does not appear correctly on RTL

Trac ticket: https://core.trac.wordpress.org/ticket/64381


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props geminorum, westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@westonruter
Copy link
Member

I noticed that <span class="code"> was being printed twice, in different ways. In 0a05fed I've refactored to extract into a wrapper element. I've also tidied up the HTML and PHP to make it overall easier to read and to be more consistent. Please review.

@westonruter westonruter requested a review from JJJ December 9, 2025 19:22
@westonruter westonruter changed the title fixes trac#64381 Fix: Prefix/suffix for new site slug input does not appear correctly on RTL Dec 9, 2025
@westonruter
Copy link
Member

westonruter commented Dec 9, 2025

Review from Gemini:

The changes in src/wp-admin/network/site-new.php are a solid improvement for consistency, security, and presentation.

Review Findings:

  1. Security (esc_html): The addition of esc_html() around the echoed domain parts (lines 222 and 224) is a great security hardening measure (Output Escaping).
  2. Consistency: Wrapping both the subdomain and subdirectory layouts in a unified <span class="code"> container improves structural consistency.
  3. Styling & RTL: Switching from regular-text ltr to regular-text code is appropriate. The .code class in common.css includes direction: ltr;, so the LTR requirement for domain inputs is preserved while adding the correct monospace styling.
  4. Whitespace Control: The use of <!-- --> comments to eliminate whitespace between the input and code elements (which are likely inline-block) is a valid technique here to ensure they sit flush against each other.
  5. Control Structures: The use of if ( ... ) : ... else : ... endif; is consistent with other HTML/template sections within this specific file (e.g., the language dropdown logic later in the file).
  6. Translation: Moving the _e() call inside the <p> tag is cleaner than concatenating HTML strings in PHP.

Nit-picks:

  • @since Tag: As is standard for existing files, there is no @since tag for this visual modification. This is generally acceptable for markup fixes unless a specific project standard requires it for all UI changes.
  • Aria: The aria-describedby attribute correctly points to the description, maintaining accessibility.

Conclusion:

The changes look good and follow WordPress core standards. The logic is sound, and the styling update is robust.

Verdict: Approved.

pento pushed a commit that referenced this pull request Dec 9, 2025
…order when RTL locale is active.

Developed in #10612

Props geminorum, johnjamesjacoby, westonruter.
See #49949.
Fixes #64381.


git-svn-id: https://develop.svn.wordpress.org/trunk@61365 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions
Copy link

github-actions bot commented Dec 9, 2025

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 61365
GitHub commit: 33a1a52

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions bot closed this Dec 9, 2025
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Dec 9, 2025
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.

3 participants