WordPress.org

Make WordPress Core

Ticket #44025: 44025.diff

File 44025.diff, 2.4 KB (added by birgire, 6 weeks ago)
  • src/wp-admin/includes/admin-filters.php

    diff --git src/wp-admin/includes/admin-filters.php src/wp-admin/includes/admin-filters.php
    index 79e30c0..7cb49b7 100644
    add_action( 'admin_head', '_ipad_meta' ); 
    4747
    4848// Privacy tools
    4949add_action( 'admin_menu', '_wp_privacy_hook_requests_page' );
     50add_action( 'load-tools_page_export_personal_data', '_wp_privacy_requests_screen_options' );
     51add_action( 'load-tools_page_removal_personal_data', '_wp_privacy_requests_screen_options' );
    5052
    5153// Prerendering.
    5254if ( ! is_customize_preview() ) {
  • src/wp-admin/includes/misc.php

    diff --git src/wp-admin/includes/misc.php src/wp-admin/includes/misc.php
    index 1d86158..3827380 100644
    function set_screen_options() { 
    611611                        case 'upload_per_page':
    612612                        case 'edit_tags_per_page':
    613613                        case 'plugins_per_page':
     614                        case 'export_personal_data_requests_per_page':
     615                        case 'remove_personal_data_requests_per_page':
    614616                                // Network admin
    615617                        case 'sites_network_per_page':
    616618                        case 'users_network_per_page':
  • src/wp-admin/includes/user.php

    diff --git src/wp-admin/includes/user.php src/wp-admin/includes/user.php
    index fa868d9..ea81f9c 100644
    function _wp_privacy_hook_requests_page() { 
    10051005        add_submenu_page( 'tools.php', __( 'Erase Personal Data' ), __( 'Erase Personal Data' ), 'erase_others_personal_data', 'remove_personal_data', '_wp_personal_data_removal_page' );
    10061006}
    10071007
     1008/**
     1009 * Add options for the privacy requests screens.
     1010 *
     1011 * @since 4.9.7
     1012 * @access private
     1013 */
     1014function _wp_privacy_requests_screen_options() {
     1015        $args = array(
     1016                'label'   => __( 'Requests per page' ),
     1017                'default' => 20,
     1018                'option'  => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page',
     1019        );
     1020        add_screen_option( 'per_page', $args );
     1021}
     1022
    10081023// TODO: move the following classes in new files.
    10091024if ( ! class_exists( 'WP_List_Table' ) ) {
    10101025        require_once( ABSPATH . 'wp-admin/includes/class-wp-list-table.php' );
    abstract class WP_Privacy_Requests_Table extends WP_List_Table { 
    12211236                );
    12221237
    12231238                $this->items    = array();
    1224                 $posts_per_page = 20;
     1239                $posts_per_page = $this->get_pagination_arg( $this->request_type . '_requests_per_page' );
    12251240                $args           = array(
    12261241                        'post_type'      => $this->post_type,
    12271242                        'post_name__in'  => array( $this->request_type ),