[wp-trac] [WordPress Trac] #25143: Appending registered query vars to home URL sets is_home to true when should be false

WordPress Trac noreply at wordpress.org
Thu Apr 9 17:54:39 UTC 2015


#25143: Appending registered query vars to home URL sets is_home to true when
should be false
-------------------------------------+-----------------------------
 Reporter:  mordauk                  |       Owner:
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  Future Release
Component:  Query                    |     Version:  3.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+-----------------------------

Comment (by mordauk):

 [https://core.trac.wordpress.org/attachment/ticket/25143/25143.3.patch
 25143.3.patch] Adds an additional parameter called `$add_query_var` to
 `add_rewrite_endpoint()` and `add_endpoint()` in `WP_Rewrite`.

 This appears to work perfectly.

 Now when an endpoint is registered like this:
 {{{
 add_rewrite_endpoint( $this->get_referral_var(), EP_ALL,
 $this->get_referral_var(), false );
 }}}

 The home page can be properly loaded with `/ref/1` appended to it.

 [https://core.trac.wordpress.org/attachment/ticket/25143/25143-tests.2.patch,
 25143-tests.2.patch] contains updated unit tests for this new approach.

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


More information about the wp-trac mailing list