Make WordPress Core

Changeset 43487 for branches/4.9


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

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

Props birgire, pbiron.
Merges [43486] to the 4.9 branch.
Fixes #44025.

Location:
branches/4.9
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-admin/includes/admin-filters.php

    r43455 r43487  
    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.
  • branches/4.9/src/wp-admin/includes/misc.php

    r43455 r43487  
    607607            case 'edit_tags_per_page':
    608608            case 'plugins_per_page':
     609            case 'export_personal_data_requests_per_page':
     610            case 'remove_personal_data_requests_per_page':
    609611            // Network admin
    610612            case 'sites_network_per_page':
  • branches/4.9/src/wp-admin/includes/user.php

    r43485 r43487  
    965965}
    966966
     967/**
     968 * Add options for the privacy requests screens.
     969 *
     970 * @since 4.9.8
     971 * @access private
     972 */
     973function _wp_privacy_requests_screen_options() {
     974    $args = array(
     975        'option'  => str_replace( 'tools_page_', '', get_current_screen()->id ) . '_requests_per_page',
     976    );
     977    add_screen_option( 'per_page', $args );
     978}
     979
    967980// TODO: move the following classes in new files.
    968981if ( ! class_exists( 'WP_List_Table' ) ) {
     
    11821195
    11831196        $this->items    = array();
    1184         $posts_per_page = 20;
     1197        $posts_per_page = $this->get_items_per_page( $this->request_type . '_requests_per_page' );
    11851198        $args           = array(
    11861199            'post_type'      => $this->post_type,
Note: See TracChangeset for help on using the changeset viewer.