Opened 5 days ago
Closed 4 days ago
#64381 closed enhancement (fixed)
Prefix/suffix for new site slug input does not appear correctly on RTL
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | 5.5 |
| Component: | I18N | Keywords: | has-patch has-screenshots |
| Focuses: | rtl, administration, multisite | Cc: |
Description
On network Add Site page, the input for site slug is reversed when page is on right-to-left.
Attachments (5)
Change History (15)
This ticket was mentioned in PR #10612 on WordPress/wordpress-develop by @geminorum.
5 days ago
#1
- Keywords has-patch added
#2
follow-up:
↓ 4
@
5 days ago
- Milestone changed from Awaiting Review to 7.0
- Version set to 5.5
Supposedly this had been fixed in #49949, but it regressed since then?
#3
follow-up:
↓ 5
@
5 days ago
This looks right to me.
Domains and paths are always left to right, right? 😅
#4
in reply to:
↑ 2
@
5 days ago
Replying to westonruter:
Supposedly this had been fixed in #49949, but it regressed since then?
#49949 addressed the direction within the input, not the formation of prefix/suffix + input.
In the patch I used the same approach from permalink_structure input on Permalink Settings page.
#5
in reply to:
↑ 3
@
5 days ago
Replying to johnjamesjacoby:
Domains and paths are always left to right, right? 😅
Right; domain, path and code are always in Left-to-Right mode.
#6
@
4 days ago
- Keywords has-screenshots added
@geminorum Can you share screenshots of the issue without the patch applied?
@westonruter commented on PR #10612:
4 days ago
#8
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 commented on PR #10612:
4 days ago
#9
Review from Gemini:
The changes in src/wp-admin/network/site-new.php are a solid improvement for consistency, security, and presentation.
Review Findings:
- Security (
esc_html): The addition ofesc_html()around the echoed domain parts (lines 222 and 224) is a great security hardening measure (Output Escaping). - Consistency: Wrapping both the subdomain and subdirectory layouts in a unified
<span class="code">container improves structural consistency. - Styling & RTL: Switching from
regular-text ltrtoregular-text codeis appropriate. The.codeclass incommon.cssincludesdirection: ltr;, so the LTR requirement for domain inputs is preserved while adding the correct monospace styling. - Whitespace Control: The use of
comments to eliminate whitespace between theinputandcodeelements (which are likelyinline-block) is a valid technique here to ensure they sit flush against each other. - 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). - 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
@sincetag 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-describedbyattribute 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.
Prefix/suffix for new site slug input does not appear correctly on RTL
Trac ticket: https://core.trac.wordpress.org/ticket/64381