[wp-trac] [WordPress Trac] #43515: Twenty Seventeen: Two different function, which return same result

WordPress Trac noreply at wordpress.org
Tue May 30 00:23:06 UTC 2023


#43515: Twenty Seventeen: Two different function, which return same result
---------------------------+---------------------
 Reporter:  mukesh27       |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  low            |   Milestone:  6.3
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  has-patch      |     Focuses:
---------------------------+---------------------

Comment (by sabernhardt):

 I think both functions would remain equally valid, but with one canonical.

 To consider switching it the other way, I [https://github.com/sabernhardt
 /wordpress-develop/pull/23 drafted a PR] that edits multiple files to use
 the `twentyseventeen_is_static_front_page` function throughout the theme
 (and it includes two unrelated documentation changes that probably belong
 on #57840 instead). If that direction might be preferable, I could move it
 from my fork to the main repo for review.

 Code outside Twenty Seventeen:
 - GitHub code search gives
 [https://github.com/search?type=code&auto_enroll=true&q=twentyseventeen_is_frontpage
 many more results with twentyseventeen_is_frontpage] than the
 [https://github.com/search?type=code&auto_enroll=true&q=twentyseventeen_is_static_front_page
 results with twentyseventeen_is_static_front_page], which suggests
 [attachment:"43515.1.patch"] would be better.
 - The directory search is much closer. The `twentyseventeen_is_frontpage`
 function is only operational in
 [https://wpdirectory.net/search/01H1CTGCXPBZ96NCXK1VTYD765 two of the four
 plugins] in the results list, and a rather
 [https://wpdirectory.net/search/01H1CTGZKGTH1V7ZJPYMXEYM9X popular plugin]
 uses `twentyseventeen_is_static_front_page`.
 [https://wpdirectory.net/search/01H1CTK440F7EJVXD5EV8BE3ZS Three child
 themes] use `twentyseventeen_is_frontpage`, but the
 [https://wpdirectory.net/search/01H1CTJC6Y306MBNW9QVBKMCBW other
 function's results only include Twenty Seventeen].

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


More information about the wp-trac mailing list