[wp-trac] [WordPress Trac] #44025: Privacy: Pagination screen options for the requests list tables
WordPress Trac
noreply at wordpress.org
Wed May 9 18:09:09 UTC 2018
#44025: Privacy: Pagination screen options for the requests list tables
-------------------------+----------------------------------
Reporter: birgire | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords: gdpr has-screenshots
Focuses: |
-------------------------+----------------------------------
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44025>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list