WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 days ago

#44025 new enhancement

Privacy: Pagination screen options for the requests list tables

Reported by: birgire Owned by:
Milestone: 4.9.7 Priority: normal
Severity: normal Version:
Component: Privacy Keywords: gdpr has-screenshots has-patch needs-testing
Focuses: administration Cc:

Description

It's handy to have the screen options for pagination.

We could add it with e.g.:

$args = array(
    'label'   => __( 'Requests per page' ),
    'default' => 20,
    'option'  => $screen->id . '_requests_per_page'   
);
add_screen_option( 'per_page', $args );

or with a shorter options like export_requests_per_page and erase_requests_per_page.

We then need to adjust the switch in set_screen_options() to handle these two new options.

I assume the admin pages:

wp-admin/tools.php?page=export_personal_data
wp-admin/tools.php?page=remove_personal_data

will get their own files in 5.0?

Else we would need to hook into the corresponding "load-{$page_hook}" action.

Then we can fetch the per page option with:

$posts_per_page = $this->get_items_per_page( $this->screen->id . '_requests_per_page' );

in the WP_Privacy_Requests_Table::prepare_items() method.

Attachments (2)

screen-options-for-per-page.jpg (24.4 KB) - added by birgire 6 weeks ago.
44025.diff (2.4 KB) - added by birgire 3 weeks ago.

Download all attachments as: .zip

Change History (11)

#1 @birgire
6 weeks ago

  • Focuses administration added

#2 @desrosj
6 weeks ago

  • Milestone changed from Awaiting Review to 4.9.7

#3 @desrosj
6 weeks ago

  • Milestone changed from 4.9.7 to Future Release

Moving gdpr tickets that are not bugs to Future Release until the next steps can be properly evaluated.

#4 @desrosj
5 weeks ago

  • Component changed from General to Privacy

Moving to the new Privacy component.

This ticket was mentioned in Slack in #gdpr-compliance by desrosj. View the logs.


4 weeks ago

#6 @desrosj
4 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Future Release to 4.9.7

#7 @desrosj
4 weeks ago

  • Version trunk deleted

#8 @birgire
3 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed

44025.diff adds the screen pagination options:

  • export_personal_data_requests_per_page
  • remove_personal_data_requests_per_page

with the hooks:

  • load-tools_page_export_personal_data
  • load-tools_page_remove_personal_data

since these pages (still) don't have dedicated admin files.

@birgire
3 weeks ago

This ticket was mentioned in Slack in #core-privacy by desrosj. View the logs.


6 days ago

Note: See TracTickets for help on using tickets.