[wp-trac] [WordPress Trac] #31521: wp_title if archive of year w/o permalink fires php notice in locale.php

WordPress Trac noreply at wordpress.org
Fri Sep 1 13:34:39 UTC 2017


#31521: wp_title if archive of year w/o permalink fires php notice in locale.php
--------------------------------------+-----------------------------
 Reporter:  michelwppi                |       Owner:
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  General                   |     Version:  4.1.1
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:  template
--------------------------------------+-----------------------------
Changes (by herregroen):

 * keywords:  needs-patch good-first-bug => good-first-bug has-patch


Comment:

 Added a patch that cleans up the date parsing by reusing the same WP_Query
 globals `is_time`, `is_day` and `is_month` to do the checks.

 Used an array to `implode` to avoid a huge assignment to `$title`.

 More changes but I think overall more readable code.

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


More information about the wp-trac mailing list