Make WordPress Core

Changeset 17168


Ignore:
Timestamp:
12/29/2010 03:58:46 PM (14 years ago)
Author:
ryan
Message:

Hard limit to 10 comments on edit post screen. Props greuben. fixes #15998

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-comments-list-table.php

    r17113 r17168  
    5555        $order = ( isset( $_REQUEST['order'] ) ) ? $_REQUEST['order'] : '';
    5656
    57         $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
    58         $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
     57        $comments_per_page = $this->get_per_page( $comment_status );
    5958
    6059        $doing_ajax = defined( 'DOING_AJAX' ) && DOING_AJAX;
     
    116115            'per_page' => $comments_per_page,
    117116        ) );
     117    }
     118   
     119    function get_per_page( $comment_status = 'all' ) {
     120        $comments_per_page = $this->get_items_per_page( 'edit_comments_per_page' );
     121        $comments_per_page = apply_filters( 'comments_per_page', $comments_per_page, $comment_status );
     122        return $comments_per_page;
    118123    }
    119124
     
    537542<?php
    538543    }
     544   
     545    function get_per_page( $comment_status = false ) {
     546        return 10;
     547    }
    539548}
    540549
Note: See TracChangeset for help on using the changeset viewer.