mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 12:14:25 +00:00
ee2c079ade131f44e6b7ed447eaa183af8c6725a
After [34561], `wp_list_comments()` no longer passed all of a post's comments to `Walker_Comments`. As a result, calls to `get_comment_link()` occurring inside the comment loop had insufficient context to determine the proper 'cpage' value to use when generating comment permalinks. This, in turn, caused comment permalinks to behave erratically. The current changeset addresses the problem as follows: * `get_comment_link()` now accepts a 'cpage' parameter. When present, 'cpage' will be used to build the comment permalink - no automatic calculation will take place. * When called within the main loop, `wp_list_comments()` calculates the proper 'cpage' value for comments in the loop, and passes it down to `get_comment_link()`. * `cpage` and `comment-page-x` query vars are generally required in comment permalinks (see #34068), but an exception is made when 'default_comment_page=oldest': the bare post permalink will always be the same as `cpage=1`, so `cpage` is excluded in this case. Props peterwilsoncc for assiduous spreadsheeting. Fixes #34073. git-svn-id: https://develop.svn.wordpress.org/trunk@34735 602fd350-edb4-49c9-b593-d223f7449a82
Description
No description provided
Languages
PHP
80.5%
CSS
9.4%
JavaScript
8.5%
SCSS
0.9%
HTML
0.7%