Make WordPress Core

Opened 9 years ago

Last modified 5 years ago

#35774 assigned enhancement

WordPress admin <title> structure

Reported by: ramiy's profile ramiy Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch 2nd-opinion
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 9 years ago.
Replace &lsaquo; with &#8212; and remove &#8212; WordPress
35774-option2.patch (926 bytes) - added by ramiy 9 years ago.
New title structure page-title separator site-name
35774-option3.patch (951 bytes) - added by ramiy 9 years ago.
separator with RTL support - $separator = is_rtl() ? '&rsaquo;' : '&lsaquo;';

Download all attachments as: .zip

Change History (32)

@ramiy
9 years ago

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

@ramiy
9 years ago

New title structure page-title separator site-name

#1 @ramiy
9 years 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
9 years ago

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

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


9 years ago

#3 @chriscct7
9 years ago

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

#4 @SergeyBiryukov
9 years 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
9 years 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
9 years 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
9 years ago

  • Status changed from reviewing to accepted

#8 @chriscct7
9 years ago

  • Owner chriscct7 deleted
  • Status changed from accepted to assigned

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


9 years ago

#10 @ocean90
9 years 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.


8 years ago

#12 @ramiy
8 years ago

@SergeyBiryukov @chriscct7 @ocean90 Maybe in 4.7?

#13 @SergeyBiryukov
8 years ago

  • Milestone changed from Future Release to 4.7

#14 follow-up: @jorbin
8 years ago

  • Keywords needs-patch added; has-patch removed

The patch needs translator comments.

#15 in reply to: ↑ 14 @ramiy
8 years 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
8 years 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.


8 years ago

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


8 years ago

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


8 years ago

#20 @jorbin
8 years ago

  • Owner set to SergeyBiryukov

#21 @ocean90
8 years 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.


8 years ago

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


8 years ago

#24 @ocean90
8 years ago

  • Milestone changed from 4.7 to Future Release

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


7 years ago

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


5 years ago

#27 @whyisjake
5 years ago

  • Milestone changed from Future Release to 5.2.3

I like the 35774-option2.patch that would use an emdash over needing to be concerned with RTL settings.

#28 @ocean90
5 years ago

  • Milestone changed from 5.2.3 to 5.3

Moving to next major milestone since it isn't a regression.

#29 @davidbaumwald
5 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from 5.3 to Future Release

This ticket still needs a decision on implementation and the patches need refreshing. With version 5.3 Beta 1 going out tomorrow, I'm moving this to Future Release.

Note: See TracTickets for help on using tickets.