WordPress.org

Make WordPress Core

Opened 20 months ago

Last modified 5 weeks ago

#35774 assigned enhancement

WordPress admin <title> structure

Reported by: ramiy Owned by: SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: administration Cc:

Description

Currently the admin titles has a wired structure. Few examples:

  • Dashboard ‹ Site Name — WordPress
  • Posts ‹ Site Name — WordPress
  • Writing Settings ‹ Site Name — WordPress

Same structure applies for plugin setting pages.

  • page-title &lsaquo; site-name &#8212; WordPress

The problem with this structure:

  • Why are we using &lsaquo; character? why not &rsaquo;.
  • We should add RTL support for the separator.
  • The Site Name and the WordPress, they look like bad combination.

Few suggestions:

  • We need to replace the &lsaquo; character with &rsaquo;.
  • We can add RTL support. See ticket #35737 and changeset [36487].
  • And we need to think about the combination of WordPress and Site Name.

Attachments (3)

35774-option1.patch (553 bytes) - added by ramiy 20 months ago.
Replace &lsaquo; with &#8212; and remove &#8212; WordPress
35774-option2.patch (926 bytes) - added by ramiy 20 months ago.
New title structure page-title separator site-name
35774-option3.patch (951 bytes) - added by ramiy 20 months ago.
separator with RTL support - $separator = is_rtl() ? '&rsaquo;' : '&lsaquo;';

Download all attachments as: .zip

Change History (28)

@ramiy
20 months ago

Replace &lsaquo; with &#8212; and remove &#8212; WordPress

@ramiy
20 months ago

New title structure page-title separator site-name

#1 @ramiy
20 months ago

  • Keywords has-patch added

In the second option, I use a similar structure to the login pages (ticket #35737), without the WordPress suffix. Only when no site-title defined (multisite), we use WordPress.

Old structure:

if ( $admin_title == $title )
	$admin_title = sprintf( __( '%1$s &#8212; WordPress' ), $title );
else
	$admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );

New structure:

if ( $admin_title == $title )
	$admin_title = sprintf( '%1$s %2$s %3$s', $title, $separator, __( 'WordPress' ) );
else
	$admin_title = sprintf( '%1$s %2$s %3$s', $title, $separator, $admin_title );

Hoping to create more consistent <title> structure across different wordpress pages.

@ramiy
20 months ago

separator with RTL support - $separator = is_rtl() ? '&rsaquo;' : '&lsaquo;';

This ticket was mentioned in Slack in #core by chriscct7. View the logs.


20 months ago

#3 @chriscct7
20 months ago

  • Milestone changed from Awaiting Review to 4.5
  • Owner set to chriscct7
  • Status changed from new to reviewing

#4 @SergeyBiryukov
20 months ago

I think &lsaquo; (in Dashboard ‹ Site Name) implies hierarchy, Dashboard › Site Name would seem confusing to me.

That said, we could probably use &mdash; instead and simplify it to Dashboard — Site Name (without the WordPress suffix), like in #meta1105.

35774-option1.patch looks good to me, but we should also add translator comments for placeholders.

#5 @ramiy
20 months ago

@SergeyBiryukov, I was talking to @adamsilverstein on slack,

Currently, the admin 'separator' char is hardcoded. The attached patch (35774-option2.patch and 35774-option3.patch) moves the 'separator' into a string.

Ticket #35737 moved the 'separator' into a string for Login Pages. This ticket will do the same for Admin Pages.

The next step is to create a filter for the 'separator'. The filter will be used in admin page and login pages for unified title structure.

#6 @ramiy
20 months ago

And I remember what I wrote on the meta ticket. Direction-free separator like &mdash; is much better than &rsaquo;. But I didn't want to rock the boat too much.

#7 @chriscct7
19 months ago

  • Status changed from reviewing to accepted

#8 @chriscct7
19 months ago

  • Owner chriscct7 deleted
  • Status changed from accepted to assigned

This ticket was mentioned in Slack in #core by ramiy. View the logs.


19 months ago

#10 @ocean90
19 months ago

  • Milestone changed from 4.5 to Future Release
  • Type changed from defect (bug) to enhancement

This ticket was mentioned in Slack in #core by ramiy. View the logs.


15 months ago

#12 @ramiy
13 months ago

@SergeyBiryukov @chriscct7 @ocean90 Maybe in 4.7?

#13 @SergeyBiryukov
13 months ago

  • Milestone changed from Future Release to 4.7

#14 follow-up: @jorbin
13 months ago

  • Keywords needs-patch added; has-patch removed

The patch needs translator comments.

#15 in reply to: ↑ 14 @ramiy
13 months ago

  • Keywords has-patch added; needs-patch removed

Replying to jorbin:

The patch needs translator comments.

We don't need translator-comments. The patch removes translatable-strings. The placeholders '%1$s %2$s %3$s' are part of the sprintf() function, they are not a translatable strings.

#16 @jorbin
12 months ago

@SergeyBiryukov You milestoned this, still want it to go in for this cycle?

This ticket was mentioned in Slack in #core by chriscct7. View the logs.


12 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


11 months ago

This ticket was mentioned in Slack in #core by jorbin. View the logs.


11 months ago

#20 @jorbin
11 months ago

  • Owner set to SergeyBiryukov

#21 @ocean90
11 months ago

IMO the current title is fine as is. It's fully translatable which means placeholders can be set as needed.

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


11 months ago

This ticket was mentioned in Slack in #core by jeffpaul. View the logs.


11 months ago

#24 @ocean90
11 months ago

  • Milestone changed from 4.7 to Future Release

This ticket was mentioned in Slack in #core-i18n by ramiy. View the logs.


5 weeks ago

Note: See TracTickets for help on using tickets.