Make WordPress Core


Ignore:
Timestamp:
10/21/2015 04:25:31 PM (9 years ago)
Author:
boonebgorges
Message:

Don't force comment pagination.

[34561] instituted the policy of forcing pagination for comments. This strategy
was intended to avert problems when 'page_comments' is set to 0 - as it is by
default - and the number of comments on a given post rises into the hundreds or
thousands. By forcing pagination in all cases, we ensured that WordPress would
not time out by processing unwieldy numbers of comments on a given pageload.

The strategy proves problematic, however, because comment permalinks are
generated using the page of the comment. Forcing pagination for posts that
were not previously paginated would change the URL of all comments that do not
appear on the default comment page.

This changeset reintroduces the 'page_comments' setting and its corresponding
checkbox on Settings > Discussion. A number of tests, which were written after
[34561], are modified to work now that 'page_comments' will, once again, be
disabled by default.

See #8071.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/getCommentLink.php

    r35242 r35331  
    4949     */
    5050    public function test_default_comments_page_newest_default_page_should_have_cpage() {
     51        update_option( 'page_comments', 1 );
    5152        update_option( 'default_comments_page', 'newest' );
    5253        update_option( 'comments_per_page', 2 );
     
    6162     */
    6263    public function test_default_comments_page_newest_middle_page_should_have_cpage() {
     64        update_option( 'page_comments', 1 );
    6365        update_option( 'default_comments_page', 'newest' );
    6466        update_option( 'comments_per_page', 2 );
     
    7375     */
    7476    public function test_default_comments_page_newest_last_page_should_have_cpage() {
     77        update_option( 'page_comments', 1 );
    7578        update_option( 'default_comments_page', 'newest' );
    7679        update_option( 'comments_per_page', 2 );
     
    97100     */
    98101    public function test_default_comments_page_oldest_middle_page_should_have_cpage() {
     102        update_option( 'page_comments', 1 );
    99103        update_option( 'default_comments_page', 'oldest' );
    100104        update_option( 'comments_per_page', 2 );
     
    109113     */
    110114    public function test_default_comments_page_oldest_last_page_should_have_cpage() {
     115        update_option( 'page_comments', 1 );
    111116        update_option( 'default_comments_page', 'oldest' );
    112117        update_option( 'comments_per_page', 2 );
Note: See TracChangeset for help on using the changeset viewer.