diff --git a/wp-admin/includes/admin-filters.php b/wp-admin/includes/admin-filters.php index bfc9f51cfc..0816b2420b 100644 --- a/wp-admin/includes/admin-filters.php +++ b/wp-admin/includes/admin-filters.php @@ -47,6 +47,8 @@ add_action( 'admin_head', '_ipad_meta' ); // Privacy tools add_action( 'admin_menu', '_wp_privacy_hook_requests_page' ); +add_action( 'load-tools_page_export_personal_data', '_wp_privacy_requests_screen_options' ); +add_action( 'load-tools_page_remove_personal_data', '_wp_privacy_requests_screen_options' ); // Prerendering. if ( ! is_customize_preview() ) { diff --git a/wp-admin/includes/misc.php b/wp-admin/includes/misc.php index ba26bdd92e..e8d92b7d05 100644 --- a/wp-admin/includes/misc.php +++ b/wp-admin/includes/misc.php @@ -619,6 +619,8 @@ function set_screen_options() { case 'upload_per_page': case 'edit_tags_per_page': case 'plugins_per_page': + case 'export_personal_data_requests_per_page': + case 'remove_personal_data_requests_per_page': // Network admin case 'sites_network_per_page': case 'users_network_per_page': diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index 9a2dc5dadf..26b5e49c72 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -1005,6 +1005,19 @@ function _wp_privacy_hook_requests_page() { add_submenu_page( 'tools.php', __( 'Erase Personal Data' ), __( 'Erase Personal Data' ), 'erase_others_personal_data', 'remove_personal_data', '_wp_personal_data_removal_page' ); } +/** + * Add options for the privacy requests screens. + * + * @since 4.9.8 + * @access private + */ +function _wp_privacy_requests_screen_options() { + $args = array( + 'option' => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page', + ); + add_screen_option( 'per_page', $args ); +} + // TODO: move the following classes in new files. if ( ! class_exists( 'WP_List_Table' ) ) { require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' ); @@ -1222,7 +1235,7 @@ abstract class WP_Privacy_Requests_Table extends WP_List_Table { ); $this->items = array(); - $posts_per_page = 20; + $posts_per_page = $this->get_items_per_page( $this->request_type . '_requests_per_page' ); $args = array( 'post_type' => $this->post_type, 'post_name__in' => array( $this->request_type ), diff --git a/wp-includes/version.php b/wp-includes/version.php index 98f43f06df..e2031b4757 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43480'; +$wp_version = '5.0-alpha-43486'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.