[wp-trac] [WordPress Trac] #31711: is_front_page flag affected by frontpage ID and page Title strange conflict

WordPress Trac noreply at wordpress.org
Fri Mar 20 23:24:54 UTC 2015


#31711: is_front_page flag affected by frontpage ID and page Title strange conflict
--------------------------+------------------------------
 Reporter:  m_i_n         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by tyxla):

 * keywords:   => needs-patch


Comment:

 That's such an interesting bug.

 This is caused by the (expected) ambiguous behavior of the `is_page()`
 conditional tag, which is used within `is_front_page()`.

 As the documentation states, `is_page()` accepts: `Page ID, title, slug,
 path, or array of such`, so in that case `2` is being accepted as title,
 which is why the `is_front_page()` function returns `true`.

 Patch with a fix is coming in a minute.

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


More information about the wp-trac mailing list