WordPress.org

Make WordPress Core

Opened 3 weeks ago

#44513 new defect (bug)

bug in paginate_links function

Reported by: luca74 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.6
Component: General Keywords:
Focuses: Cc:

Description

Hi, I've used the paginate_links function, but I find a bug, and solve it. if you are in page 2, and you want to go at page 1 (clicking on the number) or on previous text, the pagination not works: it's missing the ?page=1 So I take a look on the script and I've change:

File: includes/general-template.php

Line 3771 FROM: $link = str_replace( '%_%', 2 == $current ? : $argsformat?, $argsbase? );

TO: $link = str_replace( '%_%', 1 == $current ? : $argsformat?, $argsbase? );

LINE 3792 FROM: $link = str_replace( '%_%', 1 == $n ? : $argsformat?, $argsbase? );

TO: $link = str_replace( '%_%', 0 == $n ? : $argsformat?, $argsbase? );

Change History (0)

Note: See TracTickets for help on using tickets.