[wp-trac] [WordPress Trac] #13939: get_page_of_comment returns wrong page number when changing threading level

WordPress Trac noreply at wordpress.org
Sat Oct 3 19:25:27 UTC 2015


#13939: get_page_of_comment returns wrong page number when changing threading level
--------------------------+---------------------------
 Reporter:  laceous       |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.4
Component:  Comments      |     Version:  3.0
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+---------------------------

Comment (by boonebgorges):

 In [changeset:"34806"]:
 {{{
 #!CommitTicketReference repository="" revision="34806"
 Use 'comments_per_page' option as fallback in `get_page_of_comment()`.

 The function now uses the following order of precedence when calculating
 comment pagination: 1. the 'per_page' value passed in the `$args` array,
 2. the 'comments_per_page' query var in `$wp_query`, and 3. the
 'comments_per_page' setting from options-discussion.php. This change
 allows
 `get_page_of_comment()` to return an accurate value before the main query
 has been run.

 Props laceous.
 See #13939.
 }}}

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


More information about the wp-trac mailing list