Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#29831 closed enhancement (wontfix)

Introduce is_blog_index() and is_homepage() to replace/deprecate is_home() and is_front_page()

Reported by: ericlewis's profile ericlewis Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Query Keywords: dev-feedback needs-patch
Focuses: template Cc:

Description

is_home() and is_front_page() are both counter-intuitive. Let's use nomenclature that's more common to the web.

Related (for blog index naming): #19902

Change History (10)

#1 @ericlewis
10 years ago

  • Keywords 2nd-opinion dev-feedback added

#2 @ericlewis
10 years ago

  • Summary changed from Deprecate is_home() and is_front_page() in lieu of is_blog_index() and is_homepage() to Introduce is_blog_index() and is_homepage() to replace/deprecate is_home() and is_front_page()

#3 follow-up: @paulwilde
10 years ago

The label for the homepage setting in options-reading.php is referenced as "Front page", so deprecating is_front_page() seems inconsistent with the admin.

These labels would also need to be changed to be consistent with these changes.

Last edited 10 years ago by paulwilde (previous) (diff)

#5 follow-up: @paulwilde
10 years ago

Worth also noting that I'm not a fan of is_blog_index() as it assumes the website is a blog.

is_website_index() or is_site_index() would be less assuming.

Last edited 10 years ago by paulwilde (previous) (diff)

#6 in reply to: ↑ 5 @ericlewis
10 years ago

Replying to paulwilde:

Worth also noting that I'm not a fan of is_blog_index() as it assumes the website is a blog.

is_website_index() or is_site_index() would be less assuming.

is_blog_index() would be a boolean whether you're on the blog posts archive page.

#7 in reply to: ↑ 3 @ericlewis
10 years ago

Replying to paulwilde:

The label for the homepage setting in options-reading.php is referenced as "Front page", so deprecating is_front_page() seems inconsistent with the admin.

These labels would also need to be changed to be consistent with these changes.

Totally. We should refer to this as "homepage" - front page is a WordPress-ism (or perhaps Microsoft-ism), game to remove it from our lexicon completely.

#8 @paulwilde
10 years ago

Another one that I just thought about as well, actually. The front-page.php template override would also need to accept homepage.php.

#9 @chriscct7
9 years ago

  • Keywords needs-patch added; 2nd-opinion removed

I personally see the change of name as minimally beneficial, but on the other hand, those two functions are referenced all over the place in plugins. However, the label changes could be interesting. Instead of deprecating the 2 functions we could have them wrapper without deprecation if the label changes were merged.

#10 @ericlewis
9 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

There is little benefit here and renaming functions for the sake of renaming functions is not popular. Closing this out.

Note: See TracTickets for help on using tickets.