[wp-trac] [WordPress Trac] #38545: Add span element to get_the_archive_title()

WordPress Trac noreply at wordpress.org
Fri Mar 15 19:32:43 UTC 2019


#38545: Add span element to get_the_archive_title()
-----------------------------------+------------------------
 Reporter:  Kaira                  |       Owner:  desrosj
     Type:  enhancement            |      Status:  reviewing
 Priority:  normal                 |   Milestone:  5.2
Component:  Taxonomy               |     Version:  4.6.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------
Changes (by desrosj):

 * keywords:  has-patch => has-patch 2nd-opinion


Comment:

 In [attachment:"38545.2.diff"]:

 - Update `since` annotations to `5.2.0`.
 - Instead of turning `$span_class` into `class="class-name"` before
 passing to the filter, add the attribute definition when building
 `$title`. This way someone using the filter does not need to parse out the
 class if they want to change it.

 Before this is committed, I'd also like to get confirmation that the
 string changes are not problematic. For an example of the changes in the
 current patch, look at the tag title:

 Before:
 {{{
 /* translators: Tag archive title. %s: Tag name */
 $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
 }}}
 After:

 {{{
 /* translators: Tag archive title. */
 $type = __( 'Tag:' );
 }}}

 I am concerned that removing that placeholder and contextual information
 from the translation comment will make these strings more difficult to
 translate.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/38545#comment:67>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list