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: |
|
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)
#2
@
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()
#5
follow-up:
↓ 6
@
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.
#6
in reply to:
↑ 5
@
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
@
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
@
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
@
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.
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.