Make WordPress Core

Changeset 43486 for trunk


Ignore:
Timestamp:
07/17/2018 04:03:59 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Privacy: Enable pagination screen options for privacy requests list tables.

Props birgire, pbiron.
Fixes #44025.

Location:
trunk/src/wp-admin/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/admin-filters.php

    r43376 r43486  
    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_remove_personal_data', '_wp_privacy_requests_screen_options' );
    5052
    5153// Prerendering.
  • trunk/src/wp-admin/includes/misc.php

    r43454 r43486  
    620620            case 'edit_tags_per_page':
    621621            case 'plugins_per_page':
     622            case 'export_personal_data_requests_per_page':
     623            case 'remove_personal_data_requests_per_page':
    622624                // Network admin
    623625            case 'sites_network_per_page':
  • trunk/src/wp-admin/includes/user.php

    r43478 r43486  
    10061006}
    10071007
     1008/**
     1009 * Add options for the privacy requests screens.
     1010 *
     1011 * @since 4.9.8
     1012 * @access private
     1013 */
     1014function _wp_privacy_requests_screen_options() {
     1015    $args = array(
     1016        'option'  => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page',
     1017    );
     1018    add_screen_option( 'per_page', $args );
     1019}
     1020
    10081021// TODO: move the following classes in new files.
    10091022if ( ! class_exists( 'WP_List_Table' ) ) {
     
    12231236
    12241237        $this->items    = array();
    1225         $posts_per_page = 20;
     1238        $posts_per_page = $this->get_items_per_page( $this->request_type . '_requests_per_page' );
    12261239        $args           = array(
    12271240            'post_type'      => $this->post_type,
Note: See TracChangeset for help on using the changeset viewer.