[wp-trac] [WordPress Trac] #44025: Privacy: Pagination screen options for the requests list tables

WordPress Trac noreply at wordpress.org
Tue Jul 10 23:56:35 UTC 2018


#44025: Privacy: Pagination screen options for the requests list tables
-------------------------------------------------+-------------------------
 Reporter:  birgire                              |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  4.9.8
Component:  Privacy                              |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-screenshots has-patch needs-     |     Focuses:
  testing                                        |  administration
-------------------------------------------------+-------------------------

Comment (by birgire):

 Replying to [comment:19 pbiron]:
 >
 > > I think we can also remove the {{{'default' => 20}}} and use the
 fallback, like other tables.
 >
 > I thought about that as well, but then noticed that
 [[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/edit.php#L292
 |/wp-admin/edit.php#:292]] and
 [[https://core.trac.wordpress.org/browser/trunk/src/wp-admin/edit-
 tags.php#L57|/wp-admin/edit-tags.php#L57]] explicitly set `'default' =>
 20`, so I left it in.  I can take it out if you feel strongly, but I
 suggest leaving it in.

 ---

 Seems to be both ways in core, like with the comments table, that's not
 setting it manually.

 https://core.trac.wordpress.org/browser/tags/4.9.7/src/wp-admin/edit-
 comments.php#L163

 ---

 The fallback is 20 in {{{WP_Screen::render_per_page_options()}}}:

 https://core.trac.wordpress.org/browser/tags/4.9.7/src/wp-admin/includes
 /class-wp-screen.php#L1133

 and same in {{{protected function get_items_per_page( $option, $default =
 20 ) {}}}

 https://core.trac.wordpress.org/browser/tags/4.9.7/src/wp-admin/includes
 /class-wp-list-table.php#L683

 So we're currently setting the ''default'' value manually for
 {{{render_per_page_options()}}} but not manually for the second input
 parameter of {{{get_items_per_page()}}} method.

 If we were changing the value to something different than 20, then we
 would need to set both.

 But I don't have strong opinion regarding this in our case :-) so I'm open
 to your suggestion.

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


More information about the wp-trac mailing list