[wp-trac] [WordPress Trac] #45984: Twenty Nineteen: Improve code organisation in template-functions.php

WordPress Trac noreply at wordpress.org
Sat Feb 8 12:59:57 UTC 2020


#45984: Twenty Nineteen: Improve code organisation in template-functions.php
-------------------------------------------------+-------------------------
 Reporter:  allancole                            |       Owner:
                                                 |  SergeyBiryukov
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  5.4
Component:  Bundled Theme                        |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-refresh good-first-  |     Focuses:
  bug                                            |
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47214" 47214]:
 {{{
 #!CommitTicketReference repository="" revision="47214"
 Twenty Nineteen: Improve code organization in `template-functions.php` by
 moving helper functions into their own file.

 These functions are moved to `inc/helper-functions.php`:

 * `twentynineteen_can_show_post_thumbnail()`
 * `twentynineteen_image_filters_enabled()`
 * `twentynineteen_get_avatar_size()`
 * `twentynineteen_is_comment_by_post_author()`
 * `twentynineteen_get_discussion_data()`
 * `twentynineteen_hsl_hex()`

 Additionally, `twentynineteen_add_dropdown_icons()` is moved to `inc/icon-
 functions.php` to join `twentynineteen_nav_menu_social_icons()`.

 Props akshayar, allancole, grapplerulrich.
 Fixes #45984.
 }}}

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


More information about the wp-trac mailing list