[wp-trac] [WordPress Trac] #30831: paginate_links() now needs add_args=false

WordPress Trac noreply at wordpress.org
Mon Dec 29 13:21:46 UTC 2014


#30831: paginate_links() now needs add_args=false
-----------------------------------+-----------------------
 Reporter:  bobbingwide            |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  4.1.1
Component:  Themes                 |     Version:  4.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  template
-----------------------------------+-----------------------

Comment (by obenland):

 I think it's okay for `get_pagenum_link()` not to be aware of the custom
 query argument.

 [attachment:30831.diff] checks the existing arguments for the custom query
 argument and removes it, so that it can't be overwritten later on.

 [attachment:30831.2.diff] goes a little beyond that and adds comments to
 the set up part to make it a little easier to grok. I also added a unit
 test to make sure that existing arguments and passed arguments get along.

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


More information about the wp-trac mailing list